Previous Next

Thread: Shared hosting environemnt and multiple php.ini

Last post 05-06-2008 10:25 AM by brashquido. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 09-05-2007, 8:47 AM

    • linus78
    • Not Ranked
    • Joined on 09-05-2007, 12:36 PM
    • Posts 8

    Shared hosting environemnt and multiple php.ini

    Hi,

    I administer an IIS with several Webpages from several customers. Now we plan to offer PHP as additional service. To keep that secure and the webserver running I think each webpage should have it's own php.ini to configure e.g. the OPEN_BASE_DIR stuff for each webpage. Additionally some webpages need different PHP parameter settings like REGISTER_GLOBALS ON and others OFF - that's another argument for multiple php.inis.

    So my main problem is to isolate the different webpages like it is done with the application pools at the ASP side. I hope I can do this by providing one php.ini per webpage.

    Has anyone, any experience with that? I guess I have to use PHP as CGI to separate the processes as good as possible. Any idea if FastCGI is a option in this szenario too?

    How are other shared hosters do this with IIS? Any idea?

    Thanks

    Linus
     

  • 09-05-2007, 9:52 AM In reply to

    Re: Shared hosting environemnt and multiple php.ini

    For security of the IIS, off is advisable to register_globals off, but the people program wrong, and are obliged to leave it on. Disable fopen. I advise you to install the Zend Core, therefore he is more easy to manage and to bring up to date the versions of the PHP.

    Pablo Weyne
    Tags:
  • 01-24-2008, 7:46 PM In reply to

    • wwwXpert
    • Not Ranked
    • Joined on 01-25-2008, 12:38 AM
    • Posts 4

    Re: Shared hosting environemnt and multiple php.ini

    I read somewhere awhile back that you can add

    export PHPRC = "C:\Inetput\wwwroot\site1\conf;C:\Inetput\wwwroot\site2\conf;"

    to your master php.ini file (typically located in C:\php) to allow it to recognize the local php.ini files in your various shared hosted sites.

    All the local php.ini files would be placed in

    C:\Inetput\wwwroot\site1\conf

    and

    C:\Inetput\wwwroot\site2\conf

     I can't seem to find the site.

     

  • 05-05-2008, 9:51 AM In reply to

    • linus78
    • Not Ranked
    • Joined on 09-05-2007, 12:36 PM
    • Posts 8

    Re: Shared hosting environemnt and multiple php.ini

    We found a solution:

    In Microsoft Fast-CGI implementaion you can define a php.ini location per Website. Tht's how it could work. Hopefully it will be the same for IIS7 

  • 05-06-2008, 10:25 AM In reply to

    Re: Shared hosting environemnt and multiple php.ini

    I haven't tried the multiple path method for the PHPRC variable tried above, but if you're unable to use FastCGI (there are still some app specific issues here and there) and need to use ISAPI you may want to look into setting per directory PHP configuration values in your registry. This only works with PHP_INI_USER values though, so is not a complete solution.

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
Page 1 of 1 (5 items)
Page view counter