Sunday, January 23, 2011

HTTP Requests Fails for WordPress sites after upgrading from PHP 5.2 to PHP 5.3

I've upgraded from Ubuntu 9.10 to 10.04 beta 1 and PHP got upgraded from 5.2 to 5.3 Now all my WordPress & Magento sites arent working. I tried retrieving the URL headers from the command line, but HTTP request fails.

Utilizing get_headers in a small script, PHP Warning: get_headers(http://local.vhosts1.com): failed to open stream: HTTP request failed! in get_headers.php on line 12

But HTTP request fails only for WordPress and Magento based sites - not custom written ones. Does this probably have to do with some htaccess directive ?

  • Check the setting for:

    allow_url_fopen = On
    

    in your php.ini file. It is possible that the code is not using sockets to open the remote sites and is using file_get_contents.

    anjanesh : allow_url_fopen is already On in /etc/php5/apache2/php.ini

0 comments:

Post a Comment