• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

php.ini / php5 custom php.ini base on each domain

G

gongcart

Guest
I saw there are some other hosts allow the hosting client to use custom php.ini in php5 base on each domain. Anyone has any idea how to do that in windows server 2003.

Thank you
 
The problem is solved base on
http://www.php.net/manual/en/configuration.changes.php

for php5, you can only add individual php configuration value inside of php.ini through the registry, which means that you have to setup keys to the file path ( where the client's hosting folder located ) and then add a string value, string name will be the php.ini configuration name and value will be how you want it to be

for example
1. change session.save_path value inside of php.ini
you setup a key named session.save_path and the value will be "hard-drive-letter://file-path-to-your-client-account-folder/any-sub-folder-you want the value to activated/"

hope this help.......
 
Thats not true, we do it and we dont have that. What we do is we set the PHPRC environment variable in windows to be a single period '.' (no quotes) and we run it as a cgi (map the script mapping for php to C:\PHP5\php-cgi.exe).

This allows the user to set a php.ini (or php-cgi-fcgi.ini depending on the php version 4/5) in the root directory of the application folder and it will be picked up immediately by their applicatino, no restarts or nothing.

**Note, you may have to reboot after the environment variable is set for it to work properly though.
 
Hi HostingGuy

I've set PHPRC to '.' and rebooted my server, Fast CGI isn't recognising my php.ini in the current path though. I've tried renaming the ini file to php-cgi-fcgi.ini, php-fcgi.ini php-facgi.ini etc
 
Php.ini custom for each domain

Thats not true, we do it and we dont have that. What we do is we set the PHPRC environment variable in windows to be a single period '.' (no quotes) and we run it as a cgi (map the script mapping for php to C:\PHP5\php-cgi.exe).

This allows the user to set a php.ini (or php-cgi-fcgi.ini depending on the php version 4/5) in the root directory of the application folder and it will be picked up immediately by their applicatino, no restarts or nothing.

**Note, you may have to reboot after the environment variable is set for it to work properly though.

Can you give a step by step guide to do this?

I'm new to plesk 10 on windows 2008 and need to setup a way for our clients to setup ther own php ini, or at least allow them to ask us to do it. But I dont know how or where

Thanks
 
I had problem, i follow the link that sent, but when i create the "php-cgi-fcgi.ini", and refresh the PHP Info, i got this message:

502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

I don´t know why, but in my domain configuration, i set to use php 5.2.17, but on the phpinfo continue using the 4.4.9 version, why? When i change to fast cgi or isapi i didn´t see any difference.

Thanks
 
Hi m0rpheu5

Which php and Plesk version are you using?. Also provide the php variable you are trying to set. What is understand is custom php.ini won't work with php version 4 and also with fast-cgi and isapi.
 
Back
Top