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.
Thread Tools Display Modes
Old 13th September 2010, 04:28
wildnux wildnux is offline
Junior Member
Join Date: Sep 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy help with php running as cgi script in Apache opensuse 11.3

I am trying to run php as cgi script with apache and opensuse 11.3. I disabled the mod_php and installed mod_fcgid, and php-fastcgi, using these instructions here as my guide.

I have been trying to achieve this, but, somehow it is not working. I can see the page if i have an index.html, but if i have index.php, it downloads it as a file. I really tried to set this thing up for more than 12 hrs now. I am soo frustated. I followed that instruction so many times, changing every thing my little brain could handle, but still not working. Please give me some suggestions.

my /etc/apache2/vhosts.d/shekhar.conf

my /srv/www/wrapper/shekhar/php5

my /etc/apache2/conf.d/mod_fcgid.conf (I uncommented the lines inside the <FilesMatch > Tag., it gave me same result, even after uncommenting the tag.)

my /etc/apache2/httpd.conf

please let me know if you know any additional details..
Reply With Quote
Sponsored Links
Old 13th September 2010, 11:54
wildnux wildnux is offline
Junior Member
Join Date: Sep 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

After working on it for many hours again, I managed to make it work. But I had to comment the SuexecUserGroup line in /etc/apache2/vhost.d/shekhar.conf file.

I also uncommented the <FilesMatch > element in mod_fcgid.conf file.

Now, if I have a file.php, it works. works with https too. But If i rename it to a .cgi file, it just downloads the file. What should I do so that it knows the cgi extension?
Reply With Quote
Old 13th September 2010, 14:01
falko falko is offline
Super Moderator
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts

I guess you need to add something like this to your /etc/apache2/conf.d/mod_fcgid.conf:

<FilesMatch "\.cgi$">
    AddHandler fcgid-script .cgi
    FCGIWrapper /srv/www/cgi-bin/php5 .cgi
    Options +ExecCGI
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


apache, cgi, fcgid, opensuse, php5

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
Companion Script #2 for The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]" MrCompTech Tips/Tricks/Mods 0 10th July 2010 06:11
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 22:13
FFMPEG maybe not an php library? Mkipz Installation/Configuration 2 14th September 2009 22:13
ubuntu ispconfig joomla .htaccess steve1084 General 8 6th January 2007 16:55
php files don't work on Apache 2.2.3 Jcorrea920 General 2 1st November 2006 03:39

All times are GMT +2. The time now is 05:16.

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