Erian Hendvarden wrote: the_void wrote:
I've been looking at the mysql_free_result() error that lots of people seem to get, and I have located the 2 lines in question i believe have been causing the problem. I am using version 3.0.0
Both the lines are in the includes/functions_abq.php file.
The first error occurs at line 67 ...
I tried the following change to line 63 which i believed would create the $result variable..
Code: Select all
if (!($result = $db->sql_query($sql)))
However this did not remove the error so i ended up commenting line 67 out...
The second error occurs on line 115.
This one i solved by moving it inside the previous if statement (above line 114). This error should only occurs when multiimages is off as i believe it has incorrectly been placed outside the loop.
I hope this helps the people who want to solve the error rather than simply suppress the error message. To date i have had no problems with this solution, and i have not seen any other mysql_free_result() errors.
I took a look at this code also, and I agree with this solution. I've installed this mod with absolutely no problems except this on an already modified 2.0.22 board. Using this fix, it runs great. One suggestion I would like to pass on when installing such mods... don't just make a backup... leave your active board alone so users are not interrupted and (this is assuming shell access, but can also be done via ftp in a round about way) instead make a "sandbox" (you can see mine at sandbox.dubrin.net - it is almost always disabled except when I'm working on it
-- In your main web directory, ABOVE your forum directory, cp -R forum/ sandbox/
-- Edit your config.php to point to a new database (ie. sandbox_ instead of phpBB_)
-- Using your favorite database admin tool (ie phpMyAdmin) COPY your entire structure AND data from your existing database to the new.
-- Then perform all modifications in your sandbox. I, as shown by the link, use a subdomain for quick testing.
-- Don't forget that you need to make ALL database updates to BOTH databases. The sandbox when you begin, and the live forum when you copy the code over.
-- To finish and copy the code over, in main directory ABOVE forums, cp -R sandbox/ forum/
-- And then reedit the config.php (since I use joe I can at this point just do a cp config.php~ config.php) to point to your main database.
Obviously this wont work for everyone, but man does it make debugging so much better because your forum can stay live.
On a side note: I'm adding a little hook to this that will log the IP address of all failed attempts to a file, then upon a successful attempt remove from the file. Then I can periodically take said file and add it to my ban lists on the forum, and to my .htaccess deny list on the entire website. Yay! Die Spammers Die