You don't have ./ in your $PATH so you must type ./test.php to execute it

Leif K-Brooks wrote:

I'm trying to do shell scripting in PHP. I have PHP installed in /usr/bin/php. I have the following script:
#!/usr/bin/php -q
print "Success!\n";
It's saved as test.php and CHMODed to 777. When I type "test.php" at the command line, it says:

bash: test.php: command not found

When I type "test", it acts like I just hit enter. Typing "/usr/bin/php -q test.php" does work. Does anyone know what I'm doing wrong?

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to