steenkybastage Posted August 30, 2008 Share Posted August 30, 2008 Hello, I've tried to track down this info on google, forums, etc... I'm at a loss. I may just not know which search terms to use... anyhow, here goes: We've migrated to a new server (from cpanel/linux to plesk/win2k8) and I'm having a heck of a time trying to get php5 to take its own settings on a per site basis, instead of using the server defaults. I can get a custom php.ini (in the httpdocs folder) file to work with php4, which is OK for some of our sites, but others will require php5 in order to function properly. Apparently the php.ini file in the httpdocs folder has been done away with in php5... so is there another way to accomplish this, preferably an easy way, like the php.ini file was in php4? Thanks for any insight or thoughts. Link to comment https://forums.phpfreaks.com/topic/122030-solved-separate-site-settings-in-php5/ Share on other sites More sharing options...
DarkWater Posted August 30, 2008 Share Posted August 30, 2008 It still loads a php.ini file, which is actually close to the same one as in PHP4. You may need to set some paths properly though. Link to comment https://forums.phpfreaks.com/topic/122030-solved-separate-site-settings-in-php5/#findComment-629924 Share on other sites More sharing options...
steenkybastage Posted August 30, 2008 Author Share Posted August 30, 2008 Yes, it does... but my understanding is that php5 will only load off the main php.ini file, instead of allowing separate ones for each site. I don't know whether this is a php5 issue, or a plesk issue... but it is clearly documented that for some undisclosed reason php5 won't take a separate php.ini file like php4 will. "But there is no such option with PHP4 in ISAPI mode which always uses the default php.ini of PHP4. Also it is impossible with PHP5 in either modes, where default php.ini of PHP5 is used." I know there has to be SOME way for different sites to use different settings under win2k8/plesk/php5... I just can't figure it out. ??? Link to comment https://forums.phpfreaks.com/topic/122030-solved-separate-site-settings-in-php5/#findComment-629985 Share on other sites More sharing options...
PFMaBiSmAd Posted August 30, 2008 Share Posted August 30, 2008 The local php.ini is only available when php is running as a CGI wrapper and the web server is setup to cause a local php.ini to be processed. Many hosts use different names for php5, like php5.ini. I would check with your web host on what is required by them. Link to comment https://forums.phpfreaks.com/topic/122030-solved-separate-site-settings-in-php5/#findComment-629992 Share on other sites More sharing options...
steenkybastage Posted August 30, 2008 Author Share Posted August 30, 2008 We actually are running a dedicated server now... so I have complete control over the box. Unfortunately, up to this point, the web hosting company we lease the server from cannot get me past this point... they just point out that Plesk doesn't support php5 this way. When you say CGI wrapper, would that be different than just CGI (or fastCGI), or is that the same thing? We are using CGI, btw. I'll give it a shot by changing my php.ini file to php5.ini, which is what I think you meant here. Thanks for the input... I'm off to give it a shot. ::edit:: After further looking at things... we have php running as "CGI application", but there is also a box to check to enable/allow CGI support (which is separate from php). Do these two things play any role in what you're talking about (CGI wrapper)? Thanks Link to comment https://forums.phpfreaks.com/topic/122030-solved-separate-site-settings-in-php5/#findComment-629997 Share on other sites More sharing options...
steenkybastage Posted August 30, 2008 Author Share Posted August 30, 2008 No dice on the php5.ini... I also tried checking the box to allow CGI support, with similar results. Link to comment https://forums.phpfreaks.com/topic/122030-solved-separate-site-settings-in-php5/#findComment-630004 Share on other sites More sharing options...
PFMaBiSmAd Posted August 31, 2008 Share Posted August 31, 2008 CGI wrapper means as a CGI application. I think to help, we need to know what exactly you have. What operating systems, web servers, php versions, and where did you obtain php (complied it yourself or precompiled binary (win), for both your php4 (where a local php.ini works) and php5. To get php (running as a CGI application) to read a master php.ini (or a master per account), you normally need to set SetEnv PHPRC path_to_php.ini To get php to use additional php.ini (local) files, it needs to be complied with with-config-file-scan-dir set. Link to comment https://forums.phpfreaks.com/topic/122030-solved-separate-site-settings-in-php5/#findComment-630092 Share on other sites More sharing options...
steenkybastage Posted August 31, 2008 Author Share Posted August 31, 2008 Wow, this is deeper than I thought it'd be. Thank you for explaining it. We're using a dedicated server running windows 2008 server (x64). It was setup with Plesk (version 8.3) for windows. The web server is IIS7. PHP5 version 5.2.5 PHP4 version 4.4.7 I am under the impression that php (both 4 and 5) came as part of the Plesk installation package... but that was done by our web host, and so I am not 100% positive on this. I will dig up more information on SetEnv PHPRC path_to_php.ini, and see what I come up with... thank you for the lead! Link to comment https://forums.phpfreaks.com/topic/122030-solved-separate-site-settings-in-php5/#findComment-630191 Share on other sites More sharing options...
steenkybastage Posted August 31, 2008 Author Share Posted August 31, 2008 OK, I tracked down the way to handle this (mostly). It appears it involves registry entries... good thing we have a dedicated box! http://www.php.net/manual/en/configuration.php http://www.php.net/manual/en/configuration.changes.php Thank you for your suggestions and help. Link to comment https://forums.phpfreaks.com/topic/122030-solved-separate-site-settings-in-php5/#findComment-630508 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.