NGINX and WordPress help...An Unexpected HTTP Error

sjnims nginx-forum at
Fri Nov 12 20:27:42 MSK 2010

Getting a strange error when I try to browse to the install pages on my
site's wp-admin, running 32-bit Arch, NGINX 0.8.53, PHP 5.3.3
(fpm-fcgi), and so far I've tried this on WP 3.0.0 and 3.0.1.

[code]An Unexpected HTTP Error occurred during the API request.[/code]

The common solution (which did not work for me...or a litany of other
users according to what I've found on google) is to change the timeout
in wp-includes/class-http.php to something greater than or equal to 30

[code]'timeout' => apply_filters( 'http_request_timeout', 5)[/code]

After changing this setting I cleared my browser's cache and still
received error.

Here is my nginx.conf:

[code]user            nginx    nginx;
worker_processes    1;
pid            /var/run/;

events {
    worker_connections    1024;

http {
    real_ip_header        CF-Connecting-IP;
    include            mime.types;
    default_type        application/octet-stream;

    log_format    main    '$remote_addr - $remote_user [$time_local]  '
                '"$request" $status $bytes_sent '
                '"$http_referer" "$http_user_agent" '

    client_header_timeout    3m;
    client_body_timeout    3m;
    send_timeout        3m;

    client_header_buffer_size    1k;
    large_client_header_buffers    4    4k;

    gzip            on;
    gzip_min_length        1100;
    gzip_buffers        4    8k;
    gzip_types        text/plain;

    output_buffers        1    32k;
    postpone_output        1460;

    sendfile        on;
    tcp_nopush        on;

    tcp_nodelay        on;

    keepalive_timeout    75    20;

    include            /etc/nginx/sites-enabled/*;

Here is this vhost's config file:

[code]server {
    access_log    /var/log/nginx/powermybiz.access.log main;
    error_log    /var/log/nginx/powermybiz.error.log;

    location / {
        root    /srv/www/;
        index    index.html    index.htm    index.php;
        try_files $uri $uri/ /index.php?q=$uri&$args;

    location ~ \.php$ {
        root        /srv/www/;
        fastcgi_pass    unix:/var/run/php-fpm/php-fpm.sock;
        fastcgi_index    index.php;
        fastcgi_param    SCRIPT_FILENAME   
        fastcgi_param    PHP_ADMIN_VALUE   
        fastcgi_param    PHP_VALUE    "allow_url_fopen=off";
        include        fastcgi_params;

Before you ask, yes I have tried enabling fopen in both the vhost config
and my php.ini and I have restarted php-fpm and nginx after making those
changes, still to no avail.

Any help is appreciated!

Posted at Nginx Forum:,150188,150188#msg-150188

More information about the nginx mailing list