Actions

Difference between revisions of "Why can't users login in version 1.5.7 with php 4?"

From Joomla! Documentation

m (Made a little prettier.)
Line 1: Line 1:
As reported by [http://forum.joomla.org/memberlist.php?mode=viewprofile&u=185541  auciker]
+
As reported by [http://forum.joomla.org/memberlist.php?mode=viewprofile&u=185541  auciker], because of a change made to improve security, login with redirection will not work for PHP 4 sites. This may also impact other areas where there is redirection, specifically polls and mailto.
Because of a change made to improve security, login with is redirection will does not work for PHP 4 sites. This may also impact other areas where there is redirection, specifically polls and mailto.
+
  
 
To fix this:
 
To fix this:
  
 
*  Add this to the end of /libraries/joomla/utilities/compat/php50x.php  
 
*  Add this to the end of /libraries/joomla/utilities/compat/php50x.php  
 
+
<source lang="php">
  if(!function_exists('stripos')) {
+
if (!function_exists( 'stripos' )) {
  function stripos($haystack, $needle, $offset = 0) {
+
    function stripos( $haystack, $needle, $offset = 0 ) {
  return strpos(strtolower($haystack), strtolower($needle), $offset);
+
        return strpos( strtolower( $haystack ), strtolower( $needle ), $offset );
  }
+
    }
}
+
}
 
+
</source>
 
* OR - Upgrade to PHP 5. PHP 4 end of life was August 8, 2008. There will not be any more PHP 4 releases, even for security.    (Switching PHP versions may cause problems with some 3rd Party Plugins - be sure to test thoroughly).
 
* OR - Upgrade to PHP 5. PHP 4 end of life was August 8, 2008. There will not be any more PHP 4 releases, even for security.    (Switching PHP versions may cause problems with some 3rd Party Plugins - be sure to test thoroughly).
 
+
[[Category:FAQ]][[Category:Administration FAQ]][[Category:Upgrading and Migrating FAQ]][[Category:Version 1.5 FAQ]][[Category:Version 1.5.7 FAQ]]
 
+
[[Category:FAQ]]
+
[[Category:Administration FAQ]]
+
[[Category:Upgrading and Migrating FAQ]]
+
[[Category:Version 1.5 FAQ]]
+
[[Category:Version 1.5.7 FAQ]]
+

Revision as of 07:23, 13 September 2008

As reported by auciker, because of a change made to improve security, login with redirection will not work for PHP 4 sites. This may also impact other areas where there is redirection, specifically polls and mailto.

To fix this:

  • Add this to the end of /libraries/joomla/utilities/compat/php50x.php
if (!function_exists( 'stripos' )) {
    function stripos( $haystack, $needle, $offset = 0 ) {
        return strpos( strtolower( $haystack ), strtolower( $needle ), $offset );
    }
}
  • OR - Upgrade to PHP 5. PHP 4 end of life was August 8, 2008. There will not be any more PHP 4 releases, even for security. (Switching PHP versions may cause problems with some 3rd Party Plugins - be sure to test thoroughly).