Way to Run PHP on Local Computer
In order to run PHP on local computer you must have to setup the necessary file and Application on your computer. Here are three vital components need to be installed on your computer system.
- Web Server: As you know PHP is a Server side language and to execute PHP you must need a Web Server. But you want to develop PHP on your Local computer. So you need to Install a PHP Supported Web Server on your Local Computer. Generally Apache is the most used web server on Web Environment and for local computer too. So you can use Apache Web Server to develop PHP on your computer without any Question. Download Apache web Server for free from here – https://httpd.apache.org/download.cgi .
- Database: Your Computer don’t have a PHP Supported Database Software. But PHP need a Supported Database Software properly installed on your Computer. In the most case MySQL database used on both Web Environment and Local Computer too. You can freely download MySQL from here – https://www.mysql.com/downloads .
- PHP Parser: To process PHP to send the Executable code on your Web Browser a PHP Parser must be installed on your Computer.
Install PHP Parser
Before Install PHP Parser it is important to check that you have proper environment setup on your computer to develop your web program using PHP. To check your your PHP setup information go to your desired web browser then type into address bar
http://127.0.0.1/info.php and the Enter button. If your browsers displays the PHP install related information then your Computer have properly installed PHP environment. In this case you are ready to develop PHP program locally. Otherwise you have to Install PHP environment by following given Instruction.
- Install PHP on Linux or Unix using Apache .
- Install PHP on Mac OS X Using Apache
- Install PHP on Windows Using Apache