PHP5 on unbuntu
Moderator: General Moderators
- akimm
- Forum Contributor
- Posts: 460
- Joined: Thu Apr 27, 2006 10:50 am
- Location: Ypsilanti Michigan, formally Clipsburgh
PHP5 on unbuntu
I am wondering if anyone can help me get my CLI running, or how exactly I would do that, via bash, or otherwise?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
> sudo apt-get install php5- akimm
- Forum Contributor
- Posts: 460
- Joined: Thu Apr 27, 2006 10:50 am
- Location: Ypsilanti Michigan, formally Clipsburgh
No Feyd, I know I mislabled the post. I just did that to attract someone like you to an easy answer.
Which my answer will still invariably be easy, but not so much so.
i have php5 in my etc
I just want to know how to use the Command line aspect of PHP, so I can write scripts in the terminal, which i know i still could with cat > php.php or whatever I might choose to name it, but I thought that PHP could be compilled on the spot in the terminal. Am I correct on this?
Which my answer will still invariably be easy, but not so much so.
i have php5 in my etc
I just want to know how to use the Command line aspect of PHP, so I can write scripts in the terminal, which i know i still could with cat > php.php or whatever I might choose to name it, but I thought that PHP could be compilled on the spot in the terminal. Am I correct on this?
Have you enabled CLI as per instructions on php.net?
Is /etc/php5 in your PATH? (adjust /etc/php5 as necessary)
have you run:
(change php to name of php executable)
have you checked all the php.ini directives?
if yes to all the above, then simply:
where #: represents your command prompt (i.e. don't type it..)
Is /etc/php5 in your PATH? (adjust /etc/php5 as necessary)
have you run:
Code: Select all
sudo chmod +x /etc/php5/phphave you checked all the php.ini directives?
if yes to all the above, then simply:
Code: Select all
#: php -r <your code here>
Last edited by Jenk on Tue Sep 19, 2006 5:04 am, edited 1 time in total.