Running php script on command line & installing php5-cli library in phpserver

To run php in command line, you need to not only PHP, but also the PHP5-cli library in your php server. The PHP5-cli stands for command-line interpreter for the PHP5 scripting language. It is very useful when we need test our scripts from the shell. In some cases we need to install this library for running cronjobs on the server.

how to install php5-cli. in linux machines.

first login as super user : " su username "

after login just use the following command "sudo apt-get install php5-cli "

the php5-cli installation has completed

just restart your apache server. For that we can use the following command

How to restart a apache server on linux

sudo /etc/init.d/apache2 restart

After the restart of your server, the php5-cli has been installed on your server. and just try to run a simple php script on your server.


Post a Comment

Please put your comments here. your questions, your suggestions, also what went wrong with me.