They’re chmod a+x. “which php” returns “/usr/local/bin/php”. Used to work just fine using “./script.php”. Now, that gives this error “bad interpreter: No such file or directory”. Weirder still is that “php script.php” executes the script fine. PHP appears to be the cli version:
[admin]# /usr/local/bin/php -v
PHP 4.3.4 (cli) (built: Dec 9 2003 03:07:33)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
I love cross-platform differences (especially MS’s):
Are you sure the files have not been edited with a Windows editor and
therefore have CR-LF line endings? If they do, it will be looking for
/usr/local/bin/php\r
I used dos2unix on the PHP files and they work fine now.