Does anyone know how I can have a different php.ini file for different sites on the same server? I know it is possible but I can't find the right documentation on it.
I tried adding PHPIniDir to the VirtualHost directive but when I restarted Apache I got an error that the ini file was already loaded.
phpinfo suggests that the ini file is in C:\WINDOWS but it is not there.
I've removed the PHPRC Environment Variable and do not see any Registry Entries.
different php.ini same server
Moderator: General Moderators
- bluesman333
- Forum Commoner
- Posts: 52
- Joined: Wed Dec 31, 2003 9:47 am
Re: different php.ini same server
If you need different .ini values for different sites then you can use .htacces for this. e.g. for one site you want to set upload file size limt 5 MB and for others 10MB. create a file with name ".htaccess" and put the below code for 5MB limitbluesman333 wrote:Does anyone know how I can have a different php.ini file for different sites on the same server?
php_value upload_max_filesize 5M
php_value post_max_size 5M
Similarly you can change other settings too.
- bluesman333
- Forum Commoner
- Posts: 52
- Joined: Wed Dec 31, 2003 9:47 am
Re: different php.ini same server
Thanks, I'll use that method.mentor wrote:
If you need different .ini values for different sites then you can use .htacces for this. e.g. for one site you want to set upload file size limt 5 MB and for others 10MB. create a file with name ".htaccess" and put the below code for 5MB limit
php_value upload_max_filesize 5M
php_value post_max_size 5M
Similarly you can change other settings too.