Page 1 of 1

PHP $_SERVER error php.ini

Posted: Sat Mar 24, 2007 4:33 pm
by JustinMs66
ok, i finally expanded my file uploads size using this tutorial:
http://wiki.dreamhost.com/index.php/PHP.ini

so i now, in my /home/username/website.com/cgi-bin/, have my custom php.cgi and php.ini files.

now to enable them for usage i had to put this in the .htaccess file:

Code: Select all

Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi
now ever since i did that, when i try to use:

Code: Select all

$_SERVER['SCRIPT_FILENAME']
instead of displaying "filename.php" like it used to, it now displays "php.cgi"

Help?

Posted: Thu Mar 29, 2007 8:25 am
by Benjamin
My hunch says that your running php as a CGI binary rather than a built in apache module, it would only make sense for it to show up like that.

Perhaps you should look into using $_SERVER['REQUEST_URI']; or something like that.

It's fairly easy to parse...