Ticket #985 (closed support request: fixed)

Opened 13 months ago

Last modified 2 months ago

Unexpected Output

Reported by: webzine@… Owned by: omry
Priority: Normal Milestone:
Component: FireStats Version: 1.6
Severity: Normal Keywords:
Cc:

Description

Hi,

and first thanks for your plugin ! Despite my little issue, everything else is perfect.

So here's the point :

I work with Wordpress 2.7.1 but I always had this issue with Firestats (any version) and Wordpress (any version too). I installed Firestats separatly from Wordpress.

When I first go to the FireStats page I always get a database error connection with that message:

Sortie inattendue :
Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /homez.13/chuchumu/www/marmuz/wp-content/plugins/firestats/lib/ezsql/mysql/ez_sql_mysql.php on line 184

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /homez.13/chuchumu/www/marmuz/wp-content/plugins/firestats/lib/ezsql/mysql/ez_sql_mysql.php on line 184

Then, I close the error window and everything go well.

I read the ticket #373 and tried to disable the Mutex synchronisation with no effect.

So I imagine that it comes from my website provider, but I dont exactly know what to say them so that they try to modify something to solve this issue.

I join you the last phpinfo I got, hope that it will help.

Thanks for your help. Stephane

Attachments

info.php.htm (32.1 kB) - added by webzine@… 13 months ago.
Php Info

Change History

Changed 13 months ago by webzine@…

Php Info

Changed 13 months ago by omry

  • type changed from bug to support request

Hi, This is probably because your web host is limiting you to a single database connection from PHP at once.

once thing to do would be to ask them to raise the limit, another would be to try to put FireStats inside the same database as WordPress. not sure it will solve the problem, but it might.

Changed 13 months ago by anonymous

Thanks for your answer,

actually Firestats is installed in the same database as Wordpress (tables begin with "wp_firestats_", right ?) and I contacted my web host (Ovh.com) who told me that they allowed 3 connection at a time.

So I don't know where it could come from. If you have any other idea...

Thanks Stephane

Changed 13 months ago by omry

  • status changed from new to closed
  • resolution set to fixed

3 is also a low number. another plugin may also be using it's own connection.

I just found a bug in FireStats that caused it to open a new mysql connection always. this was not the intended behavior and it can cause problems in rare cases.

the other behavior of reusing an existing connection will cause problems to more people and I wont change this default behavior in a minor version, but I added a new configuration option to the conf.php file (sample-conf.php) that allow you to override this behavior :

{{[ #define('MYSQL_NEW_LINK',false); }}}

to use it, download FireStats 1.6.2-stable when it's out, copy sample-conf.php to conf.php, and uncomment that line (remove the prefix # from the define line).

if you want to try it before 1.6.2 is out, this is the changeset that fixes the problem: [2135]. you can manually apply it's changes to your FireStats before following the above instructions. (not many changes).

Changed 13 months ago by webzine@…

Hi,

thanks for your answer.

I made the changes to test. If I apply everything that I found in the changeset [2135], i.e. including conf.php it, doesn't work anymore. I get the Firestats countdown... then no stats is refreshed. If I don't change the conf.php line, then I get the same behavior as previously.

So as you say it does probably comes from the low number of connections allowed.

I'll get the 1.6.2 when it's available and tell you if it does change anything.

Changed 2 months ago by Alexa

Resource: Norton Voucher

Add/Change #985 (Unexpected Output)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.