Calling PHP5 from a shell script
I have upgraded to ubuntu 8.04 with all the updates offered.
On a previous unnamed Linux system I had some bash script files that ran on PHP-4.
On my new installation, when I run the following code:
Now I get this error:
Is there a HOWTO for me to read? Do I need to rewrite my code?
Can anyone help?
You're definitely on the right track:
1. You really want PHP5 (not PHP4, if you can avoid it)
2. You *should* be able to call PHP5 from a command line or script... only now it will now be called "php5" (instead of the old name, "php").
Verify that PHP5 is installed and available from a terminal window:
a) change your script (to use "php5" instead of "php")
b) create a symbolic link to alias php5 to "php"
I vote for "a)". The syntax for a symbolic link would be:
EXAMPLE: ln -s /usr/bin/php5 /usr/bin/php
4. Perhaps maybe when you edited your script, you found some (but not all) instances of "php", and you simply need to find and change the rest?
'Hope that helps .. pSM
I am always amazed how a simple comment will trigger something.
Your comment 'try php5 --version'. I don't why but I had not tried that.
|All times are GMT -5. The time now is 03:32 AM.|