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.

register_globals help please

Discussion in 'General Discussion' started by shann, Aug 8, 2003.

  1. shann

    shann Well-Known Member

    Joined:
    Jul 5, 2002
    Messages:
    366
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Website Owner
    Hi,

    I have changed the php.ini file to make
    register_globals = On

    I have modied php.ini from this location
    /usr/local/lib/php.ini

    I have restated teh apache, also reboot server. It doesn't take take changes it is still showing as Off.

    I am really getting fraustrated with problem,


    Anyhelp would be appreciated.

    cPanel.net Support Ticket Number:
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Make a phpinfo.php file on a domain that you have on your server. Put the following in it:

    PHP:
    <?php
    phpinfo
    ();
    ?>
    Look for the line that says Configuration File (php.ini) Path. This will give you the path to the php.ini file that PHP is reading. You will need to search through that file and find all instances of the term register_globals. You will only need one, if you have more than one, remove them, except for the one. Then change that line to read register_globals = On. Now you will need to restart apache, this can be done with /etc/rc.d/init.d/httpd restart.

    Hope this helps.

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  3. roman

    roman Well-Known Member
    PartnerNOC

    Joined:
    Feb 13, 2002
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Ran into this problem after an "easyapache"..

    Seems like php.ini is required to be in /usr/lib/php.ini now rather than /usr/local/lib/php.ini where it used to be.

    cPanel.net Support Ticket Number:
     
  4. bonnmac

    bonnmac Well-Known Member

    Joined:
    Apr 26, 2003
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    How did you fix this? I in php.ini I have register_globals on but in phpinfo.php it's still showing off. I have restarted apache. It's driving me nuts.

    cPanel.net Support Ticket Number:
     
  5. roman

    roman Well-Known Member
    PartnerNOC

    Joined:
    Feb 13, 2002
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Where is your php.ini located?
    Did you check both locations?

    cPanel.net Support Ticket Number:
     
  6. www-lab

    www-lab Well-Known Member

    Joined:
    Feb 1, 2003
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    If you have Zend installed, make sure to edit this file:

    /usr/local/Zend/etc/php.ini

    Then restart apache using WHM or in ssh

    service httpd restart

    cPanel.net Support Ticket Number:
     
  7. alwaysweb

    alwaysweb Well-Known Member

    Joined:
    Mar 8, 2002
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Dallas, TX
    cPanel Access Level:
    Root Administrator
    Can anyone help with this? I'm having this issue with a new server as well.

    register_globals is is "On" in my php.ini file: /usr/local/Zend/etc/php.ini

    register_globals = On

    but in the phpinfo() output at:

    http://server5.alwayswebhosting.com/phpr.php

    it always reports "register_globals Off"

    I've restarted httpd several times, and even rebuilt http/php via cpanel's "/scripts/easyapache" but it still persists and is "Off". I need it on, can you help?


    (I also checked /usr/lib/php.ini and /usr/local/lib/php.ini -- even though those aren't the Configuration File (php.ini) Path mentioned in the phpinfo() and they all have register_globals = On) Ideas?
     
  8. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Ensure the register_globals variable is not listed in /usr/local/Zend/etc/php.ini more than once. If there is a duplicate of the line for some reason, the second one will override the first, so ensure there is only 1.
     
  9. alwaysweb

    alwaysweb Well-Known Member

    Joined:
    Mar 8, 2002
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Dallas, TX
    cPanel Access Level:
    Root Administrator
    Thanks for the tip, that is one thing I checked initially when troubleshooting this as I knew about overriding of values... And in fact there is just one entry, and I have double-checked that now (around line 195 in our php.ini)

    Any other ideas?
     
  10. alwaysweb

    alwaysweb Well-Known Member

    Joined:
    Mar 8, 2002
    Messages:
    97
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Dallas, TX
    cPanel Access Level:
    Root Administrator
    Figured it out -- we had a syntax error in our php.ini (noticed it when we did a /scripts/easyapache rebuild and I monitored the output):


    make php-4.3.11...(install)..........Done
    initfpsuexec: using apache 1.x support
    PHP version file is up to date
    Executing /scripts/postbuildapache (if exists)...Done
    PHP: Error parsing /usr/local/Zend/etc/php.ini on line 110
    /etc/rc.d/init.d/httpd start: httpd started



    After troubleshooting further I noticed around line 110 that we had:


    disable_functions = disable_functions = dl,exec,passthru,proc_open,proc_close,shell_exec,system


    disable_functions was listed twice syntactically incorrect... Fixed this, and in our phpinfo() output now for sites register_globals is behaving! Thanks gang!
     
Loading...

Share This Page