Entry
Why can't I run php from command line?
Feb 24th, 2002 23:22
Philip Olson, Nathan Wallace, Charles Chan, Henrik Hansen, Richard Lynch
Because you compiled it as a "Module" of Apache, rather than as a
standalone binary (aka "CGI"). Recompile without --with-apxs or
--with-apache.
Ignore that last make install step, and just put the resulting php
binary some place in your path. In otherwords, in shell do (in your
php4 source directory):
./configure;
make;
At that point a binary named 'php' is created, use it as you wish.
For more information on running PHP on the commandline, see:
http://www.php.net/commandline
http://www.phpbuilder.com/columns/darrell20000319.php3?print_mode=1