I'm getting an Apache crash when attempting to parse the feed "http://www.kansascity.com/mld/kansascity/sports/baseball/mlb/kansas_city..." with simplepie.
I think I've eliminated simplepie as the cause, I installed it to my localhost webroot and ran the demo page with the feed url and it parsed it without error.
I think I've also eliminated any kind of drupal configuration problem by creating a fresh drupal install of 5.7, installing feed API and attempting to parse the feed. I do get the error under that circumstance.
Here is the apache error from the log file. When the feed is first created and refreshes (if that option is checked) I get the error one time. Subsequently when refreshing the feed manually I will always get the error twice in succession.
[Sun Feb 24 17:32:13 2008] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Sun Feb 24 17:32:14 2008] [notice] Apache/2.2.0 (Win32) PHP/5.1.2 configured -- resuming normal operations
[Sun Feb 24 17:32:14 2008] [notice] Server built: Dec 11 2005 20:34:33
[Sun Feb 24 17:32:14 2008] [notice] Parent: Created child process 956
[Sun Feb 24 17:32:14 2008] [notice] Child 956: Child process is running
[Sun Feb 24 17:32:14 2008] [notice] Child 956: Acquired the start mutex.
[Sun Feb 24 17:32:14 2008] [notice] Child 956: Starting 150 worker threads.
[Sun Feb 24 17:32:14 2008] [notice] Child 956: Starting thread to listen on port 80.
The windows application event error is this: Faulting application httpd.exe, version 2.2.0.0, faulting module php5ts.dll, version 5.1.2.2, fault address 0x0011330a.
and it is always followed by this SQL error (though this is not the second error I mentioned above): Aborted connection 701 to db: 'drupal57' user: 'root' host: 'localhost' (Got an error reading communication packets)
I worked my way through the code and the error occurs in the set_feed_url call to the function in inc_simplepie.php. If I further trace it in inc_simplpie I get to the preg_replace_callback function called from the normalize_url function. The callback function of percent_encoding_normalization is never reached before the error. I thought that this PHP limitation (http://bugs.php.net/bug.php?id=25754) was the cause and that an extra long match in the regex was killing apache. However my test with simplepie demo in the webroot would seem to suggest the problem is not with simplepie at all.
so I'm stuck... I have no idea how to fix this, I hope I've given you enough information to replicate it...
OS: Windows XP Home (32 bit) Service Pack 2
WAMP: Apache2Triad 1.5.4
Comments
Comment #1
sfeldkamp commentedI forgot to mention that the nodes are parsed and created anyway. So the crash either is not critical and FeedAPI is able to continue or else it happens after the nodes are created. I think it's the former...
Comment #2
aron novakWell, can you make sure that you use the latest version of simplepie? I experienced before that the devel version works better and it's more bug-free often.
http://svn.simplepie.org/simplepie_latest.tar.gz
Other idea: can you try it out with another apache+php build?
At my linux box, the feed can be parsed with the latest devel simplepie without glitch.
Comment #3
sfeldkamp commentedI tried it with the latest simpliepie build this morning as well as the latest build of FeedAPI. I am still getting the error, so I will try a different apache and php build as you suggested. Hopefully it's not a problem stemming from running all of this under windows, as I don't really want to go to the trouble of setting up a dual boot environment. Thanks for trying the feed out on your setup. I'll let you know what I find out...
Comment #4
alex_b commentedgey sfeldkemp. I had similar problems under windows as well.
could you check the following?
go to
function parser_simplepie_feedapi_feed($op)
and return right after
the value "XML feed":
This won't hurt as long as you don't use any non XML feeds. Does this change the erratic behavior?
This issue is PHP5 related, I think.
Comment #5
sfeldkamp commentedthat code is already there and I'm pretty sure it's in the latest version. I read the issue on that and checked it pretty early on.
Comment #6
sfeldkamp commentedI switched to XAMMP and it seems to be working ok now. I got the error one time on refreshing an existing feed, but since then I have not received any error. I wish I knew what the cause of this was, but for now I'm satisfied that it's working and I can move on with development. Thank you for the help and encouragement. You can close this request...
Comment #7
alex_b commentedComment #8
browlands commentedDitto, since siwtching to XAMMP from Apache2Triad the errors have disappeared.