Following upgrading my version of PHP recently, I needed to do my
homework, and have found a few simple workarounds to get Joomla 1.0
functioning on PHP 5.3.x until I can get to the stage where I can update
the last few sites I have in Joomla 1.0.
To make joomla 1.0.x compatible to PHP 5.3.x, there's a few steps.
First up, if you're getting content not showing on most pages, go to
Function.php files your directory on /public_html/includes/Cache/Lite.
Then replace:
$arguments = func_get_args();
with
$arguments = func_get_args();
$numargs = func_num_args();
for($i=1; $i < $numargs; $i++){
$arguments[$i] = &$arguments[$i];
}
in includes/Cache/Lite/Function.php. It fixes compatibility view issues for Joomla 1.0.x on php 5.3.x.
com_contact White Screen / vcard.class.php error
Depending on which other components you have in your 1.0 site, there may be other items to be fixed.
com_contacts uses the includes/vcard.class.php file, which also needs to be modified to avoid this error:
Fatal error: Cannot redeclare quoted_printable_encode() in includes/vcard.class.php on line 74
In vcard.class.php around line 36 is the function
quoted_printable_encode. This ends up declaring twice, causing the
error, so you can prevent the error and fix the error by checking if the
function already exists, and if it does, PHP ignores the function
declaration. Adding the green lines of code before and after the
existing function clears the problem.
if(!function_exists('quoted_printable_encode')) {
function quoted_printable_encode($input, $line_max=76) {
/* ... */
}
}
Original post for helping with this solution.
Timezones
Another PHP 5.3 change is to how the timezones are set.
The easiest solution I've found for fixing that aspect is to place
some timezone code in the .htaccess file for your site. Assuming you're
using it for SEF URLs already, it will have been renamed from
htaccess.txt, so you should just need to edit your .htaccess file.
Add the following, chaning your timezone to your required timezone:
# set the server timezone
SetEnv TZ Australia/Victoria