1

I tried to run my Joomla 1.x website with PHP 5.6 and got the following errors:

Strict Standards: Declaration of KHttpUri::set() should be compatible with KObject::set($property, $value = NULL) in /home/beauty/www/libraries/koowa/http/uri.php on line 0 Strict Standards: Declaration of KHttpUri::get() should be compatible with KObject::get($property = NULL, $default = NULL) in /home/beauty/www/libraries/koowa/http/uri.php on line 0 Strict Standards: Non-static method JLoader::register() should not be called statically in /home/beauty/www/libraries/joomla/cache/cache.php on line 19 Strict Standards: Declaration of JCacheStorage::get() should be compatible with JObject::get($property, $default = NULL) in /home/beauty/www/libraries/joomla/cache/storage.php on line 0 Strict Standards: Non-static method JLoader::register() should not be called statically in /home/beauty/www/libraries/joomla/document/document.php on line 19 Strict Standards: Non-static method JLoader::import() should not be called statically in /home/beauty/www/libraries/loader.php on line 186 Strict Standards: Non-static method JLoader::import() should not be called statically in /home/beauty/www/libraries/loader.php on line 186 Fatal error: Call-time pass-by-reference has been removed in /home/beauty/www/plugins/content/listitems.php on line 95

The website worked fine before with PHP 5.3 (on Ubuntu 12.X LTS), so probably this is something related to compatibility PHP 5.3/5.6.

Does anyone know what is it? What PHP extension this can relate to?

Tom Kuschel
  • 695
  • 8
  • 19
Koban
  • 463
  • 1
  • 6
  • 12
  • have you also changed the php.ini file? - Disable strict standards? – Tom Kuschel Aug 03 '17 at 17:39
  • I did not change php.ini, but I have "error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT" – Koban Aug 04 '17 at 09:15
  • but in PHP 5.3 I have 'error_reporting = E_ALL & ~E_DEPRECATED' and my website works fine with it. Probably the both settings in PHP 5.3 and 5.6 are equivalent because E_ALL was changes in PHP 5.6. – Koban Aug 04 '17 at 09:27
  • actually E_STRICT is disabled by default in /etc/php/5.6/fpm/php.ini as described here https://stackoverflow.com/questions/9983286/disabling-strict-standards-in-php-5-4, but I see 'Strict Standards' in browser. – Koban Aug 04 '17 at 09:47

2 Answers2

0

It is pointless to tinkering with such an old Joomla version and get it run with a php 5.6. Joomla 1.5.x is not compatible with PHP 5.4 nor with 5.6; it's old but still available: docs.joomla.org/Joomla_1.5_won't_work_on_PHP_5.4. Nevertheless, the library koowa is not part of Joomla itself; you could rename the declarations of your classes, rename all functions which are called static (i.e. JLoader::register()) to a static function, etc. But you are still working with unsecure old libraries/plugins/components and Joomla version. Maybe you've changed the error reporting somewhere else (.htaccess), and you should have a look at http://php.net/manual/en/appendices.php. You should better migrate your site to the latest Joomla3.7.4 and PHP7... By the way, Call-time pass-by-reference has been removed in /home/beauty/www/plugins/content/listitems.php on line 95 which can be solved like in PHP 5.4 Call-time pass-by-reference - Easy fix available?, usually the function call works without the @ . Please also specify the exact version of Joomla (in your question please), between 1.0 and 1.5 as well as 1.7 are huge differences!

Tom Kuschel
  • 695
  • 8
  • 19
  • Joomla version is 1.5.23. I do not have .htaccess because I use Nginx, and E_STRICT is disabled in php.ini. – Koban Aug 04 '17 at 14:13
  • Migration to Joomla 3.7 is a time wasting process, there are some custom PHP code and VirtueMart component. If it is hard to make it work with PHP 5.6 I can easily install PHP 5.3 with Ubuntu 12.04 in docker container, but I am not sure that it is good idea. – Koban Aug 04 '17 at 14:32
  • It's old but still available: https://docs.joomla.org/Joomla_1.5_won't_work_on_PHP_5.4. The migration process from 1.5 to the latest version is really a hard job especially with custom code and Virtuemart. But if you want to go online with such a page, it is a must to migrate Joomla (due to security). – Tom Kuschel Aug 05 '17 at 16:54
-1

These are only strict and standard warnings, so you can just set the global config param debug to none and all warnings will be gone.

Better would it be to check the code and manually fix it for PHP 5.6 handling - no developer will give you support for Joomla!v1.5 anymore, so you have to fix it on your own.

PCo
  • 9
  • 2
  • Please read the whole task (2 days ago), there is a _Fatal_ _error_: Call-time pass-by-reference has been removed in /home/beauty/www/plugins/content/listitems.php on line 95. Again: Joomla 1.5 is not php 5.4 compatible, so it is with php 5.6 (link already posted). – Tom Kuschel Aug 11 '17 at 13:23