Forum Moderators: coopster

Message Too Old, No Replies

php as both cgi and module on apache

configure php as both cgi and module on the apache web server

         

sheriffbotros

11:59 pm on Oct 4, 2004 (gmt 0)



Hi All,
(go easy am brand new to php etc)
anyway...
is it ok to configure php as both cgi and module for apache 2.0; that is in the httpd.conf file set the directives that run both cgi and module?

coopster

9:10 pm on Oct 5, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, sheriffbotros.

(Windows-related answer):
I think it's either one or the other. However, you could setup two different configurations and bounce back and forth by renaming them and restarting Apache.

With *nix, it depends on how it is compiled.

Timotheos

11:49 pm on Oct 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Somebody in this thread [webmasterworld.com] msg #10 said it is possible. Worth a shot.

coopster

1:04 pm on Oct 6, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



That message is actually referring to the CLI, Timotheos, not CGI. Yes, you can have the Command Line Interface active in a module environment as well as a CGI environment. CLI and CGI are different SAPI's although they do share many of the same behaviors. Don't worry, a lot of folks get that confused. More reading available here...

Using PHP from the command line [php.net]