Re: CLI problems
| From: | Jackson Miller | Date: | Tue, 03 Jun 2003 22:00:30 +0000 |
| Subject: | Re: CLI problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150084@lists.php.net to get a copy of this message | ||
Try using #!/usr/local/bin/php
My guess is that when you run:
ls -ls /usr/bin | grep php
you will see that php is a symlink to /usr/local/bin/php
-Jackson
On Tue, 2003-06-03 at 16:54, Brian Paulson wrote:
> I have been looking for answer but have not located any thing that will
> solve my problem.
>
> The problem I am having is that I cannot get php scripts to run from the
> command line, I can run php straight from the command line and it works
> and by using -f it parses my file just fine, but when it comes to
> running the script from the command line all I get is the : bad
> interpreter : and I know that I am telling it the correct location.
>
>
> [user@intranet user]# /usr/bin/php -v
> PHP 4.3.2 (cli) (built: Jun 2 2003 08:52:29)
> Copyright (c) 1997-2003 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
>
> [user@intranet user]# vi test.php
> #!/usr/bin/php
> <?php
> phpinfo();
> ?>
>
> [user@intranet user]# ./test.php
> : bad interpreter: No such file or directory
>
>
> -rwxrwxrwx 1 user user 39 Jun 3 15:43 test.php
>
> Thank You
> Brian Paulson
> Sr. Web Developer
> Email: Bpaulson@Chieftain.com
> Phone: 1-800-279-6397
> Fax: 1-719-544-0264
> URL: www.chieftain.com
> -------------------------------------------
>
>