Current time: 11-24-2024, 01:26 AM Hello There, Guest! (LoginRegister)


Post Reply 
Possible to use mod_php instead of fast-cgi?
Author Message
abuzaind Offline
Junior Member
*

Posts: 34
Joined: Jan 2008
Reputation: 0
Post: #11
RE: Possible to use mod_php instead of fast-cgi?
so now i have problem with permissions like this:

Warning: session_start() [function.session-start]: open(/var/www/ispcp/gui/phptmp//sess_v,jsrHUtObgC6XoKQbJxW5SFOP7, O_RDWR) failed: Permission denied (13) in /var/www/ispcp/gui/include/ispcp-lib.php on line 27

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/ispcp/gui/include/ispcp-lib.php:27) in /var/www/ispcp/gui/include/ispcp-lib.php on line 27
02-02-2008 05:07 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: #12
RE: Possible to use mod_php instead of fast-cgi?
of course. with less security you also have the www-user feature after switching to mod-php.

Everything which has to be written by php has to be writeable for the apache-user.

Thats - besides the better security - another reason *for* fast-cgi: the ftp user and the php user are the same...

/J
(This post was last modified: 02-02-2008 07:51 AM by joximu.)
02-02-2008 07:51 AM
Visit this user's website Find all posts by this user Quote this message in a reply
abuzaind Offline
Junior Member
*

Posts: 34
Joined: Jan 2008
Reputation: 0
Post: #13
RE: Possible to use mod_php instead of fast-cgi?
Frankly speaking, I want to use php as fastcgi, so let's move to another topic Smile

http://www.isp-control.net/forum/apache-...-2284.html
02-02-2008 08:01 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: #14
RE: Possible to use mod_php instead of fast-cgi?
I get so many complaints about the dreaded 500 error with fcgi, its becoming unbearable now....

I saw that some upgrade to php5.2.2 and its better? does that mean i should alter everyone's ph4-starter file and put php5-cgi rather than php4-cgi
I did try that as a test once but the website did not work at all

Should i be looking somewhere else on the web for help with this issue?

Thanks

Rob...

abuzaind Wrote:Frankly speaking, I want to use php as fastcgi, so let's move to another topic Smile

http://www.isp-control.net/forum/apache-...-2284.html
(This post was last modified: 02-06-2008 04:32 AM by robmorin.)
02-06-2008 04:31 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: #15
RE: Possible to use mod_php instead of fast-cgi?
And what is the Problem for your Error 500?
Check the Apache Error logs.
Maybe to many unkilled PHP-Process ? To many open files with the Apachelogs ? Not enough fastcgi childrens ?

There are many ways...

Quote:I saw that some upgrade to php5.2.2 and its better?
Yes, it´s better

Greez BeNe
02-06-2008 05:21 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #16
RE: Possible to use mod_php instead of fast-cgi?
I've come to a conclusion that there is no reason to switch away from fast-cgi, it definatly adds security features and other benefits if you have users on your system that you can't monitor 24/7 / trust 100%

solution for now:

