ispCP - Board - Support
Regeneration of PHP.ini files - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: Regeneration of PHP.ini files (/thread-6139.html)



Regeneration of PHP.ini files - Murodese - 03-20-2009 05:34 PM

Trying to regenerate the php.ini files in /var/www/fcgi/*/php5/php.ini but the standard regeneration trick (http://www.isp-control.net/ispcp/wiki/howto_regenerate_config_files) doesn't work. Any idea how to do this?


RE: Regeneration of PHP.ini files - biologist - 03-21-2009 05:06 AM

(03-20-2009 05:34 PM)Murodese Wrote:  Trying to regenerate the php.ini files in /var/www/fcgi/*/php5/php.ini but the standard regeneration trick (http://www.isp-control.net/ispcp/wiki/howto_regenerate_config_files) doesn't work. Any idea how to do this?
Why don't you just write a simple Perl-Script to change settings recursively?


RE: Regeneration of PHP.ini files - iRaS - 03-24-2009 05:23 PM

cause he is not a developer. does all administrators have to know how to write a script that changes all configuration files after editing a template?

i think it would be nice if a domain has changed also rewriting the php.ini files. than the trick with regenrating domains will work too...


RE: Regeneration of PHP.ini files - biologist - 03-24-2009 07:09 PM

(03-24-2009 05:23 PM)iRaS Wrote:  cause he is not a developer. does all administrators have to know how to write a script that changes all configuration files after editing a template?

i think it would be nice if a domain has changed also rewriting the php.ini files. than the trick with regenrating domains will work too...
In my opinion the problem is: many administrators just rely on "helpers" like ispCP without being able to do the administratation of all that daemons involved (postfix, apache, named ...) manually. Don't get me wrong: I'm also not an ispCP-developer, but I think it shouldn't be impossible for an administrator to write such a script. I mean this is just simple parsing and replacing with the use of regular expressions. Programs like awk, sed, grep, find, perl whatever... were made for administrators - USE THEM!


RE: Regeneration of PHP.ini files - joximu - 03-24-2009 07:27 PM

Regenerate the domains but also rename or delete the php.ini of theese domains (a new php.ini is generated during regeneraton only if it not exists).

/J

PS: and yes - an administrator should be able to do such tasks...


RE: Regeneration of PHP.ini files - Murodese - 03-26-2009 10:26 PM

(03-24-2009 07:09 PM)biologist Wrote:  In my opinion the problem is: many administrators just rely on "helpers" like ispCP without being able to do the administratation of all that daemons involved (postfix, apache, named ...) manually. Don't get me wrong: I'm also not an ispCP-developer, but I think it shouldn't be impossible for an administrator to write such a script. I mean this is just simple parsing and replacing with the use of regular expressions. Programs like awk, sed, grep, find, perl whatever... were made for administrators - USE THEM!

I am able to write such a script (mainly programmer, sysadmin on the side), but I assumed that since there was a way to generate them initially, there would've been a way to update them.

Which there was, thanks Joximu.


RE: Regeneration of PHP.ini files - joximu - 03-27-2009 12:43 AM

Your welcome :-)

I think the same way - be lazy where there is a shorter way Big Grin

/J


RE: Regeneration of PHP.ini files - momo - 03-31-2009 12:27 AM

AFAIK, it use to regenerate automatically in the past.

@joximu. Thank you.

One way to regenerate all php.ini in 1.0.0
Code:
edit /etc/ispcp/fcgi/parts/php5/php.ini to suit your needs
Reactivate "deactivated" accounts if there is
rm -r /var/www/fcgi/*
regenerate
cp -r /var/www/fcgi/ANYDOMAIN.com /var/www/fcgi/master
chown -R vu2000:vu2000 /var/www/fcgi/master
Deactivate the "bad guys accounts"
/etc/init.d/apache2 reload



RE: Regeneration of PHP.ini files - joximu - 03-31-2009 04:19 PM

!
I would not copy a domain-php.ini to the master-php.ini because the openbasedir and maybe other settings are different.
!

/J


RE: Regeneration of PHP.ini files - momo - 04-01-2009 12:04 AM

k

too late for me then ... Smile

well then
Code:
edit /etc/ispcp/fcgi/parts/php5/php.ini to suit your needs
Reactivate "deactivated" accounts if there is
cd /var/www/fcgi
shopt -s extglob #this enable shell options
rm -r !(master) #remove everything except master
regenerate
Deactivate the "bad guys accounts"
/etc/init.d/apache2 reload