Creating Local php.ini

Discussion in 'PHP' started by cancer10, Aug 17, 2007.

  1. #1
    Hello,

    I run multiple domains/sites on my linux and windows server. I know there is a php.ini files that comes with the php installation package. But I have heard that there is a way to create a local php.ini file for each domain.

    Does anyone knows how to create local php.ini files for each domain. Is there a special setting i need to do to make it run?


    Thanx for your help

    PS - I use cPanel on my linux server and Plesk on my windows server.
     
    cancer10, Aug 17, 2007 IP
  2. venetsian

    venetsian Well-Known Member

    Messages:
    1,105
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    168
    #2
    That's a nice question. I ended up with the same problem!

    Cheers,

    Venetsian
     
    venetsian, Aug 17, 2007 IP
  3. sabmalik

    sabmalik Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have found local php.ini notion to be misleading , i believe the best way to go about some variables is using .htaccess and using php flag in there something like this....

    php_flag register_globals off

    also go through this as well
    http://www.jaguarpc.com/forums/showthread.php?t=13601

    you can also use ini_set in your main config.php of the site , which can also help i assume.
     
    sabmalik, Aug 18, 2007 IP
  4. venetsian

    venetsian Well-Known Member

    Messages:
    1,105
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    168
    #4
    .htaccess with PHP flags don't work if you have suexec on (the apache/php runs your files with your user not with the NOBODY) then it gives 500 error. That's why we need php.ini ??

    Cheers,

    Venetsian
     
    venetsian, Aug 18, 2007 IP
  5. sabmalik

    sabmalik Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    right.

    if you want to use php.ini then i believe its gonna cause u more headache. you can see some stuff related to this here.

    http://us3.php.net/configuration.changes

    if you are trying this out on shared hosting , then i dont think this will be possible either.
     
    sabmalik, Aug 18, 2007 IP