Ticket #2733 (closed defect (bug): fixed)
Value in class-snoopy.php is set too high and can sometimes cause problems
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 2.0.3 |
| Severity: | normal | Keywords: | snoopy, fread, wp-slimstat, dashboard |
| Cc: | jeremy.visser@… |
Description
Please read footnote at the bottom.
I use WordPress 2.0.2 which contains a copy of Snoopy 1.2.3.
I recently ran into a problem where the Dashboard would simply terminate with no feedback whatsoever during a call to fread() in the _httprequest() function in wp-includes/class-snoopy.php while my wp-slimstat plugin was activated.
After many hours of debugging, I found that changing the default value of $maxlength from 500000 to 8192 fixed the problem.
At first, I thought this was due to the WP-SlimStat plugin being activated, but later I concluded it was just because of the extra memory used by he plugin that was tipping the memory limit over.
I think that the default value should be permanently changed to 8192, because according to the PHP documentation on fread() ( http://www.php.net/manual/en/function.fread.php) the reading of file will stop at 8192 bytes anyway, so having the value of $maxlength any higher would be pointless, and in my case, cause problems.
Regards, Jeremy.
This is a modified copy of the bug report I filed at http://sf.net/projects/snoopy/. The folks at Snoopy seem to be pretty idle, because I haven't had any feedback on my bug report, but I really would like this fixed as it does appear to cause problems with certain configurations in WordPress. I would like to see this fixed in the Snoopy included with WP, as it won't really harm anything to change the value from 500000 to 8192.
Attachments
Change History
comment:1
JeremyVisser — 6 years ago
- Version changed from 1.2 to 2.0.2
JeremyVisser — 6 years ago
-
attachment
class-snoopy.php.diff
added
A patch for class-snoopy.php to make the requested changes
comment:2
JeremyVisser — 6 years ago
- Cc jeremy.visser@… added
- Version changed from 2.0.2 to 2.0.3
- Milestone changed from 2.0.3 to 2.0.4
Note: in php.ini, setting the memory limit to 16M also fixes the problem. This makes this fix more like a workaround. It should still be fixed.
- Status changed from new to closed
- Resolution set to fixed
comment:6
JeremyVisser — 6 years ago
Thankyou very much!

I changed the version to say 2.0.2, which I am using. I'm new to Trac, so I didn't realise that the 1.2 meant WP 1.2!