INSTALLING PHP DEVELOPMENT ENVIRONMENT
PHP DEVELOPMENT ENVIRONMENT
INSTALLING NECESSARY TOOLS
All scripts written in PHP are executed on the server side. User ’s web browser receives only the HTML code that is a result of processing PHP code by PHP interpreter.
It’s easy to guess that without such a server containing a PHP interpreter, we can not do nothing.
Luckily for us, over the years there has been published a lot of ready-made packages that makes installing development environment for PHP a lot easier. It’s enough to install one piece of software and we are ready to go.
The IT world changes very intensively. You may find it that recommended applications today will be abandoned in a year from now, leaving the space for another better solution. Something much better can appear and displace
underdeveloped projects.
At the time of writing this article, I will recommend one solution to you. However, try to check at Resources Page to verify that nothing better appeared. There you will always find the appropriate tools for PHP related stuff (including IDE, hosting and development environment).
PHP DEVELOPMENT SERVER
So far, the most convenient installation package I have worked with is EasyPHP (Windows only – for other systems check out XAMPP). With a few clicks you will install a ready server with PHP and MySQL support.
You can download the installation package from http://www.easyphp.org. You are interested in the latest devserver that’s available on the site. At this time it is version 17.0.
When you run and install the package environment, you will have access to the localhost address in your browser. This means that after entering localhost in the address bar EasyPHP welcome page will pop up.
Congratulations, the server is already up and running.
EasyPHP is successfully isntalled.
If you are unable to install and run EasyPHP yourself, take a look at the YouTube movie below. There I recorded the whole step by step process of installing and launching EasyPHP. I can’t predict any possible issue, so you can always ask in comments if something doesn’t work as it should be.
Ii will definitely help.
Thanks to EasyPHP we have installed not only a server with PHP support, but also a MySQL database with an online management panel. For now, let’s leave database and focus purely on PHP. We’ll deal with it in the later section of the course.
Remember that EasyPHP creates for us a server with PHP support – this does not mean that the PHP interpreter will be installed in our system. We still need to separately install PHP on the system to make it available from the terminal (console, command line – who likes what).
If you use Mac, you already have PHP installed on your system by default. For Windows users, installing PHP on the system is as easy as eating chocolate. It’s hard to even name it “installation”. It’s just about downloading the latest version PHP in ZIP format (from https://windows.php.net/download/) and unpacking its content (e.g. to C:/php). Then, using the console, we can use the command php, being in the context of the C:/php folder.
TIME FOR A TEXT EDITOR
This is where you will spend the next hours writing PHP code.
PHP development environment is all about writing and running the code. Running we have covered with EasyPHP. Now, it’s important to choose a convenient and helpful tool to write the code. As far as there are relatively few server packages, so many code editors appeared, like mushrooms after rain.
Huge amount of similar tools. Just to name few modern ones:
Atom
Brackets
Sublime
VisualStudio Code
PHPStorm (premium)
Classic ones:
Eclipse with PDT
NetBeans
Old-school:
Notepad++
PsPAD
And to give some credits to Linux users too:
Vim
gedit
As you can see, there are many of them. Just choose the one that will suits you the most. In fact, you can write code even in a classic notebook app, but you will regret missing the advantages of all the new tools.
For now, I use M
Comments
Post a Comment