Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    166
    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:
    58
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. bsasninja

    bsasninja Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    528
    Likes Received:
    0
    Trophy Points:
    166
    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:
    58
    Try adding this to the .htaccess file and check whether it works

    php_flag register_globals on
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. nathacof

    nathacof Member

    Joined:
    Feb 28, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    151
    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...
Similar Threads - Registers globals site
  1. ppjpap
    Replies:
    1
    Views:
    463

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice