Fixed network access from PHP apps – but broke WordPress even more… (by )

I upgraded to PHP5 from PHP4, in desperation, and lo, PHP apps can now once more connect to the network.

I'd gone as far as to ktrace an httpd process running a PHP app, and found that it produced an identical syscall trace to PHP run from the command line - up until it tried to read back from the socket, whereupon it gave a one-byte buffer, so read only the first byte, then hung thereafter. While when run from the CLI, the same PHP code gives a buffer of 0x2000 bytes and works fine.

So, I tried the one last thing I could think of (having failed to manage to convince gdb to attach to a running httpd child process) and moved to PHP5.

And, wow, it worked!

At the cost of breaking all our WordPress blogs. They don't show article bodies any more, and output endless complaints to the error log.

Still, now outgoing network access is fixed, webmail works again, my RSS aggregrator works, and it's just occured to me that the recent overwhelming flood of blog spam I've had has probably been due to Akismet being unable to reach its server!

1 Comment

  • By alaric, Fri 28th Dec 2007 @ 2:16 am

    And the answer to the problem with the WordPress blogs was that the Markdown plugin was horribly out of date, but the fact there was a new version wasn't being reported in WordPress' plugins page for some reason, and the installed version didn't work under PHP5 (didn't find out why, just upgraded it then was happy).

    Whew.

Other Links to this Post

RSS feed for comments on this post.

Leave a comment

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales