Make Joomla 1.0 work with PHP 5.3

Submit to reddit

With the recent posts regarding resurrecting old stuff, recently I had to resurrect a Joomla 1.0 site. Soon enough I discovered that the home page doesn’t display correctly. No errors, just lots of white space :). The problem is that Joomla 1.0 is not really made for PHP 5.3. Of course I could have started a virtual machine with the right environment but I wanted it running along some newer sites. Here’s an easy fix:

Edit ./includes/Cache/Lite/Function.php, find the line reading

$arguments = func_get_args();

and replace with:

1
2
3
4
5
$arguments = func_get_args();
$numargs = func_num_args();
for($i=1; $i < $numargs; $i++){
$arguments[$i] = &$arguments[$i];
}

Check now, it should be working. Enjoy your new old site 🙂