#12029 closed defect (bug) (invalid)
SCRIPT_NAME with CGI script in subdirectory causes failed install
Reported by: | wpmuguru | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Multisite | Keywords: | needs-feedback |
Focuses: | Cc: |
Description
MU Trac Ticket: http://trac.mu.wordpress.org/ticket/502
Background: I have had some difficulty trying to install WordPress? MU for a client (a major university). In this case, PHP is available as CGI, rather than as an Apache Module. The _SERVERSCRIPT_FILENAME? variable is reported as /cgi-php5/php. I managed to resolve the issues through use of a workaround - which I detail below. In this case
Affected functions: Initial installation and usage.
Steps to replicate:
- Install Apache.
- Install PHP as CGI, within a subdirectory of the cgi-bin.
- Attempt to install WordPress? MU.
Analysis:
The "regular" installation instructions will not install WordPress MU.
The problematic _SERVER scoped variables are: _SERVERSCRIPT_FILENAME? which is reported as /usr/local/opt/php/php-5.2.1/bin/php . _SERVERSCRIPT_NAME? which is reported as /cgi-php5/php .
- See also http://wordpress.org/support/topic/33564 for how this affects a regular (non multiuser) installation of WordPress.
- See http://mu.wordpress.org/forums/topic.php?id=5529 for a similar issue in a WordPress? MU installation.
The misconfiguration in the generated configuration files includes:
- $base in generated wp-config.php incorrectly defined as 'cgi-php5'.
- RewriteBase? in generated .htaccess incorrectly defined as 'cgi-php5'.
- the following database values are set incorrectly:
tables for multi-user support:
table name column name column value
wp_blogs path /cgi-php5/
wp_site path /cgi-php5/
the default blog:
table name column name column value
wp_1_comments comment_author_url http://ucl.ac.uk/cgi-php5/
wp_1_options siteurl http://ucl.ac.uk/cgi-php5/
wp_1_options home http://ucl.ac.uk/cgi-php5/
wp_1_options fileupload_url http://ucl.ac.uk/cgi-php5/files
Change History (4)
#2
@
15 years ago
I would tend to say this is not a WordPress problem but a fastcgi configuration problem.
Most webservers and fastcgi implementations give configuration options to make sure that SCRIPT_FILENAME is populated correctly:
lighttpd:
"broken-scriptfilename" => "enable"
http://redmine.lighttpd.net/wiki/1/Docs:ModFastCGI#FastCGI-and-Programming-Languages
nginx:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
http://wiki.nginx.org/PHPFcgiExample
php.ini:
cgi.fix_pathinfo = 1
Is this an issue with WordPress? If not, this probably will not affect enabling a network of sites.