[solved-ish] DB results not being freed

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Compare the various configs, there's bound to be something different. :)
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

astions wrote:Try setting mysql.trace_mode to off in php.ini.
I researched this issue on google, None of the people having this problem that I found were able to fix it. They were able to supress the errors by turning off mysql.trace_mode.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

~astions - I'm going to name my firstborn after you!

It worked great. Thanks.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 4:21 pm

Post by AKA Panama Jack »

mysql.trace_mode (boolean)

Trace mode. When mysql.trace_mode is enabled, warnings for table/index scans, non free result sets, and SQL-Errors will be displayed. (Introduced in PHP 4.3.0)
Why your server has that enabled is a mystery since it is normally turned off. About the only reason to enable that flag in php is to try and track down queries performing table scans and result sets that aren't being freed by the script before execution ends. Basically a way to help tidy up your mysql queries. It shouldn't be enabled except for testing purposes.
User avatar
Verminox
Forum Contributor
Posts: 101
Joined: Sun May 07, 2006 5:19 am

Post by Verminox »

If you are using PHP5 just edit the class and add a destructor that calls mysql_free_result() and it will work on all the files using that class. If not, then switch, because its better :)

Edit: Oh, was this solved already? Didn't notice the replies on page 2 >_<
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Thanks for the tip. I had actually thought of that, but we're hard core 4.4.1.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply