diff --git a/ChangeLog b/ChangeLog
index 73ae5f64fe201a26cf4b19b34158f8d395fe6825..731a2480f2f0750a4422d03c6fa65fa3180a9901 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-17  Rupert Germann  <rupi@gmx.li>
+
+	* Fixed bug #12455: OpenID authentication does not work with PHP 5.3
+
 2009-11-17  Oliver Hader  <oliver@typo3.org>
 
 	* Fixed bug #12612: Backend Login-Popup not working
diff --git a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/AX.php b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/AX.php
index 4a617ae30c313a9abbf8edbe2adf8d199d158396..107f52b902151f0c5e06414ab6f611d46c369658 100644
--- a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/AX.php
+++ b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/AX.php
@@ -235,7 +235,7 @@ class Auth_OpenID_AX_AttrInfo {
  * return null If an alias is present in the list of aliases but
  * is not present in the namespace map.
  */
-function Auth_OpenID_AX_toTypeURIs(&$namespace_map, $alias_list_s)
+function Auth_OpenID_AX_toTypeURIs($namespace_map, $alias_list_s)
 {
     $uris = array();
 
@@ -573,7 +573,7 @@ class Auth_OpenID_AX_KeyValueMessage extends Auth_OpenID_AX_Message {
      * @param type_uri: The URI for the attribute
      * @param values: A list of values to send for this attribute.
      */
-    function setValues($type_uri, &$values)
+    function setValues($type_uri, $values)
     {
         $this->data[$type_uri] =& $values;
     }
@@ -587,7 +587,7 @@ class Auth_OpenID_AX_KeyValueMessage extends Auth_OpenID_AX_Message {
      *
      * @access private
      */
-    function _getExtensionKVArgs(&$aliases)
+    function _getExtensionKVArgs($aliases)
     {
         if ($aliases === null) {
             $aliases = new Auth_OpenID_NamespaceMap();
@@ -888,7 +888,7 @@ class Auth_OpenID_AX_FetchResponse extends Auth_OpenID_AX_KeyValueMessage {
             $ax_args['update_url'] = $update_url;
         }
 
-        Auth_OpenID::update(&$ax_args, $kv_args);
+        Auth_OpenID::update($ax_args, $kv_args);
 
         return $ax_args;
     }
@@ -960,7 +960,7 @@ class Auth_OpenID_AX_StoreRequest extends Auth_OpenID_AX_KeyValueMessage {
     {
         $ax_args = $this->_newArgs();
         $kv_args = $this->_getExtensionKVArgs($aliases);
-        Auth_OpenID::update(&$ax_args, $kv_args);
+        Auth_OpenID::update($ax_args, $kv_args);
         return $ax_args;
     }
 }
diff --git a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Association.php b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Association.php
index 37ce0cbf4545c8a19e066c4218e520bd4b8d7426..83bdd98dd6ce4e77518820249cad46cd95a65fc2 100644
--- a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Association.php
+++ b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Association.php
@@ -327,7 +327,7 @@ class Auth_OpenID_Association {
      *
      * @access private
      */
-    function _makePairs(&$message)
+    function _makePairs($message)
     {
         $signed = $message->getArg(Auth_OpenID_OPENID_NS, 'signed');
         if (!$signed || Auth_OpenID::isFailure($signed)) {
@@ -352,7 +352,7 @@ class Auth_OpenID_Association {
      *
      * @access private
      */
-    function getMessageSignature(&$message)
+    function getMessageSignature($message)
     {
         $pairs = $this->_makePairs($message);
         return base64_encode($this->sign($pairs));
@@ -364,7 +364,7 @@ class Auth_OpenID_Association {
      *
      * @access private
      */
-    function checkMessageSignature(&$message)
+    function checkMessageSignature($message)
     {
         $sig = $message->getArg(Auth_OpenID_OPENID_NS,
                                 'sig');
diff --git a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/BigMath.php b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/BigMath.php
index 45104947d6da44412671f6e319f0dcf817131893..33923434a996b09092057fcb0a791efbef094678 100644
--- a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/BigMath.php
+++ b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/BigMath.php
@@ -365,6 +365,7 @@ function Auth_OpenID_math_extensions()
 function Auth_OpenID_detectMathLibrary($exts)
 {
     $loaded = false;
+    $hasDl = function_exists('dl');
 
     foreach ($exts as $extension) {
         // See if the extension specified is already loaded.
@@ -374,7 +375,7 @@ function Auth_OpenID_detectMathLibrary($exts)
         }
 
         // Try to load dynamic modules.
-        if (!$loaded) {
+        if (!$loaded && $hasDl) {
             foreach ($extension['modules'] as $module) {
                 if (@dl($module . "." . PHP_SHLIB_SUFFIX)) {
                     $loaded = true;
diff --git a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Consumer.php b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Consumer.php
index e823255f87688dc057d7cddd1912f94a97b92920..c9f69922ef84e92d3aacbbea38bcdb311b959e86 100644
--- a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Consumer.php
+++ b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Consumer.php
@@ -258,7 +258,7 @@ class Auth_OpenID_Consumer {
      * when creating the internal consumer object.  This is used for
      * testing.
      */
-    function Auth_OpenID_Consumer(&$store, $session = null,
+    function Auth_OpenID_Consumer($store, $session = null,
                                   $consumer_cls = null)
     {
         if ($session === null) {
@@ -268,9 +268,9 @@ class Auth_OpenID_Consumer {
         $this->session =& $session;
 
         if ($consumer_cls !== null) {
-            $this->consumer =& new $consumer_cls($store);
+            $this->consumer = new $consumer_cls($store);
         } else {
-            $this->consumer =& new Auth_OpenID_GenericConsumer($store);
+            $this->consumer = new Auth_OpenID_GenericConsumer($store);
         }
 
         $this->_token_key = $this->session_key_prefix . $this->_token_suffix;
@@ -281,7 +281,7 @@ class Auth_OpenID_Consumer {
      *
      * @access private
      */
-    function getDiscoveryObject(&$session, $openid_url,
+    function getDiscoveryObject($session, $openid_url,
                                 $session_key_prefix)
     {
         return new Auth_Yadis_Discovery($session, $openid_url,
@@ -611,7 +611,7 @@ class Auth_OpenID_GenericConsumer {
      * in the module description.  The default value is False, which
      * disables immediate mode.
      */
-    function Auth_OpenID_GenericConsumer(&$store)
+    function Auth_OpenID_GenericConsumer($store)
     {
         $this->store =& $store;
         $this->negotiator =& Auth_OpenID_getDefaultNegotiator();
@@ -665,14 +665,14 @@ class Auth_OpenID_GenericConsumer {
         $method = Auth_OpenID::arrayGet($mode_methods, $mode,
                                         '_completeInvalid');
 
-        return call_user_func_array(array(&$this, $method),
+        return call_user_func_array(array($this, $method),
                                     array($message, $endpoint, $return_to));
     }
 
     /**
      * @access private
      */
-    function _completeInvalid($message, &$endpoint, $unused)
+    function _completeInvalid($message, $endpoint, $unused)
     {
         $mode = $message->getArg(Auth_OpenID_OPENID_NS, 'mode',
                                  '<No mode set>');
@@ -684,7 +684,7 @@ class Auth_OpenID_GenericConsumer {
     /**
      * @access private
      */
-    function _complete_cancel($message, &$endpoint, $unused)
+    function _complete_cancel($message, $endpoint, $unused)
     {
         return new Auth_OpenID_CancelResponse($endpoint);
     }
@@ -692,7 +692,7 @@ class Auth_OpenID_GenericConsumer {
     /**
      * @access private
      */
-    function _complete_error($message, &$endpoint, $unused)
+    function _complete_error($message, $endpoint, $unused)
     {
         $error = $message->getArg(Auth_OpenID_OPENID_NS, 'error');
         $contact = $message->getArg(Auth_OpenID_OPENID_NS, 'contact');
@@ -705,7 +705,7 @@ class Auth_OpenID_GenericConsumer {
     /**
      * @access private
      */
-    function _complete_setup_needed($message, &$endpoint, $unused)
+    function _complete_setup_needed($message, $endpoint, $unused)
     {
         if (!$message->isOpenID2()) {
             return $this->_completeInvalid($message, $endpoint);
@@ -719,7 +719,7 @@ class Auth_OpenID_GenericConsumer {
     /**
      * @access private
      */
-    function _complete_id_res($message, &$endpoint, $return_to)
+    function _complete_id_res($message, $endpoint, $return_to)
     {
         $user_setup_url = $message->getArg(Auth_OpenID_OPENID1_NS,
                                            'user_setup_url');
@@ -1178,6 +1178,8 @@ class Auth_OpenID_GenericConsumer {
      */
     function _discoverAndVerify($claimed_id, $to_match_endpoints)
     {
+
+
         // oidutil.log('Performing discovery on %s' % (claimed_id,))
         list($unused, $services) = call_user_func($this->discoverMethod,
                                                   $claimed_id,
@@ -1197,7 +1199,7 @@ class Auth_OpenID_GenericConsumer {
      * @access private
      */
     function _verifyDiscoveryServices($claimed_id,
-                                      &$services, &$to_match_endpoints)
+                                      $services, $to_match_endpoints)
     {
         // Search the services resulting from discovery to find one
         // that matches the information from the assertion
@@ -1460,7 +1462,7 @@ class Auth_OpenID_GenericConsumer {
      *
      * @access private
      */
-    function _extractSupportedAssociationType(&$server_error, &$endpoint,
+    function _extractSupportedAssociationType($server_error, $endpoint,
                                               $assoc_type)
     {
         // Any error message whose code is not 'unsupported-type'
@@ -1565,7 +1567,7 @@ class Auth_OpenID_GenericConsumer {
     /**
      * @access private
      */
-    function _extractAssociation(&$assoc_response, &$assoc_session)
+    function _extractAssociation($assoc_response, $assoc_session)
     {
         // Extract the common fields from the response, raising an
         // exception if they are not found
@@ -1747,7 +1749,7 @@ class Auth_OpenID_AuthRequest {
      * class.  Instances of this class are created by the library when
      * needed.
      */
-    function Auth_OpenID_AuthRequest(&$endpoint, $assoc)
+    function Auth_OpenID_AuthRequest($endpoint, $assoc)
     {
         $this->assoc = $assoc;
         $this->endpoint =& $endpoint;
@@ -1763,7 +1765,7 @@ class Auth_OpenID_AuthRequest {
      * $extension_request: An object that implements the extension
      * request interface for adding arguments to an OpenID message.
      */
-    function addExtension(&$extension_request)
+    function addExtension($extension_request)
     {
         $extension_request->toMessage($this->message);
     }
@@ -2226,4 +2228,4 @@ class Auth_OpenID_SetupNeededResponse extends Auth_OpenID_ConsumerResponse {
     }
 }
 
-?>
+?>
\ No newline at end of file
diff --git a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Discover.php b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Discover.php
index 62aeb1d2bc550db88247e1c22502cf912781737e..f3f71e405f04a280b2ac78f45d039d3098991fd6 100644
--- a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Discover.php
+++ b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Discover.php
@@ -305,7 +305,7 @@ function Auth_OpenID_findOPLocalIdentifier($service, $type_uris)
     return $local_id;
 }
 
-function filter_MatchesAnyOpenIDType(&$service)
+function filter_MatchesAnyOpenIDType($service)
 {
     $uris = $service->getTypes();
 
@@ -415,7 +415,7 @@ function Auth_OpenID_makeOpenIDEndpoints($uri, $yadis_services)
     return $s;
 }
 
-function Auth_OpenID_discoverWithYadis($uri, &$fetcher,
+function Auth_OpenID_discoverWithYadis($uri, $fetcher,
               $endpoint_filter='Auth_OpenID_getOPOrUserServices',
               $discover_function=null)
 {
@@ -433,7 +433,7 @@ function Auth_OpenID_discoverWithYadis($uri, &$fetcher,
     $openid_services = array();
 
     $response = call_user_func_array($discover_function,
-                                     array($uri, &$fetcher));
+                                     array($uri, $fetcher));
 
     $yadis_url = $response->normalized_uri;
     $yadis_services = array();
@@ -460,18 +460,18 @@ function Auth_OpenID_discoverWithYadis($uri, &$fetcher,
     }
 
     $openid_services = call_user_func_array($endpoint_filter,
-                                            array(&$openid_services));
+                                            array($openid_services));
 
     return array($yadis_url, $openid_services);
 }
 
-function Auth_OpenID_discoverURI($uri, &$fetcher)
+function Auth_OpenID_discoverURI($uri, $fetcher)
 {
     $uri = Auth_OpenID::normalizeUrl($uri);
     return Auth_OpenID_discoverWithYadis($uri, $fetcher);
 }
 
-function Auth_OpenID_discoverWithoutYadis($uri, &$fetcher)
+function Auth_OpenID_discoverWithoutYadis($uri, $fetcher)
 {
     $http_resp = @$fetcher->get($uri);
 
@@ -490,7 +490,7 @@ function Auth_OpenID_discoverWithoutYadis($uri, &$fetcher)
     return array($identity_url, $openid_services);
 }
 
-function Auth_OpenID_discoverXRI($iname, &$fetcher)
+function Auth_OpenID_discoverXRI($iname, $fetcher)
 {
     $resolver = new Auth_Yadis_ProxyResolver($fetcher);
     list($canonicalID, $yadis_services) =
@@ -513,7 +513,7 @@ function Auth_OpenID_discoverXRI($iname, &$fetcher)
     return array($iname, $openid_services);
 }
 
-function Auth_OpenID_discover($uri, &$fetcher)
+function Auth_OpenID_discover($uri, $fetcher)
 {
     // If the fetcher (i.e., PHP) doesn't support SSL, we can't do
     // discovery on an HTTPS URL.
diff --git a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Server.php b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Server.php
index 84e4065a7d8bf1c5740192a68ce2ba24dd42bb2a..d5abfd27c4bbfe67e6de37a64a7ea39c53f43c1f 100644
--- a/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Server.php
+++ b/typo3/sysext/openid/lib/php-openid/Auth/OpenID/Server.php
@@ -1097,7 +1097,7 @@ class Auth_OpenID_CheckIDRequest extends Auth_OpenID_Request {
                                   in OpenID 1.x immediate mode.');
                 }
 
-                $setup_request =& new Auth_OpenID_CheckIDRequest(
+                $setup_request = new Auth_OpenID_CheckIDRequest(
                                                 $this->identity,
                                                 $this->return_to,
                                                 $this->trust_root,
@@ -1677,9 +1677,9 @@ class Auth_OpenID_Server {
     function Auth_OpenID_Server(&$store, $op_endpoint=null)
     {
         $this->store =& $store;
-        $this->signatory =& new Auth_OpenID_Signatory($this->store);
-        $this->encoder =& new Auth_OpenID_SigningEncoder($this->signatory);
-        $this->decoder =& new Auth_OpenID_Decoder($this);
+        $this->signatory = new Auth_OpenID_Signatory($this->store);
+        $this->encoder = new Auth_OpenID_SigningEncoder($this->signatory);
+        $this->decoder = new Auth_OpenID_Decoder($this);
         $this->op_endpoint = $op_endpoint;
         $this->negotiator =& Auth_OpenID_getDefaultNegotiator();
     }
@@ -1757,4 +1757,4 @@ class Auth_OpenID_Server {
     }
 }
 
-?>
+?>
\ No newline at end of file
diff --git a/typo3/sysext/openid/lib/php-openid/Auth/Yadis/XRDS.php b/typo3/sysext/openid/lib/php-openid/Auth/Yadis/XRDS.php
index f14a7948e1a4379e61da6b1be9b3493182129d48..1a0d4ffd5cc7bb8c463a7fd01b009205e6e17af6 100644
--- a/typo3/sysext/openid/lib/php-openid/Auth/Yadis/XRDS.php
+++ b/typo3/sysext/openid/lib/php-openid/Auth/Yadis/XRDS.php
@@ -255,7 +255,7 @@ class Auth_Yadis_XRDS {
      * Instantiate a Auth_Yadis_XRDS object.  Requires an XPath
      * instance which has been used to parse a valid XRDS document.
      */
-    function Auth_Yadis_XRDS(&$xmlParser, &$xrdNodes)
+    function Auth_Yadis_XRDS($xmlParser, $xrdNodes)
     {
         $this->parser =& $xmlParser;
         $this->xrdNode = $xrdNodes[count($xrdNodes) - 1];
@@ -352,7 +352,7 @@ class Auth_Yadis_XRDS {
         $services = $this->parser->evalXPath('xrd:Service', $this->xrdNode);
 
         foreach ($services as $node) {
-            $s =& new Auth_Yadis_Service();
+            $s = new Auth_Yadis_Service();
             $s->element = $node;
             $s->parser =& $this->parser;
 
@@ -428,7 +428,7 @@ class Auth_Yadis_XRDS {
                 $matches = 0;
 
                 foreach ($filters as $filter) {
-                    if (call_user_func_array($filter, array($service))) {
+                    if (call_user_func_array($filter, array(&$service))) {
                         $matches++;
 
                         if ($filter_mode == SERVICES_YADIS_MATCH_ANY) {
diff --git a/typo3/sysext/openid/lib/php-openid/Auth/Yadis/XRIRes.php b/typo3/sysext/openid/lib/php-openid/Auth/Yadis/XRIRes.php
index 4e8e8d0372deb1bd308a2db4ca7dc8101dcfb3dd..51968eb43d8b3c9d7a9e80d3bdab64d91f3e4d92 100644
--- a/typo3/sysext/openid/lib/php-openid/Auth/Yadis/XRIRes.php
+++ b/typo3/sysext/openid/lib/php-openid/Auth/Yadis/XRIRes.php
@@ -8,7 +8,7 @@ require_once 'Auth/Yadis/XRDS.php';
 require_once 'Auth/Yadis/XRI.php';
 
 class Auth_Yadis_ProxyResolver {
-    function Auth_Yadis_ProxyResolver(&$fetcher, $proxy_url = null)
+    function Auth_Yadis_ProxyResolver($fetcher, $proxy_url = null)
     {
         $this->fetcher =& $fetcher;
         $this->proxy_url = $proxy_url;
diff --git a/typo3/sysext/openid/lib/php-openid/Auth/Yadis/Yadis.php b/typo3/sysext/openid/lib/php-openid/Auth/Yadis/Yadis.php
index d89f77c6d7c5f4cbf647c45661f91f8325941b17..3f568757ce7c315f7b16ce19706ad4546ea22791 100644
--- a/typo3/sysext/openid/lib/php-openid/Auth/Yadis/Yadis.php
+++ b/typo3/sysext/openid/lib/php-openid/Auth/Yadis/Yadis.php
@@ -317,7 +317,7 @@ class Auth_Yadis_Yadis {
      * Auth_Yadis_Yadis, depending on whether the discovery
      * succeeded.
      */
-    function discover($uri, &$fetcher,
+    function discover($uri, $fetcher,
                       $extra_ns_map = null, $timeout = 20)
     {
         $result = new Auth_Yadis_DiscoveryResult($uri);
diff --git a/typo3/sysext/openid/sv1/class.tx_openid_sv1.php b/typo3/sysext/openid/sv1/class.tx_openid_sv1.php
index ba8ea9ef9525f8afdcc8b5496fe9a31c6913eb65..56adb1377c846798e37514109fdfe669ab5a86ce 100644
--- a/typo3/sysext/openid/sv1/class.tx_openid_sv1.php
+++ b/typo3/sysext/openid/sv1/class.tx_openid_sv1.php
@@ -322,7 +322,8 @@ class tx_openid_sv1 extends t3lib_svbase {
 		// TODO Change this to a TYPO3-specific database-based store in future.
 		// File-based store is ineffective and insecure. After changing
 		// get rid of the FileStore include in includePHPOpenIDLibrary()
-		$openIDStorePath = PATH_site . 'typo3temp/tx_openid';
+		$openIDStorePath = PATH_site . 'typo3temp' . PATH_SEPARATOR . 'tx_openid';
+
 		// For now we just prevent any web access to these files
 		if (!file_exists($openIDStorePath . '/.htaccess')) {
 			file_put_contents($openIDStorePath . '/.htaccess', 'deny from all');