Way to Run PHP on Local Computer
In order to run PHP on a 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 just 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 a 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 doesn’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 PHP setup information go to your desired web browser then type into the address bar
http://127.0.0.1/info.php and the Enter button. If your browsers display the PHP install related information then your Computer has properly installed PHP environment. In this case, you are ready to develop the 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