Page 1 of 2 12 LastLast
Results 1 to 15 of 23

Thread: Can't enable register_globals

  1. #1
    Member
    Join Date
    Apr 2006
    Posts
    57

    Default Can't enable register_globals

    Hello,

    I have register_globals turned off server-wide for what I have been informed of as security reasons, however, I do need to have this turned on for one individual account.

    I initially had register_globals enabled on this particular account through a php_flag in .htaccess, however, I now have enabled phpsuexec, which requires me to move that info to a php.ini.

    I have created a php.ini file with ONLY the following contents in it:
    register_globals = On
    With this uploaded to my public_html folder of the account, register_globals still shows as being off in a phpinfo document.

    Am I doing something wrong here? Is something causing my account's php.ini value to be overwritten? I have some software that will not run properly without register_globals being on.


    Thanks,
    Kyle

  2. #2
    OCX
    OCX is offline
    Member
    Join Date
    Sep 2003
    Posts
    246

    Default

    you can put that code in the .htaccess for individuals.. that need it..thats how i do it


    just put
    php_flag register_globals on

    in your .htaccess file inside public_html folder or where needed

    HTH's

    OCX

  3. #3
    OCX
    OCX is offline
    Member
    Join Date
    Sep 2003
    Posts
    246

    Default

    my bad...i should of read your post more clearly...


    OCX

  4. #4
    Member
    Join Date
    Apr 2006
    Posts
    57

    Default

    I initially had register_globals enabled on this particular account through a php_flag in .htaccess, however, I now have enabled phpsuexec, which requires me to move that info to a php.ini.
    I cant use .htaccess, as I have phpsuexec on my server.


    Kyle

  5. #5
    OCX
    OCX is offline
    Member
    Join Date
    Sep 2003
    Posts
    246

    Default

    Quote Originally Posted by xxkylexx
    I cant use .htaccess, as I have phpsuexec on my server.


    Kyle

    try this in your php.ini for the user

    register_globals = On
    safe_mode = Off


    if safe_mode is on globally, i belive they conflict

    sorry i cant help you further, as i dont use phpsuexec

  6. #6
    Member
    Join Date
    Apr 2006
    Posts
    57

    Default

    No luck. Something is causing all the edits to my web root php.ini's to be overwriten by the global server-wide php.ini. Any ideas?

  7. #7
    OCX
    OCX is offline
    Member
    Join Date
    Sep 2003
    Posts
    246

    Default

    Quote Originally Posted by xxkylexx
    No luck. Something is causing all the edits to my web root php.ini's to be overwriten by the global server-wide php.ini. Any ideas?

    you didnt by chance do a
    chattr +i /../../../php.ini did you?

    IF you did..try
    chattr -i to your php.ini file

    then see if you can edit it..


    i had this issue once..when i had my server admined!


    OCX

  8. #8
    Member
    Join Date
    Apr 2006
    Posts
    57

    Default

    I have never run the command you mentioned above. What does it do?


    Kyle

  9. #9
    OCX
    OCX is offline
    Member
    Join Date
    Sep 2003
    Posts
    246

    Default

    Quote Originally Posted by xxkylexx
    I have never run the command you mentioned above. What does it do?


    Kyle
    it makes it so it cant be edited by root or any other user

    the - i just reverse the process so yo can edit it..IF its be done

    if you didnt do it..then dont bother with that command..


    OCX

  10. #10
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by xxkylexx
    I have register_globals turned off server-wide for what I have been informed of as security reasons, however, I do need to have this turned on for one individual account.
    Do the following, and don't chattr php.ini:
    Edit .htaccess, using your favorite editor, and insert the following directive:
    "php_value register_globals 1"
    Andy Reed
    CCNA, RHCE, and Ubuntu Technologist
    ServerTune.com

  11. #11
    Member
    Join Date
    Apr 2006
    Posts
    57

    Default

    Quote Originally Posted by AndyReed
    Do the following, and don't chattr php.ini:
    Edit .htaccess, using your favorite editor, and insert the following directive:
    "php_value register_globals 1"

    As I mentioned, I have phpsuexec enabled on this server, which eliminates the ability to use .htaccess for php values. These must be done with a php.ini in the web root from what I read.


    Kyle

  12. #12
    Member
    Join Date
    Dec 2003
    Posts
    124

    Default

    Yup, wondering the same thing too. Is it possible to use register_globals for one account?

  13. #13
    Member
    Join Date
    Apr 2006
    Posts
    57

    Default

    It has to be. I have read numerous documents on the net to just create a php.ini in your web root and add "register_globals = On". For some reason, this is being overwritten by my global php.ini which has it disabled.


    Kyle

  14. #14
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by xxkylexx
    As I mentioned, I have phpsuexec enabled on this server, which eliminates the ability to use .htaccess for php values. These must be done with a php.ini in the web root from what I read.
    Yes, you can use some Php directives in .htaccess with Phpsuexec on. Did that synatx do the trick or not?
    Andy Reed
    CCNA, RHCE, and Ubuntu Technologist
    ServerTune.com

  15. #15
    Member
    Join Date
    Apr 2006
    Posts
    57

    Default

    No, sorry. It gave me 500 internal errors on the account. Any other ideas?


    Kyle

Page 1 of 2 12 LastLast

Similar Threads

  1. i need to enable register_globals
    By einSTein86 in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 01-11-2009, 08:28 AM
  2. register_globals on or off ??
    By ctbhost in forum cPanel & WHM Discussions
    Replies: 7
    Last Post: 08-18-2008, 10:53 AM
  3. Replies: 7
    Last Post: 02-02-2006, 05:51 PM
  4. register_globals help please
    By shann in forum cPanel & WHM Discussions
    Replies: 9
    Last Post: 08-10-2005, 11:35 AM
  5. Replies: 34
    Last Post: 06-06-2003, 03:13 PM