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.

Can't enable register_globals

Discussion in 'General Discussion' started by xxkylexx, Jun 3, 2006.

  1. xxkylexx

    xxkylexx Well-Known Member

    Joined:
    Apr 29, 2006
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    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:
    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. OCX

    OCX Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    232
    Likes Received:
    0
    Trophy Points:
    16
    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. OCX

    OCX Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    232
    Likes Received:
    0
    Trophy Points:
    16
    my bad...i should of read your post more clearly...


    OCX
     
  4. xxkylexx

    xxkylexx Well-Known Member

    Joined:
    Apr 29, 2006
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    I cant use .htaccess, as I have phpsuexec on my server.


    Kyle
     
  5. OCX

    OCX Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    232
    Likes Received:
    0
    Trophy Points:
    16

    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. xxkylexx

    xxkylexx Well-Known Member

    Joined:
    Apr 29, 2006
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    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. OCX

    OCX Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    232
    Likes Received:
    0
    Trophy Points:
    16

    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. xxkylexx

    xxkylexx Well-Known Member

    Joined:
    Apr 29, 2006
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    I have never run the command you mentioned above. What does it do?


    Kyle
     
  9. OCX

    OCX Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    232
    Likes Received:
    0
    Trophy Points:
    16
    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. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    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"
     
  11. xxkylexx

    xxkylexx Well-Known Member

    Joined:
    Apr 29, 2006
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6

    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. Mysteerie

    Mysteerie Well-Known Member

    Joined:
    Dec 29, 2003
    Messages:
    129
    Likes Received:
    0
    Trophy Points:
    16
    Yup, wondering the same thing too. Is it possible to use register_globals for one account?
     
  13. xxkylexx

    xxkylexx Well-Known Member

    Joined:
    Apr 29, 2006
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    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. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Yes, you can use some Php directives in .htaccess with Phpsuexec on. Did that synatx do the trick or not?
     
  15. xxkylexx

    xxkylexx Well-Known Member

    Joined:
    Apr 29, 2006
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    No, sorry. It gave me 500 internal errors on the account. Any other ideas?


    Kyle
     
  16. sleddog

    sleddog Active Member

    Joined:
    Jun 13, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Labrador, Canada
    You probably already know this, but thought I'd mention it to be sure...

    When you use a php.ini file it does not work recursively. You must place a copy of the php.ini in every directory where you want it to take effect. So make sure there's a copy of the php.ini file in the same directory as the PHP scripts you're using.
     
  17. xxkylexx

    xxkylexx Well-Known Member

    Joined:
    Apr 29, 2006
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Hmm, you are correct, according to a phpinfo uploaded to the public_html, register_globals is on, but not in any of the directories below, which I need it in. Is there any way to have a php.ini in the public_html, which will apply to all directories below it?


    Kyle
     
  18. sleddog

    sleddog Active Member

    Joined:
    Jun 13, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Labrador, Canada
    Not that I'm aware. You'll need to copy or maybe symlink the php.ini file to each subdirectory.
     
  19. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    I can't help but bring up the age-old question - why do you need to enable register_globals? There isn't really any situation in which it is needed!
     
  20. xxkylexx

    xxkylexx Well-Known Member

    Joined:
    Apr 29, 2006
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    As I have mentioned in above posts, I have some software which requires this to be enabled.


    Kyle
     
Loading...

Share This Page