PDA

View Full Version : Testing PHP



MasterMind Karthik
July 10th, 2010, 03:45 AM
Well guys,

I want to try out PHP... I haven't installed Apache or mySQL so far... So, how should I start? I am quite frequent with programming PHP...

Do help :)

Finalfantasykid
July 10th, 2010, 03:51 AM
I don't think you need Apache or anything like that. And you will only need mysql if you are doing database stuff.

For php you should be able to get that from the package manager, just search for php5 or something. Then to run that program you can just type in "php nameOfFile.php", or you can probably open it in a browser as well.

Sorry if this didn't answer your question.

era86
July 10th, 2010, 08:50 AM
I think since PHP is very prominent in web development, you might be confusing what you actually need to write PHP programs. If you are interested in web dev, then you will need apache, php, etc., but if you are writing scripts, just install php5.

lisati
July 10th, 2010, 09:09 AM
There's a command line version that you can install:

sudo apt-get install php5-cli
Then you can run:
php5 {php-filename}