Today, I decided to upgrade my PHP installation from version 3.2 to 4.4.1. ![]()
Initially, I tried upgrading to PHP 5 but sad to say it’s more complicated than I thought and I didn’t have much time to tinker on it since I’m quite busy with work. For some reasons the default PHP MySQL client was removed on PHP 5 and I’m still not sure on how to add this module back, so the next best version I can install was PHP 4.4.1 so I went for it. Everything went well during the installation of PHP 4.4.1 except for one of my site where I host a Simple Machine Forum. ![]()
After upgrading to PHP 4.4.1 I wasn’t able to login to my Simple Machine forum and I’m getting prompted to check my browser’s cookie settings. I was surprised to see such error since I haven’t changed any cookie settings in the browsers I used (IE, Firefox, and Opera), but nevertheless I double checked and it seems ok to me.
Next thing I did was to check the error logs of my forum site and found this line:
Only variables should be assigned by reference in …/Sources/Subs.php on line 232
And looking at the line of the code mentioned in the error log it was something like this:
$ret = &mysql_query($db_string, $db_connection);
So there was the culprit for the problem. After much tinkering and research on the changes from PHP 3.2. to PHP 4.4.1, I finally found the solution. It was as simple as rewriting the above line to:
$ret = mysql_query($db_string, $db_connection);
Well, after the change, everything went well for my Simple Machine Forum and users were able to login again. ![]()
Popularity: 3% [?]