Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Sep 2004
    Posts
    521

    Question Registers globals OFF but on in a site.

    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. #2
    Member
    Join Date
    Nov 2008
    Posts
    76

    Default

    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
    Regards,
    Jay J,
    HostingZoom | ResellerZoom |
    modVPS

  3. #3
    Member
    Join Date
    Sep 2004
    Posts
    521

    Default

    no, the server has no suphp enabled. So how is the thing then?

  4. #4
    Member
    Join Date
    Nov 2008
    Posts
    76

    Default

    Try adding this to the .htaccess file and check whether it works

    php_flag register_globals on
    Regards,
    Jay J,
    HostingZoom | ResellerZoom |
    modVPS

  5. #5
    Member
    Join Date
    Feb 2007
    Posts
    17

    Default

    Quote Originally Posted by hzJayJ View Post
    Try adding this to the .htaccess file and check whether it works

    php_flag register_globals on
    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.

Similar Threads & Tags
Similar threads

  1. registrer globals
    By ullalla in forum New User Questions
    Replies: 9
    Last Post: 12-27-2006, 09:42 PM
  2. register globals on one user
    By NoAgendas in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-03-2006, 11:43 PM
  3. Register Globals??
    By damainman in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-08-2004, 03:20 PM
  4. Turning Register Globals ON
    By d-woo in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-11-2003, 08:25 PM
  5. Switching Register Globals to Off
    By Cubie in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-24-2003, 04:34 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube