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.

Registers globals OFF but on in a site.

Discussion in 'General Discussion' started by bsasninja, Mar 24, 2009.

  1. bsasninja

    bsasninja Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    528
    Likes Received:
    0
    Trophy Points:
    16
    I set register globals off in my php.ini. But I want to set it ON only at one site.

    Putting it in the .htaccess will set it to on although is off in the main php.ini of the server? or I have to add the line to the vhost??

    php_value register_globals on

    Thanks!
     
  2. hzJayJ

    hzJayJ Well-Known Member

    Joined:
    Nov 14, 2008
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    If the server is suphp enabled then enabling the register_globals through the .htaccess file will not work.

    For this you need to create a custom php.ini file under your public_html folder and add the following:

    PHP Code:
    register_globals = 1
     
  3. bsasninja

    bsasninja Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    528
    Likes Received:
    0
    Trophy Points:
    16
    no, the server has no suphp enabled. So how is the thing then?
     
  4. hzJayJ

    hzJayJ Well-Known Member

    Joined:
    Nov 14, 2008
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    Try adding this to the .htaccess file and check whether it works

    php_flag register_globals on
     
  5. nathacof

    nathacof Member

    Joined:
    Feb 28, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I'm familiar with the php_admin_engine, but where the heck does the AllowOverride Options setting go?

    Ref: PHP: How to change configuration settings - Manual

    root@server [~]# find /usr/local/apache/conf/ -name "*.conf" -type f -exec grep -H AllowOverride '{}' ';'
    /usr/local/apache/conf/access.conf:AllowOverride All
    /usr/local/apache/conf/includes/pre_virtualhost_global.conf: AllowOverride Options
    /usr/local/apache/conf/httpd.conf: AllowOverride All
    /usr/local/apache/conf/httpd.conf: AllowOverride None
    /usr/local/apache/conf/httpd.conf: AllowOverride None
    /usr/local/apache/conf/httpd.conf: AllowOverride None
    /usr/local/apache/conf/httpd.conf: AllowOverride None
    /usr/local/apache/conf/httpd-std.conf: AllowOverride None
    /usr/local/apache/conf/httpd-std.conf:# AllowOverride controls what directives may be placed in .htaccess files.
    /usr/local/apache/conf/httpd-std.conf: AllowOverride None
    /usr/local/apache/conf/httpd-std.conf:# AllowOverride FileInfo AuthConfig Limit Indexes
    /usr/local/apache/conf/httpd-std.conf:# for additional configuration directives. See also the AllowOverride
    /usr/local/apache/conf/httpd-std.conf: AllowOverride None
    /usr/local/apache/conf/httpd-std.conf: AllowOverride None
    /usr/local/apache/conf/httpd-std.conf: AllowOverride None
    /usr/local/apache/conf/httpd-std.conf:# AllowOverride None
    /usr/local/apache/conf/highperformance.conf: AllowOverride None
    /usr/local/apache/conf/highperformance-std.conf: AllowOverride None

    I've tried a number of different includes but still getting 500 errors when trying to configure PHP from within an .htaccess file.
     
Loading...

Share This Page