How to run Mambo 4.5.3 on PHP 5.3.1?

apps

#1

I have a website which runs on Mambo 4.5.3, which runs fine on PHP 5.1.6

I plan to move the website to a new hosting, but the new hosting uses PHP 5.3.1. When I ran the website, I got the following error.

Warning: Parameter 2 to frontpage() expected to be a reference, value given in D:\xampp\htdocs\en\includes\Cache\Lite\Function.php on line 100

When I set the display_errors parameter to ‘Off’. the error message disappeared. However, the website does not run normally. Several pics disappear, and some pages doesn’t show either.

Furthermore, when I chechked the page source from Firefox, I found that certain PHP lines are not rendered properly. For example, in the new hosting PHP 5.3.1), these PHP lines are NOT properly rendered to HTML.

[quote=“PHP 5.3.1 does not render the lines properly”]

<img src="<?=$mosConfig_live_site."/templates/".$cur_template?>/images/menu1.gif"> Latest News ... /images/menu2.gif"> [/quote]

[quote=“PHP 5.1.6 renders the lines properly”]

Latest News ... [/quote]

You see, PHP 5.1.6 properly renders the $mosConfig_live_site PHP variable to http://www.mywebsite/en/, while PHP 3.1.6 does not.

Furthermore, when I opened the Mambo Admin page, all the icons disappear, as shown on the screenshot below.

FYI, the website runs fine on Mambo 5.16. For instance, the Mambo Admin page runs normal on PHP 5.1.6

I just don’t have time to migrate the website to newer version of Mambo, or to Joomla. Is there any changes in Mambo that I should do?

Many thanks,


#2

Neither PHP 5.1.6 nor PHP 5.3.1 are currently in use at DreamHost, so I’m not sure how this relates. My first guess would be that you have enable_short_tags turned off for PHP 5.3, though.


#3

I see. I’ll try it, thank you![hr]
Well, it fixes the problem, but not entirely.

Now the Mambo Admin menu is fine. However, page contents still disappears. I suspect this is database problem, am I correct? Does Mambo access the database in a way that PHP 5.3 doesn’t like?

Also, this message still apperas:
Warning: Parameter 2 to frontpage() expected to be a reference, value given in D:\xampp\htdocs\en\includes\Cache\Lite\Function.php on line 100


#4

EUREKA!

I found the answer somewhere, buried in the Mambo Foundation forum, and here is the step:

I modified the file includes/Cache/Lite/Function.php in my mambo folder, changing the following lines:

function call() { $arguments = func_get_args(); $numargs = func_num_args(); $id = serialize($arguments); // Generate a cache id

Into:

function call() { $arguments = func_get_args(); $numargs = func_num_args(); for($i=1; $i < $numargs; $i++){ $arguments[$i] = &$arguments[$i]; } $id = serialize($arguments); // Generate a cache id