I'm on a shared apache2 host. PHP runs under mod_fcgid.
I've installed my own php5 binary which overrides use of the system's default, (php v5.2.6),
~/public_html/mydomain.com/cgi-bin/php5.cgi -v | grep cgi-fcgi PHP 5.2.7-dev (cgi-fcgi) (built: Jul 1 2008 09:14:51)
I've installed Drupal in,
~/public_html/mydomain.com/apps/drupal
i've copied a 'standard' phpinfo() file,
cat info.php <?php phpinfo (); ?>
to,
cp info.php ~/public_html/mydomain.com/info_webroot.php cp info.php ~/public_html/mydomain.com/apps/drupal/info_drupalroot.php
@ nav to each of the following URLs, I see:
(1) http://mydomain.com/info_webroot.php "PHP Version 5.2.7-dev" ...
(2) http://mydomain.com/info_drupalroot.php "No input file specified."
(3) http://mydomain.com/apps/drupal/info_drupalroot.php "PHP Version 5.2.7-dev" ...
(4) http://mydomain.com/admin/reports/status/php "PHP Version 5.2.6" ...
My goal is to have all four tests show the same, "PHP Version 5.2.7-dev" ...
What's wrong with my .htaccess config?
Details:
.htaccess in webroot (~/public_html/mydomain.com/.htaccess) contains,
Options +FollowSymLinks +ExecCGI -Indexes RewriteEngine on RewriteBase /
RewriteCond %{REQUEST_URI} !^favicon.ico$ RewriteCond %{REQUEST_URI} !^/robots.txt$ RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^(.+.php)$ /cgi-bin/dispatch.fcgi/$1 [L]
AddHandler fcgid-script .fcg .fcgi .fpl #FCGIWrapper "/home/mydomain/public_html/cgi-bin/dispatch.fcgi -c/home/mydomain/conf/php5/php-cgi-fcgi.ini" .php FCGIWrapper "/home/pgnet/public_html/mydomain.com/cgi-bin/dispatch.fcgi -c/home/pgnet/etc/php5/mydomain.com/php-cgi-fcgi.ini" .php
RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC] RewriteRule ^$ apps/drupal/index.php [L] RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC] RewriteCond %{DOCUMENT_ROOT}/apps/drupal%{REQUEST_URI} -f RewriteRule .* apps/drupal/$0 [L] RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* apps/drupal/index.php?q=$0 [QSA]
where,
cat /home/pgnet/public_html/mydomain.com/cgi-bin/dispatch.fcgi #!/bin/bash export PHPRC=/home/pgnet/etc/php5/mydomain.com export PHP_FCGI_CHILDREN=2 exec /home/pgnet/public_html/mydomain.com/cgi-bin/php5.cgi
I changed Drupal's .htaccess (~/public_html/mydomain.com/apps/drupal/.htaccess)
- <IfModule mod_rewrite.c> + <IfModule XXXmod_rewrite.c>