HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   help with php running as cgi script in Apache opensuse 11.3 (http://www.howtoforge.com/forums/showthread.php?t=48740)

wildnux 13th September 2010 03:28

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..

wildnux 13th September 2010 10:54

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?

falko 13th September 2010 13:01

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>



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

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