faqts : Computers : Programming : Languages : PHP : Installation and Setup : CGI

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

30 of 31 people (97%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

I have PHP installed as a module, can I run scripts from the command line?

Jun 13th, 1999 07:00
Nathan Wallace, Juan Ignacio Pérez Sacristán, Teodor Cimpoesu, Paul DuBois, Rasmus Lerdorf


No.  You need to have PHP installed as CGI.

Since you have it installed as module, it's easy, just don't say
--with-apache when configuring, or reply [y] on first setup question
(build as cgi).

If you want to be able to use PHP as an Apache module, and as a
standalone program, you build it twice.  Once with --with-apache
(followed by an Apache build), once without it.  make install after the
first build copies the module into the Apache source tree.  make install
after the second build copies an executable php into /usr/local/bin (or
wherever you want to put it).

For more information see http://www.php.net/manual/config-security.php3