Jump to content


PHP $_SERVER error php.ini


1 reply to this topic

#1 JustinMs66

    Young Padawan

  • Members
  • Pip
  • 2 posts
  • Gender:Male
  • Location:EARTH
  • Interests:Programming:<br />PHP<br />Javascript<br />Visual Basic<br />HTML<br />XHTML

Posted 24 March 2007 - 04:14 PM

ok, i finally expanded my file uploads size using this tutorial:
http://wiki.dreamhos...dex.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:
Options +ExecCGI
 AddHandler php-cgi .php
 Action php-cgi /cgi-bin/php.cgi

now ever since i did that, when i try to use:
$_SERVER['SCRIPT_FILENAME']

instead of displaying "filename.php" like it used to, it now displays "php.cgi"

Help?

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 25 March 2007 - 12:33 AM

Php has that bug. When running the various versions of it like that, it will change a couple of the file/url related variables around. I don't know why. I did have this problem, and i fixed it before, but i'm strapt for time, so all i can tell you is how to fix it.
highlight_string(print_r($_SERVER,1));
Run that, and find the appropriate key that has the value you want. If none do, then i don't know what else to do.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users