Frequently Asked Questions
Install PHP?
Is it possible to download an installation file with which I can install PHP locally on my computer? I want to learn PHP, and I want to be able to look at the files without having to upload them to my webspace.
Actually, yes, that is possible, but it’s not for beginners! You’ll need to run a webserver – if you have a Linux host, apache.org is probably the best call. They have instructions on how to set it up, download it, configure it, etc.
Then go to php.net and download the latest PHP binaries for Windows. Install it, and follow the directions to configure it.
After you have a webserver installed, there will be a folder on your computer called the “web root”. You put your files in there (and its subdirectories) and if you type http://localhost/ or http://127.0.0.1 into your browser, you will be able to see your website (which consists the files in that directory). And anything with a .php extension will be executed as a PHP script.
Tips:
-
This website has step-by-step instructions on how to install Apache and PHP in a Windows environment. It is very helpful.
-
When configuring Apache it asks for a domain/server name. You should enter “localhost” (without the “”).
-
There are a few “packages” you can download which already come with apache, php, MySQL and a few more things. One of them is XAMPP, it’s very easy to install and you’ll have PHP on your computer within minutes.