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.

Seperate PHP.ini file for a site.

Discussion in 'Data Protection' started by rosewood, Aug 27, 2008.

  1. rosewood

    rosewood Member

    Joined:
    Aug 1, 2008
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    I have a few sites that I'm bringing over to cPanel that have some older and just some bad PHP. One site completely breaks without globals on. Our coders are working to get it working how it should be, but for right now we had to switch globals on.

    Is there a way to turn on globals JUST for one site, and leave them off for every other site?

    Thank you, this forum has helped me stay sane through all of this.
     
  2. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    Hii..

    If you have PHP running as suexec then you can just create a php.ini file for that domain and enable Register_global for it.

    If you do not have PHP running as suexec then you you can use .htaccess to enable register_global for one domain.

    You can also insert the line below in PHP tags in the virtualhost entry of the domain in httpd.conf:

    php_admin_flag register_globals on

    Note: Please backup the httpd.conf before editing it and restart Apache after the changes.
     
  3. rosewood

    rosewood Member

    Joined:
    Aug 1, 2008
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Thank you

    Our crack coders got the site working w/o having to enable but as we bring more crap sites over to our WHM/cPanel server, I expect to see more of this.
     
Loading...
Similar Threads - Seperate PHP ini
  1. John connor
    Replies:
    8
    Views:
    1,068

Share This Page