Current time: 12-24-2024, 03:40 AM Hello There, Guest! (LoginRegister)


Post Reply 
Couple simple php questions
Author Message
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #1
Couple simple php questions
Hello all, just wanted to verify a few things with respect to php on an Omega system..

1- When i installed it i said to choose php5, does this mean php5 is the default? I mean any php scripts that run run as php5?

2- How wold one run a php script as php4?

3- When i need to modify the php file i should do it in the domains /var/www/fcg/domain.com/php5/php.ini file since php5 is the default?

4- I should never really touch the /etc/php5/ and /etc/php4 dirs unless it somethign system wide?

Thanks to all in advance..

Rob..
11-03-2007 12:20 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: #2
RE: Couple simple php questions
robmorin Wrote:Hello all, just wanted to verify a few things with respect to php on an Omega system..

1- When i installed it i said to choose php5, does this mean php5 is the default? I mean any php scripts that run run as php5?

2- How wold one run a php script as php4?

3- When i need to modify the php file i should do it in the domains /var/www/fcg/domain.com/php5/php.ini file since php5 is the default?

4- I should never really touch the /etc/php5/ and /etc/php4 dirs unless it somethign system wide?

Thanks to all in advance..

Rob..

1) yes - you can manually switch some of the customers back to PHP4 - but I recommend only to do that in very special cases...

2) use the FAQ and think the other way...
http://www.isp-control.net/component/opt...iew/id,18/

3) question not clear: the php.ini for domains.com is in /var/www/fcgi/domains.com/php5(or 4)/php.ini

4) yep

this is all for running php as fast_cgi - as recommended and standard by ispcp.

/Joximu
11-03-2007 12:29 AM
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: #3
RE: Couple simple php questions
Thanks for the quick reply!

Smile
Rob..

joximu Wrote:
robmorin Wrote:Hello all, just wanted to verify a few things with respect to php on an Omega system..

1- When i installed it i said to choose php5, does this mean php5 is the default? I mean any php scripts that run run as php5?

2- How wold one run a php script as php4?

3- When i need to modify the php file i should do it in the domains /var/www/fcg/domain.com/php5/php.ini file since php5 is the default?

4- I should never really touch the /etc/php5/ and /etc/php4 dirs unless it somethign system wide?

Thanks to all in advance..

Rob..

1) yes - you can manually switch some of the customers back to PHP4 - but I recommend only to do that in very special cases...

2) use the FAQ and think the other way...
http://www.isp-control.net/component/opt...iew/id,18/

3) question not clear: the php.ini for domains.com is in /var/www/fcgi/domains.com/php5(or 4)/php.ini

4) yep

this is all for running php as fast_cgi - as recommended and standard by ispcp.

/Joximu
11-03-2007 12:41 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: #4
RE: Couple simple php questions
I just noticed after migrating a website over to Omega that i get incomplete header warnings in the apache conf file from fcgi, now i read a few posts regarding this, it seems that if one uses php5 rather than php4-cgi it fixes this?

After re-checking my setup i think i might actually have php4 as the default, rather than php5? this is what is set in the ispcp.conf file...
PHP_VERSION = 4
however if i do php -v on the server it tells me PHP 5.2.0-8

When i do a ps -ax i see only php4-cgi stuff running each time i go to the website..

any ideas? How would i make php5 the default instead?

Thanks to all and have a great weekend!

Rob..
robmorin Wrote:Thanks for the quick reply!

Smile
Rob..

joximu Wrote:
robmorin Wrote:Hello all, just wanted to verify a few things with respect to php on an Omega system..

1- When i installed it i said to choose php5, does this mean php5 is the default? I mean any php scripts that run run as php5?

2- How wold one run a php script as php4?

3- When i need to modify the php file i should do it in the domains /var/www/fcg/domain.com/php5/php.ini file since php5 is the default?

4- I should never really touch the /etc/php5/ and /etc/php4 dirs unless it somethign system wide?

Thanks to all in advance..

Rob..

1) yes - you can manually switch some of the customers back to PHP4 - but I recommend only to do that in very special cases...

2) use the FAQ and think the other way...
http://www.isp-control.net/component/opt...iew/id,18/

3) question not clear: the php.ini for domains.com is in /var/www/fcgi/domains.com/php5(or 4)/php.ini

4) yep

