Current time: 11-30-2024, 04:01 PM Hello There, Guest! (LoginRegister)


Post Reply 
Regeneration of PHP.ini files
Author Message
Murodese Offline
Newbie
*

Posts: 7
Joined: May 2008
Reputation: 0
Post: #1
Regeneration of PHP.ini files
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/ho...fig_files) doesn't work. Any idea how to do this?
03-20-2009 05:34 PM
Find all posts by this user Quote this message in a reply
biologist Offline
Junior Member
*

Posts: 25
Joined: Mar 2009
Reputation: 0
Post: #2
RE: Regeneration of PHP.ini files
(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/ho...fig_files) doesn't work. Any idea how to do this?
Why don't you just write a simple Perl-Script to change settings recursively?
03-21-2009 05:06 AM
Find all posts by this user Quote this message in a reply
iRaS Offline
Junior Member
*

Posts: 13
Joined: Mar 2009
Reputation: 0
Post: #3
RE: Regeneration of PHP.ini files
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...
03-24-2009 05:23 PM
Find all posts by this user Quote this message in a reply
biologist Offline
Junior Member
*

Posts: 25
Joined: Mar 2009
Reputation: 0
Post: #4
RE: Regeneration of PHP.ini files
(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!
03-24-2009 07:09 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: Regeneration of PHP.ini files
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...
03-24-2009 07:27 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Murodese Offline
Newbie
*

Posts: 7
Joined: May 2008
Reputation: 0
Post: #6
RE: Regeneration of PHP.ini files
(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.
03-26-2009 10:26 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #7
RE: Regeneration of PHP.ini files
Your welcome :-)

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

/J
03-27-2009 12:43 AM
Visit this user's website Find all posts by this user Quote this message in a reply
momo Offline
Junior Member
*

Posts: 148
Joined: Jun 2008
Reputation: 1
Post: #8
RE: Regeneration of PHP.ini files
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
03-31-2009 12:27 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #9
RE: Regeneration of PHP.ini files
!
I would not copy a domain-php.ini to the master-php.ini because the openbasedir and maybe other settings are different.
!

/J
03-31-2009 04:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
momo Offline
Junior Member
*

Posts: 148
Joined: Jun 2008
Reputation: 1
Post: #10
RE: Regeneration of PHP.ini files
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
04-01-2009 12:04 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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