Hello world

I'm facing a kind of tricky problem :

On the web server of my company, php is installed as an apache module (the phpinfo page says : "Server API = apache).
I need php to be configured as a cgi in order to run a special application (MapServer). How can I configure php as a cgi on our web server ? ? ?

I worked it out on my personal Linux Box at home (Red hat 7.3):
- I compile a new php executable and placed it in the cgi-bin repertory of my apache server (/var/www/cgi-bin).

- I changed all Allowoverride directives to All in my httpd.conf to enable .htaccess file to override httpd.conf.
- I made a test directory on my server : (/var/www/html/test_php_cgi) and put an .htaccess file into it.
- this.htaccessfile as got the two following lines :
Addtype application/x-httpd-php .php4 .php .phtml
Action application/x-httpd-php /cgi-bin/php
It works fine (at hom, only :-{

When I hit the phpinfo page at the root directory (/var/www/html); it says php is installed as an apache module ("Server API = apache").
And when I hit the phpinfo page in my test directry (/var/www/html/test_php_cgi), it says php is installed as a CGI ("Server API = CGI").

How can I do the same on ou remote web server ?

Help greatly appreciated; thanks in advance.

Blaise

    Take the two lines out of the .htaccess* file and then put them in httpd.conf, but outside of any <Directory> bits

      All right, I can of course access the httpd.conf on my computer as I am the root. But how to access it on the remote server ? I can't see it in my FTP Explorer. It seems to be out of access for an ordinary user ...
      Blaise😕

        Write a Reply...