this is all for running php as fast_cgi - as recommended and standard by ispcp.

/Joximu
11-03-2007 05:29 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #5
RE: Couple simple php questions
Quote:How would i make php5 the default instead?
This happens during the installation.

But i mean that it is enough to set PHP_Version = 5 in the config.
And all Domains that you add after this change should run with PHP5.
The domains which exist now must be changed --> http://www.isp-control.net/component/opt...iew/id,18/

Greez BeNe
11-03-2007 05:49 AM
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: #6
RE: Couple simple php questions
Thanks for that valuable info..... however i did the change and i still get....

[Fri Nov 02 15:58:15 2007] [error] [client xxx.xxx.xxx.146] (104)Connection reset by peer: FastCGI: comm with server "/var/www/fcgi/domain.com/php4-fcgi-starter" aborted: read failed, referer: http://www.domain.com/MD/

Any ideas? This site works fine on the other server running php4 with a VHCS2 2.4.6 install

Thanks..

BeNe Wrote:
Quote:How would i make php5 the default instead?
This happens during the installation.

But i mean that it is enough to set PHP_Version = 5 in the config.
And all Domains that you add after this change should run with PHP5.
The domains which exist now must be changed --> http://www.isp-control.net/component/opt...iew/id,18/

Greez BeNe
11-03-2007 06:04 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #7
RE: Couple simple php questions
Quote:Connection reset by peer: FastCGI: comm with server "/var/www/fcgi/domain.com/php4-fcgi-starter" aborted: read failed
But the Permissions and user is right for the php4-fcgi-starter ?
This file must belong to the vu20XX user and group. It this Ok on your system ?

Greez BeNe
11-03-2007 06:11 AM
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: #8
RE: Couple simple php questions
total 24
drwxr-xr-x 4 vu2057 vu2057 4096 2007-10-23 14:38 .
drwxr-xr-x 122 root root 4096 2007-10-30 09:57 ..
drwxr-x--- 2 vu2057 vu2057 4096 2007-10-23 14:38 php4
-rwxr-x--- 1 vu2057 vu2057 203 2007-11-02 15:52 php4-fcgi-starter
drwxr-x--- 2 vu2057 vu2057 4096 2007-10-23 14:38 php5
-rwxr-x--- 1 vu2057 vu2057 203 2007-10-23 14:38 php5-fcgi-starter

Seems ok....

???
Rob..
BeNe Wrote:
Quote:Connection reset by peer: FastCGI: comm with server "/var/www/fcgi/domain.com/php4-fcgi-starter" aborted: read failed
But the Permissions and user is right for the php4-fcgi-starter ?
This file must belong to the vu20XX user and group. It this Ok on your system ?

Greez BeNe
11-03-2007 06:17 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: Couple simple php questions
Is ther more info in the other log files?

/var/log/apache2/suexec, error.log

/J
11-03-2007 06:20 AM
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: #10
RE: Couple simple php questions
When i put back the php4-fcgi-starter from exec /usr/bin/php5-cgi back to exec /usr/bin/php4-cgi I now get this error...

[Fri Nov 02 16:20:46 2007] [error] [client xxx.xxx.xxx.146] FastCGI: incomplete headers (0 bytes) received from server "/var/www/fcgi/domain.com/php4-fcgi-starter", referer: http://www.domain.com/MD/index.php

???
Smile

robmorin Wrote:total 24
drwxr-xr-x 4 vu2057 vu2057 4096 2007-10-23 14:38 .
drwxr-xr-x 122 root root 4096 2007-10-30 09:57 ..
drwxr-x--- 2 vu2057 vu2057 4096 2007-10-23 14:38 php4
-rwxr-x--- 1 vu2057 vu2057 203 2007-11-02 15:52 php4-fcgi-starter
drwxr-x--- 2 vu2057 vu2057 4096 2007-10-23 14:38 php5
-rwxr-x--- 1 vu2057 vu2057 203 2007-10-23 14:38 php5-fcgi-starter

Seems ok....

???
Rob..
BeNe Wrote:
Quote:Connection reset by peer: FastCGI: comm with server "/var/www/fcgi/domain.com/php4-fcgi-starter" aborted: read failed
But the Permissions and user is right for the php4-fcgi-starter ?
This file must belong to the vu20XX user and group. It this Ok on your system ?

Greez BeNe
11-03-2007 06:23 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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