Current time: 05-01-2024, 12:45 AM Hello There, Guest! (LoginRegister)


Post Reply 
How to save modified php.ini file settings
Author Message
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #1
How to save modified php.ini file settings
If i modify a php.ini file for a client, and then he adds something to his domain say an alias, all the cnages are reset to default.... now for other files such as zone files there is a working dir to copy changes over to , but what does one use for php.ini file..

Thanks...

Rob..
06-04-2008 02:49 AM
Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #2
RE: How to save modified php.ini file settings
The template php.ini is located in: /etc/ispcp/fcgi/parts/php[4/5]

If you want to make a change that will be applied to all new domains, then it should go here. If you just want to tweak one clients domain, then i'm not sure if you can persist those changes after an update... I'm sure someone else can chime in on this though.
06-04-2008 04:04 AM
Find all posts by this user Quote this message in a reply
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #3
RE: How to save modified php.ini file settings
Right i was looking for hte per client thingy, as i have about a dozen clients with special options in their php.ini file.... i was thinking about just over writing the newly installed php.ini files with my backups as i only see one difference in the php4.ini files there are 2 new additions to the excludes for executables.. popen and proc_open other than that i see no difference... as for php5.ini i have no diffed them yet...

Thanks to all...

ROb...


pasichnyk Wrote:The template php.ini is located in: /etc/ispcp/fcgi/parts/php[4/5]

If you want to make a change that will be applied to all new domains, then it should go here. If you just want to tweak one clients domain, then i'm not sure if you can persist those changes after an update... I'm sure someone else can chime in on this though.
06-04-2008 06:52 AM
Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #4
RE: How to save modified php.ini file settings
If you really need these changes to not be overwritten, you could comment out the lines in dmn_change_httpd_file_data (in ispcp-dmn-mngr), that delete the php.ini files at the beginning of the method.

This should fix your problem, but then you need to know that they will never be updated unless you first delete the files, then set the domain to a change status.

I'm not sure if there could be any bad consequences of doing this, but i'm sure someone else will chime in if that is the case.
06-04-2008 10:42 AM
Find all posts by this user Quote this message in a reply
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #5
RE: How to save modified php.ini file settings
Ok lets wait a bit and see if anyone mentions anything..

ANother quick question... when i change someone over to php5 by simply editing the php4-fcgi-starter file am i supposed to change the php.ini file that is used from php4 to php5 one? otherwise the php4 ini file is used, no?

thanks..

pasichnyk Wrote:If you really need these changes to not be overwritten, you could comment out the lines in dmn_change_httpd_file_data (in ispcp-dmn-mngr), that delete the php.ini files at the beginning of the method.

This should fix your problem, but then you need to know that they will never be updated unless you first delete the files, then set the domain to a change status.

I'm not sure if there could be any bad consequences of doing this, but i'm sure someone else will chime in if that is the case.
06-04-2008 11:55 PM
Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #6
RE: How to save modified php.ini file settings
robmorin Wrote:when i change someone over to php5 by simply editing the php4-fcgi-starter file am i supposed to change the php.ini file that is used from php4 to php5 one? otherwise the php4 ini file is used, no

I believe the directory to look for the php.ini file is defined in the phpX-fcgi-starter with the "PHPRC" variable. If you just rename a copy of the php4-fcgi-starter, it won't work. You need to modify this file to ponit to the correct binary as well as the correct PHPRC directory.

You'll also need to modify your vhosts file for apache, to switch it from using the php4-fcgi-starter to php5-fcgi-starter.

I'm sure there is a way to change something in the database, and then set the domain to change, and have the vhosts and starter scripts updated for you, but then you'd blow out any changes you've made...
06-05-2008 05:48 AM
Find all posts by this user Quote this message in a reply
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #7
RE: How to save modified php.ini file settings
Right ok i just want to make sure that i should be setting the PHPRC to the php5 dir rather than leave it at php4 dir...
good to know i have the option of either modifying the apache conf or the php4-fcgi-starter file..

thanks dude!

Rob..



pasichnyk Wrote:
robmorin Wrote:when i change someone over to php5 by simply editing the php4-fcgi-starter file am i supposed to change the php.ini file that is used from php4 to php5 one? otherwise the php4 ini file is used, no

I believe the directory to look for the php.ini file is defined in the phpX-fcgi-starter with the "PHPRC" variable. If you just rename a copy of the php4-fcgi-starter, it won't work. You need to modify this file to ponit to the correct binary as well as the correct PHPRC directory.

You'll also need to modify your vhosts file for apache, to switch it from using the php4-fcgi-starter to php5-fcgi-starter.

I'm sure there is a way to change something in the database, and then set the domain to change, and have the vhosts and starter scripts updated for you, but then you'd blow out any changes you've made...
06-05-2008 06:00 AM
Find all posts by this user Quote this message in a reply
RatS Offline
Project Leader
******

Posts: 1,854
Joined: Oct 2006
Reputation: 17
Post: #8
RE: How to save modified php.ini file settings
As far as I've writen these changes, the php*.ini files won't be overwritten.
06-05-2008 05:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #9
RE: How to save modified php.ini file settings
You mean doing what pasichnyk mentioned above?

Thanks

ROb..

RatS Wrote:As far as I've writen these changes, the php*.ini files won't be overwritten.
06-05-2008 09:27 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)