SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Sep 2001
    Location
    Nashville, TN, USA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP4.0.6 help - common server variables not being set.

    I need help with PHP4.0.6 which I just resently compiled and installed. When I ran a few scripts of mine that I created and used for just playing around with on one of my friend's server on my apache web server, I noticed the common variables were not set nor did the varaibles set when using form action POST or GET.



    For Example, when I goto url http://www.mysite.com/myfile.php?showpage=17



    well, variable $showpage doesn't set, could this be caused by a misconfigured installation of PHP? :(



    The reason why I think the common server varaibles aren't being set because they are basicly not being set, $REMOTE_ADDR is always empty, $REMOTE_PORT is empty, $HTTP_USER_AGENT is empty, and etc...



    I know this is a very odd problem and I've never heard of PHP doing this, if anyone knows the solution then please post a reply with some information or link to an article to fix this problem, thanks.
    /---\
    | | <-- A Box, Keep an Open Mind...
    \---/
    Think outside of it. :P

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have to say this but did you read the documentation that came with the source? all the READMEs and INSTALL? Also go through the php.ini file and read the internal documentation. It sounds like you will just have to turn a few things on in php.ini such as register_globals. I would not be surprised to hear that these things have been turned off by default in more recent releases such as 4.0.6 because they should be for security! The sys admin should decide if to turn such things on IMHO. Don't forget that the source comes with several versions of php.ini for you to choose from as well.

  3. #3
    SitePoint Member
    Join Date
    Sep 2001
    Location
    Nashville, TN, USA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ohh, there are different php.ini file versions? well I didn't know that, thanks! I have already gone thru the php.ini that I already had from when I installed RedHat 7.0, but I guess I missed a few things or I'll just use one of the php.ini files that came with the source code.

    By the way, I followed this article to install and get php working: http://www.mysql.com/articles/ddws/6.html

    Very good article. :)
    /---\
    | | <-- A Box, Keep an Open Mind...
    \---/
    Think outside of it. :P

  4. #4
    SitePoint Wizard
    Join Date
    Apr 2000
    Posts
    1,483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure both track_vars and register_globals are enabled. This should solve your problems

    I recommend using the php.ini-dist file as your php.ini. You'll find it somewhere and I believe it already has these options enabled (whereas php.ini-optimized doesn't).

  5. #5
    SitePoint Member
    Join Date
    Sep 2001
    Location
    Nashville, TN, USA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks freakysid!

    editing php.ini and changing register_globals to On fixed the problem :)

    hmmmm, now it seems MySQL server wasn't installed or not installed in the correct path O_O

    I guess I'll return shortly if I run into a few problems or misconfiguration. ;)
    /---\
    | | <-- A Box, Keep an Open Mind...
    \---/
    Think outside of it. :P


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •