I have a Mambo CMS web site hosted with 000webhost. The site is powered by Mambo 4.6.2. and PHP Version 5.2.13 is installed on the 000webhost web server. The web site runs fine.
I’ve upgraded the OS of my development machine to Ubuntu 10.04 since I last worked on the site, and the site no longer works. This machine has PHP Version 5.3.2-1ubuntu4.2 installed.
I Googled ‘PHP Fatal error: Call to undefined method mosMenu::mosDBTable()’, which led me to this thread on the Mambo Forums.
The thread above suggests using following settings in php.ini: error_reporting = E_ALL | ~E_STRICT and zend.ze1_compatibility_mode true. I tried this, which produced 17 additional errors:
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/index.php on line 170
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/index.php on line 270
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/index.php on line 323
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/index.php on line 328
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/database.php on line 777
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 407
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 426
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 533
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 1148
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 1676
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2615
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2621
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2627
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2633
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2639
PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2668
PHP Deprecated: Function ereg_replace() is deprecated in /home/mike/Public/mambo/includes/core.classes.php on line 2978
PHP Fatal error: Call to undefined method mosMenu::mosDBTable() in /home/mike/Public/mambo/includes/core.classes.php on line 897
The same code runs without errors on the 000webhost server (which also has PHP 5 installed). What I’d like to know is, is it possible to configure PHP 5/Apache 2 to run deprecated code without editing the code itself?
Thanks,
Mike
This might not be the best answer for you, but I would not consider using Mambo anymore after reading this topic.
That guy “andphe” is an admin and programmer for the Mambo project, and he recommended the OP to change
error_reportingsettings. Any PHP programmer worth their salt wouldn’t expect this to fix a fatal error, because allerror_reportingdoes is hide the messages. If you have a fatal error, your code will still not work, no matter what the error reporting level is. You just won’t be able to see the error messages.A mistake like that instills no confidence in the project. I would just move on and use another CMS like Joomla (which is a fork of Mambo) or Drupal, arguably the most popular PHP-based CMS nowadays.