Re: PHP on command line not working...
| From: | Leif K-Brooks | Date: | Fri, 25 Apr 2003 02:18:14 +0000 |
| Subject: | Re: PHP on command line not working... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145217@lists.php.net to get a copy of this message | ||
The CLI is only running as long as whatever script it's told to run is. It's not a daemon, it's a program just like a text editor - it opens when you open it, and closes when you close it (or when your script ends).
Ken Tozier wrote:
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.This isn't a PHP issue, it's a *n*x issue. To execute a program in the current directory, you must type "./PROGRAM". So, instead of typing "php -v", type "./php -v".Bingo! That did the trick. Follow up question, I ran shell> top and don't see anything labeled php in the list of running processes. Is the CLI supposed to run in the background like MySQL? KenKen Tozier wrote:I've been trying for about 6 hours to get the PHP CLI working Mac OS 10.2.4 but am not having any luck. Anyone have any suggestions? //Make the PHP CLI binary [my-Computer:/apps/php-4.3.2rc1] myusername# make install-cli <lots of compiler messages here, then...>-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.Installing PHP CLI binary: /usr/local/bin/ Installing PHP CLI man page: /usr/local/man/man1/// Verifying that "php" is actually there... [my-Computer:/usr/local/bin] myusername% ls /usr/local/binMagick++-config convert montage pack_isam php-config resolve_stack_dump Magick-config identify my_print_defaults pear phpextdist resolveip comp_err isamchk myisamchk perror phpize composite mogrify myisampack php replace// try to get info from the command line [my-Computer:/usr/local/bin] myusername% php -v php: Command not found. // Since the cli lib is clearly where the documentation says it should be and I'm sure I missed something, but multiple readings of "http://www.php.net/manual/en/features.commandline.php" hasn't gotten me any closer to getting this thing working. Are there some out of the way config variables that need setting? Some files that need to be moved manually? Any help appreciated. Thanks Ken P.S. PHP is working great inside my browser, I just can't get the CLI working...