Definatly upgrade to php 5.2.2 or higher (i'm running 5.2.5 now and it solved a lot of my issues)

then there is the amound of fcgi threads and children that is set very low for many dynamic websites, increase this number and you'll immediatly notice an increase in page performance.

i'm still testing this to see what is an ideal config, i'll post back here.
(This post was last modified: 02-06-2008 05:27 AM by psygarden.)
02-06-2008 05:25 AM
Visit this user's website 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: #17
RE: Possible to use mod_php instead of fast-cgi?
Quote:i'm still testing this to see what is an ideal config, i'll post back here.
Perfect, we are still searching for it Rolleyes

Greez BeNe
02-06-2008 05:28 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: #18
RE: Possible to use mod_php instead of fast-cgi?
We host over 200 sites, we get complaints form different people for different sites for different URLs... its very hard to pinpoint anything... i posted earlier my fcgi conf file, here it is again....

if there is something i should be doing to enable more detailed logging or whatever please let me know...

my biggest complainers use Drupal and wordpress, or pretty much any site with a database ... also users of Squirrlmail too.....

<IfModule mod_fastcgi.c>
FastCgiWrapper On
FastCgiIpcDir /var/lib/apache2/fastcgi2
FastCgiConfig -minProcesses 30 \
-maxProcesses 25 \
-singleThreshold 100 \
-killInterval 60 \
-idle-timeout 300 \
-multiThreshold 80 \
-startDelay 5 \
-maxClassProcesses 5 \
-maxProcesses 300 \
-listen-queue-depth 400 \
-pass-header HTTP_AUTHORIZATION

FastCgiServer /var/www/fcgi/master/php4-fcgi-starter -user vu2000 -group vu2000

#
# PHP4 SUPPORT
#

AddHandler php-fastcgi .php .php4 .php3

<Location /php4/php4-fcgi-starter>
SetHandler fastcgi-script
Options +ExecCGI
</Location>

Action php-fastcgi /php4/php4-fcgi-starter
AddType application/x-httpd-php .php .php4
</IfModule>

Thanks....


BeNe Wrote:And what is the Problem for your Error 500?
Check the Apache Error logs.
Maybe to many unkilled PHP-Process ? To many open files with the Apachelogs ? Not enough fastcgi childrens ?

There are many ways...

Quote:I saw that some upgrade to php5.2.2 and its better?
Yes, it´s better

Greez BeNe
02-06-2008 05:44 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: #19
RE: Possible to use mod_php instead of fast-cgi?
As for log files in apache error logs i only see this...

[Tue Feb 05 10:46:59 2008] [error] [client 66.249.66.84] FastCGI: incomplete headers (0 bytes) received from server "/var/www/fcgi/domain.com/php4-fcgi-starter"

if i try to locate the same time stamp in the access log i see this

66.249.66.84 - - [05/Feb/2008:10:46:53 -0500] "GET /d/?q=event/2008/03/09/table/all/all HTTP/1.1" 500 1135

This is one example but many times nothing matches up like this example does...

this particular site's php4starter looks like this..

#!/bin/sh

umask 022

PHPRC="/var/www/fcgi/domain.com/php4/"

export PHPRC
PHP_FCGI_CHILDREN=8
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=500
export PHP_FCGI_MAX_REQUESTS

exec /usr/bin/php4-cgi

I wanted to try to force to use php5, but if i simply replace php4-cgi for php5-cgi the site does not work at all and only shows a blank white page. I tried this with many other sites and i get he same thing... why would it be that i can not force php5?

thanks for all your hep and speedy responses!
Smile

Rob..

robmorin Wrote:We host over 200 sites, we get complaints form different people for different sites for different URLs... its very hard to pinpoint anything... i posted earlier my fcgi conf file, here it is again....

if there is something i should be doing to enable more detailed logging or whatever please let me know...

my biggest complainers use Drupal and wordpress, or pretty much any site with a database ... also users of Squirrlmail too.....

<IfModule mod_fastcgi.c>
FastCgiWrapper On
FastCgiIpcDir /var/lib/apache2/fastcgi2
FastCgiConfig -minProcesses 30 \
-maxProcesses 25 \
-singleThreshold 100 \
-killInterval 60 \
-idle-timeout 300 \
-multiThreshold 80 \
-startDelay 5 \
-maxClassProcesses 5 \
-maxProcesses 300 \
-listen-queue-depth 400 \
-pass-header HTTP_AUTHORIZATION

FastCgiServer /var/www/fcgi/master/php4-fcgi-starter -user vu2000 -group vu2000

#
# PHP4 SUPPORT
#

AddHandler php-fastcgi .php .php4 .php3

<Location /php4/php4-fcgi-starter>
SetHandler fastcgi-script
Options +ExecCGI
</Location>

Action php-fastcgi /php4/php4-fcgi-starter
AddType application/x-httpd-php .php .php4
</IfModule>

Thanks....


BeNe Wrote:And what is the Problem for your Error 500?
Check the Apache Error logs.
Maybe to many unkilled PHP-Process ? To many open files with the Apachelogs ? Not enough fastcgi childrens ?

There are many ways...

Quote:I saw that some upgrade to php5.2.2 and its better?
Yes, it´s better

Greez BeNe
(This post was last modified: 02-06-2008 05:59 AM by robmorin.)
02-06-2008 05:52 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: #20
RE: Possible to use mod_php instead of fast-cgi?
Code:
[Tue Feb 05 10:46:59 2008] [error] [client 66.249.66.84] FastCGI: incomplete headers (0 bytes) received from server "/var/www/fcgi/domain.com/php4-fcgi-starter"
oh the incomplete header prob Sad

Code:
#!/bin/sh

umask 022

PHPRC="/var/www/fcgi/domain.com/php4/"

export PHPRC
PHP_FCGI_CHILDREN=8
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=500
export PHP_FCGI_MAX_REQUESTS

exec /usr/bin/php4-cgi
So you already increase the PHP_FCGID_CHILDREN ?

Quote:why would it be that i can not force php5?
Should be no Problem! Only change the content from the php5-starter to the php4-starter.

Quote:site does not work at all and only shows a blank white page
Any Error logs about it ?

Do you have a high load average ?
Too many unkilled php process ? How many are running ?
Our Problem is still the every domain uses 5 Apache Logs.
And with your 200 Domains... Rolleyes

Greez BeNe
02-06-2008 06:05 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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