Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#12029 closed defect (bug) (invalid)

SCRIPT_NAME with CGI script in subdirectory causes failed install

Reported by: wpmuguru's profile wpmuguru Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Multisite Keywords: needs-feedback
Focuses: Cc:


MU Trac Ticket:

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.


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 .

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
wp_1_options siteurl
wp_1_options home
wp_1_options fileupload_url

Change History (4)

#1 @wpmuguru
14 years ago

Is this an issue with WordPress? If not, this probably will not affect enabling a network of sites.

#2 @sivel
14 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:

"broken-scriptfilename" => "enable"
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
cgi.fix_pathinfo = 1

#3 @wpmuguru
14 years ago

  • Resolution set to invalid
  • Status changed from new to closed

I was wondering about the configuration as well. Fastcgi under nginx needs that cgi.fix_pathinfo = 1 as well.

#4 @nacin
14 years ago

  • Milestone Unassigned deleted
Note: See TracTickets for help on using tickets.