Problems with fastcgi php migration

Fernando Perez lists at ruby-forum.com
Wed Mar 12 02:01:18 MSK 2008


Hi Ian,

I've just lost 4 hours trying to make phpmyadmin work. The problem was 
not passing the correct fastcgi_param.

Here is my fastcgi.conf file, try including it to your conf file:

-----------------------------------------------
# /etc/nginx/fastcgi.conf
fastcgi_param  PATH_INFO          $fastcgi_script_name;

# GATEWAY_INTERFACE is required otherwise python bugs
fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;

fastcgi_param  SERVER_SOFTWARE    nginx;

# Required otherwise the .cgi content is served as plain text
fastcgi_param  QUERY_STRING       $query_string;

# Required for dealing with POST requests
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;

# SERVER_PORT and SERVER_NAME are required
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
#fastcgi_param REDIRECT_STATUS    200;
------------------------------------------------------------------

Also make sure you have SCRIPT_FILENAME correctly set, but it should be 
as you can see some stuff being rendered.


Best regards,
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list