The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP -- Register_Globals

Discussion in 'General Discussion' started by allenhui, Mar 27, 2004.

  1. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    I have change Register_Globals in the /etc/php.ini .
    Also restart httpd but the Register_Globals still don't work.
    What i need to do to turn it on?
     
  2. foxboy

    foxboy Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    are you using phpsuexec?
     
  3. fishfreek

    fishfreek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    238
    Likes Received:
    0
    Trophy Points:
    16
    create teh file

    <?php
    phpinfo();
    ?>

    and save it in your webspace and call your browser. Make sure you name it .php something.

    Look for the php.ini path in the first part of the page output.
     
  4. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    i'm having same problem...

    any ideas?

    and what am i looking for in the phpinfo() file?

    i'm at usr/local/lib/php.ini and my globals are ON and have been.
    This problem just started happening recently - and i never changed anything with server..

    HELP: lol

    rYno
     
    #4 ryno267, Mar 29, 2004
    Last edited: Mar 29, 2004
  5. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    EDIT...

    Just installed Zend Optimizer and it moved my php.ini to usr/local/Zend/etc/php.ini but everything is still on and it doesnt work.

    in my phpinfo() file it says
    "allow_url_fopen | On | On"
    but when trying to use any script that includes another file...
    like this error comes up:
    "Warning: fopen(config.php): failed to open stream: No such file or directory in /home/myusername/public_html/script/setup.php on line 990"

    BUT there in fact IS the config.php file and it IS chmod 777

    something is wrong with server to where it won't allow any chmodding or something
    I'm lost...

    need help
     
  6. foxboy

    foxboy Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    let me ask it again,
    are you using phpsuexec?
     
  7. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    as far as I know.... NO....

    Am i right by saying this?... the problem i'm having is a php.ini directory path problem?

    IDK.. but the more i read about this phpsuexec... the more of a headache it sounds. I think i'm glad I don't have it on there as 99% of people seem to hate it if their host has it...
     
  8. fishfreek

    fishfreek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    238
    Likes Received:
    0
    Trophy Points:
    16
    phpsuexec is not a headace if you understand it.

    No php script can have execute permissions for example. All phpscripts should be owned by the account owner and not by nobody.

    no php_value entries in the .htaccess file. Instead create a local php.ini file in the same folder as the .htaccess file and put the php_value entries in there.

    The reason to look at the php.ini path in phpinfo is to make sure you know where php is lookig for its config file. As you have noted after installing zend the php.ini file is moved from its default and expected location but if the new path is listed in phpinfo then things are ok as far as where its located.
     
  9. foxboy

    foxboy Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    note that if you use php as a apache module you have to restart apache (httpd restart) after changing php.ini
     
  10. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    have plenty of times... i know that though... thanks... still doesnt solve problem....

    this thing is killin me... :confused:
     
  11. jeffheld

    jeffheld Active Member

    Joined:
    Jan 7, 2004
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    financial capital
    don't die. software can't kill, it can only annoy.
     
  12. pvps

    pvps Member

    Joined:
    Feb 27, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    we've had similar problems where changes made in the php.ini file shown by phpinfo do not take effect after a httpd restart - phpsuexec ian't the culprit as it's not enabled, but it is strange.
     
Loading...

Share This Page