LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-09-2011, 12:43 AM   #1
vockleya
Member
 
Registered: Aug 2009
Posts: 87

Rep: Reputation: 16
FastCGI and Apache not loading pages


I am trying to set up my Apache server with FastCGI as the CGI engine. It will be mostly running PHP, but I may add Perl or something else later. I started from a completely fresh install of Ubuntu 11.04 with every update available. I used the install CD to install a LAMP server as part of the system install.

I am using the tutorial at http://www.chriswiegman.com/2010/06/...ithout-varwww/ to add the FastCGI functionality. I am having some problems with getting everything to work.

The first problem was that apache2-suexec-custom wouldn't accept a different document root. I fixed that by compiling apache2-suexec from source with the document root changed to the correct path.

The next problem is that every php page I load throws a 500 error. Apache's error logs show that FastCGI isn't returning the page data correctly to Apache.
Quote:
[Sat Jul 09 01:23:54 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Sat Jul 09 01:23:54 2011] [notice] Apache/2.2.17 (Ubuntu) mod_fcgid/2.3.6 configured -- resuming normal operations
[Sat Jul 09 01:23:55 2011] [warn] [client 192.168.100.13] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sat Jul 09 01:23:55 2011] [error] [client 192.168.100.13] Premature end of script headers: test.php
All that should happen when I open test.php in a browser is that "test" should print on the page. The problem is, a 500 error is thrown, and the page is not displayed. As far as I can tell the php file isn't even being accessed at all.

Any idea what could be causing this? Any help would be greatly appreciated.
 
Old 07-09-2011, 02:19 PM   #2
vockleya
Member
 
Registered: Aug 2009
Posts: 87

Original Poster
Rep: Reputation: 16
I just got it working. It turns out that I had the fcgi php wrapper script pointing to the wrong php5 executable.
 
  


Reply

Tags
apache, fastcgi, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache with php/suexec/fpm/fastcgi? hoodez Linux - Server 0 07-23-2010 01:26 AM
Apache is stalling out on loading up some pages. danieltoner Linux - Server 5 03-17-2008 11:12 AM
Installing mod_perl and FastCGI on Apache 1.3 initself Linux - Server 0 09-08-2006 06:57 PM
Apache httpd not loading php pages properly. queezythegreat Linux - Networking 0 09-26-2004 03:50 PM
slow loading pages with Apache/MySQL dmedici Fedora 0 07-20-2004 12:49 PM


All times are GMT -5. The time now is 03:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration