Page 1 of 1

Reconfigure PHP as a CGI instead of an Apache mod [solution]

Posted: Thu Jul 13, 2006 4:35 am
by Kadanis
Hey

Again, sorry but I wasn't sure where to put this one.

I've been googling for the last couple of hours to try and see how to reconfigure my server so php runs as CGI and not as an Apache module.

I would like to be able to execute some of the php scripts from the command line and not via apache (if possible) and so far I've got as far as needing to be CGI

Fingers crossed someone can help.

D

Edit ->>

Well, just in case anyone looks at this in the future looking for a way to do this... it appears that the cgi and apache mod can run together just fine. They are installed together too on most linux platforms. Just calling

Code: Select all

/usr/bin/php-cgi -q /home/test.php
nb: remember to use the correct paths.

from the command line runs the page from cgi.