Actions

Difference between revisions of "Why do you get a "Fatal error: Call to undefined function: stripos()" when editing Joomla! 1.5.7 Articles from the frontend when using PHP 4?"

From Joomla! Documentation

(break into separate articles)
 
m (clean up categories with <noinclude> tags)
 
(3 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
"Fatal error: Call to undefined function: stripos() in /libraries/joomla/environment/uri.php on line 675"
 
"Fatal error: Call to undefined function: stripos() in /libraries/joomla/environment/uri.php on line 675"
  
Articles are still successfully posted.
+
Articles are still successfully posted,
  
 
Possible resolutions:
 
Possible resolutions:
Line 16: Line 16:
 
</source>
 
</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.
+
* 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 - Ignore until Joomla! 1.5.8 since the Article is saved correctly.
+
* OR - Ignore until Joomla! 1.5.8 since the Article is saved correctly.  However, if you are having problems with user logins this will not be appropriate.
  
[[Category:Version 1.5.7 FAQ]]
+
Related [[Why can't users login in version 1.5.7 with php 4? ]]
 +
 
 +
<noinclude>[[Category:FAQ]]
 +
[[Category:Administration FAQ]]
 +
[[Category:Upgrading and Migrating FAQ]]
 +
[[Category:Version 1.5 FAQ]]
 +
[[Category:Version 1.5.7 FAQ]]</noinclude>

Latest revision as of 15:26, 1 September 2012

Problem: MarkCII reported that for PHP 4 environments, Joomla! gives this error message when Articles are submitted from the frontend:

"Fatal error: Call to undefined function: stripos() in /libraries/joomla/environment/uri.php on line 675"

Articles are still successfully posted,

Possible resolutions:

  • 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).
  • OR - Ignore until Joomla! 1.5.8 since the Article is saved correctly. However, if you are having problems with user logins this will not be appropriate.

Related Why can't users login in version 1.5.7 with php 4?