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 issue

Discussion in 'General Discussion' started by vietkool, Oct 23, 2005.

  1. vietkool

    vietkool Active Member

    Joined:
    May 17, 2004
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Hi,
    my site needs to have Register_globals = ON in oeder to work, I went to usr/local/lib/php.ini and edit the register_globals = On saved and get out, restart apache then go to one of the webiste run info.php . it still showing register_globals = off.

    is there anything I need to do ?
     
  2. chris74108

    chris74108 Well-Known Member

    Joined:
    Apr 30, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    slocate php.ini
     
  3. vietkool

    vietkool Active Member

    Joined:
    May 17, 2004
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    /scripts/php.ini
    /etc/php.ini
    /home/cpapachebuild/buildapache/php-4.4.1/php.ini-recommended
    /home/cpapachebuild/buildapache/php-4.4.1/pear/tests/php.ini
    /home/cpapachebuild/buildapache/php-4.4.1/php.ini-dist
    /home/cpins/installd/buildapache/php-4.3.11/php.ini-recommended
    /home/cpins/installd/buildapache/php-4.3.11/pear/tests/php.ini
    /home/cpins/installd/buildapache/php-4.3.11/php.ini-dist
    /home/cpzendinstall/ZendOptimizer-2.5.10-linux-glibc21-i386/zui_files/php.ini
    /home/cpzendinstall/ZendOptimizer-2.5.10-linux-glibc21-i386/zui_files/_usr_local_lib_php.ini
    /usr/lib/php.ini
    /usr/local/lib/php.ini-zend_optimizer.bak
    /usr/local/lib/php.ini.new
    /usr/local/lib/php.ini
    /usr/local/cpanel/3rdparty/lib/php.ini
    /usr/local/cpanel/3rdparty/etc/php.ini
    /usr/local/Zend/etc/php.ini
    /var/cpanel/version/php.ini-2


    which one is the correct php.ini that Ihave to do the eidt turn the register_globals = On
    here is my php report info. http://204.11.96.242/~vuonongb/info.php <<< look at line Register_global . it's at OFF state now... I Need it ON so I can run my web script
    help please
     
  4. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    This from your phpinfo.php first box:
    Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini

    With Zend installed you will find it should be this one:
    /usr/local/Zend/etc/php.ini
    :)
     
    #4 Izzee, Dec 8, 2005
    Last edited: Dec 9, 2005
  5. vietkool

    vietkool Active Member

    Joined:
    May 17, 2004
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    yeah... I went in there and edit the register_globals = On, saved and get out, reboot the server then run php output info. It still showing Register_global = Off

    any Idea how to fix it ?
     
  6. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    According to your phpinfo.php file your register globals are now set to On in the Local Value column but is still Off in the Master value column.
    Try and locate the php.ini file with the register globals still set to Off now as this might well be your Master php.ini file.

    The Local Value is ok as this is what will be turned on by the following proceedure with a .htaccess file anyway.

    Future reference if you don't have phpSuexec installed you can set that directive in a .htaccess file in the directory the script is called from.

    php_flag register_globals 1

    This will over rule the global php.ini file.

    Now try your script again to see if it is now working for you.
    :)
     
    #6 Izzee, Dec 9, 2005
    Last edited: Dec 9, 2005
  7. vietkool

    vietkool Active Member

    Joined:
    May 17, 2004
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    I have to do manually each account a php_flag register_globals On in .htacces file in order to make the script to work. but I affraid if doing like that will cause the security problem. ( don no).
    By checking the master php.ini, it is showing register_globals On already but when I do the php info outout It still OFF state. so strange.
    Here is my location of the php.ini

    /scripts/php.ini
    /etc/php.ini
    /home/cpapachebuild/buildapache/php-4.4.1/php.ini-recommended
    /home/cpapachebuild/buildapache/php-4.4.1/pear/tests/php.ini
    /home/cpapachebuild/buildapache/php-4.4.1/php.ini-dist
    /home/cpins/installd/buildapache/php-4.3.11/php.ini-recommended
    /home/cpins/installd/buildapache/php-4.3.11/pear/tests/php.ini
    /home/cpins/installd/buildapache/php-4.3.11/php.ini-dist
    /home/cpzendinstall/ZendOptimizer-2.5.10-linux-glibc21-i386/zui_files/php.ini
    /home/cpzendinstall/ZendOptimizer-2.5.10-linux-glibc21-i386/zui_files/_usr_local_lib_php.ini
    /usr/lib/php.ini
    /usr/local/lib/php.ini-zend_optimizer.bak
    /usr/local/lib/php.ini.new
    /usr/local/lib/php.ini
    /usr/local/cpanel/3rdparty/lib/php.ini
    /usr/local/cpanel/3rdparty/etc/php.ini
    /usr/local/Zend/etc/php.ini
    /var/cpanel/version/php.ini-2
     
  8. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    To set register_globals to ON, you will have to make the change in /usr/local/Zend/etc/php.ini file. Set Register_globals = ON and save the file.
    BTW your phpinfo file shows Register_globals set to ON for both Master and Local value.
     
  9. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    This is an old thread and I did mention this at the time nearly 3 weeks ago as you can see. He obviously found the master php.ini file and correctly set the register global directive. :rolleyes:
     
  10. wzd

    wzd Well-Known Member

    Joined:
    Dec 16, 2005
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page