Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th December 2006, 19:43
meridianblade meridianblade is offline
Junior Member
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default fastCGI and PHP just wont work!

Hey guys, I am absolutely stressed out with this, I just cant figure it out. Im trying to get fastCGI to work on Apache/1.3.37 with php-4.4.3.

I need to run phpsuexec and eaccelerator together and for that I need to get fastCGI working on my box.

Here's what I have done so far:

I downloaded and compiled fastCGI.

Ran the following commands:
Code:
/usr/local/apache/bin/apxs -o mod_fastcgi.so -c *.c
/usr/local/apache/bin/apxs -i -a -n fastcgi mod_fastcgi.so
so my server returns and shows that fastCGI is loading:
Server Version: Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b

I added the following to the bottom of my httpd.conf
Code:
<IfModule mod_fastcgi.c>
    FastCgiIpcDir /tmp/fcgi_ipc/
    AddHandler fastcgi-script .fcgi
    FastCgiSuExec /usr/local/apache/bin/suexec
</IfModule>
FastCgiConfig -maxClassProcesses 20 -maxProcesses 20 -minProcesses 1 -processSlack 1 -idle-timeout 120
then:
Code:
mkdir -p /tmp/fcgi_ipc
chmod 755 /tmp/fcgi_ipc -R
then I compiled PHP-4.4.3 with the following:
Code:
./configure --prefix=/usr --with-xml --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --enable-magic-quotes --with-mysqli --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-zlib --enable-force-cgi-redirect -–enable-fastcgi

make 
make install
finally a service httpd restart

needless to say my server api still shows CGI and a php -v doesnt display fastCGI at all.

What am I missing guys? :-(

Thanks for your help in advance!
Reply With Quote
Sponsored Links
  #2  
Old 11th December 2006, 14:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What does a phpinfo page show?
Create a PHP file like this:
PHP Code:
<?php
phpinfo
();
?>
and access it in your browser. Does it show fastcgi?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 11th December 2006, 19:09
meridianblade meridianblade is offline
Junior Member
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey if you want you can look at here:
http://www.crgn.net/info.php

'--enable-fastcgi' is in the config.

also:
Code:
root@host [~]# php -v
PHP 4.4.3 (cli) (built: Dec  9 2006 11:13:27)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with eAccelerator v0.9.3, Copyright (c) 2004-2005 eAccelerator, by eAccelerator
    with Zend Extension Manager v1.0.9, Copyright (c) 2003-2006, by Zend Technologies
    with Zend Optimizer v2.6.2, Copyright (c) 1998-2006, by Zend Technologies
does not show fast cgi.

from my httpd.conf:

Code:
LoadModule fastcgi_module     libexec/mod_fastcgi.so
AddModule mod_fastcgi.c

<IfModule mod_fastcgi.c>
    FastCgiIpcDir /tmp/fcgi_ipc/
    AddHandler fastcgi-script .fcgi
    FastCgiSuExec /usr/local/apache/bin/suexec
Action application/x-httpd-php4 "/php4.fcgi"
AddType application/x-httpd-php4 .php
AddType application/x-httpd-php4 .php4
AddType application/x-httpd-php4 .php3
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php4 .phtml

</IfModule>
FastCgiConfig -maxClassProcesses 20 -maxProcesses 20 -minProcesses 1 -processSlack 1 -idle-timeout 120
Thanks!
Reply With Quote
  #4  
Old 12th December 2006, 14:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by meridianblade
Hey if you want you can look at here:
http://www.crgn.net/info.php

'--enable-fastcgi' is in the config.
I think this looks good.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 12th December 2006, 15:59
misterm misterm is offline
Senior Member
 
Join Date: Aug 2005
Posts: 521
Thanks: 15
Thanked 7 Times in 6 Posts
Default

Hello with all

I have this error under the archlinux....

Quote:
/usr/sbin/apxs -o mod_fastcgi.so -c *.c
/usr/build-1/libtool --silent --mode=compile gcc -prefer-pic -march=i686 -O2 -pipe -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/usr/include/apache -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/include -c -o *.lo *.c && touch *.slo
X*.lo
libtool: compile: libobj name `*.lo' may not contain shell special characters.
gcc: *.c: No such file or directory
gcc: no input files
apxs:Error: Command failed with rc=65536
.
MM
__________________
ISPConfig, the panel fantastic , http://www.ispconfig.be/forums/
http://www.ispconfig.be/
Reply With Quote
  #6  
Old 12th December 2006, 16:50
meridianblade meridianblade is offline
Junior Member
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hum, I thought it would tell me that fast cgi was running with the command php -v. How can I tell if it's running or not? I just have the feeling im missing something :-(
Reply With Quote
  #7  
Old 12th December 2006, 18:26
meridianblade meridianblade is offline
Junior Member
 
Join Date: Dec 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's not working, I just realized that eAccelerator works with fastCGI and as a apache module only, not regular CGI, so looking down at the eAccelerator entry it says false to both.

uhg, im so lost
Reply With Quote
  #8  
Old 13th December 2006, 14:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Maybe these links help you: http://www.maven.pl/?p=10
http://mojora.wordpress.com/2006/12/...d-fastcgi-php/
http://www.howtoforge.com/forums/showthread.php?t=4606
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 2nd January 2007, 12:28
misterm misterm is offline
Senior Member
 
Join Date: Aug 2005
Posts: 521
Thanks: 15
Thanked 7 Times in 6 Posts
Exclamation

Hello with all

Good year 2007

Then veiled, all functions starting from the configuration, but when I decontaminate php in my file httpd.conf, is that, when I to start again apache, it me but that like error

Quote:
Syntax error on line 36 of /etc/httpd/vhosts/Vhosts_ispconfig.conf:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration
[root@sv1 httpd]# nano vhosts/Vhosts_ispconfig.conf
What to make?

thank you

mm
__________________
ISPConfig, the panel fantastic , http://www.ispconfig.be/forums/
http://www.ispconfig.be/
Reply With Quote
  #10  
Old 3rd January 2007, 17:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

What's in Vhosts_ispconfig.conf?

Is the PHP module included in your Apache configuration?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fastcgi and php with ispconfig tosser Installation/Configuration 14 18th January 2009 13:41
fastcgi and php with ispconfig tosser Tips/Tricks/Mods 3 25th June 2006 21:01
Fastcgi support till Developers' Forum 0 7th May 2006 18:36


All times are GMT +2. The time now is 04:42.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.