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 13th September 2010, 03: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
  #2  
Old 13th September 2010, 10:54
wildnux wildnux is offline
Junior Member
 
Join Date: Sep 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
  #3  
Old 13th September 2010, 13:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
 
Default

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

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

Tags
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 05:11
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 21:13
FFMPEG maybe not an php library? Mkipz Installation/Configuration 2 14th September 2009 21:13
ubuntu ispconfig joomla .htaccess steve1084 General 8 6th January 2007 15:55
php files don't work on Apache 2.2.3 Jcorrea920 General 2 1st November 2006 02:39


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


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