Current Location: Home> Latest Articles> How to Run PHP Applications on AppServ | Complete Guide

How to Run PHP Applications on AppServ | Complete Guide

M66 2025-07-14

How to Run PHP Applications on AppServ

This article will guide you through the complete process of running PHP applications on AppServ. With these simple steps, you'll quickly configure and run PHP applications.

Start AppServ

First, double-click the AppServ icon on your desktop, or start AppServ from the Start menu.

Ensure PHP is Running

In the AppServ control panel, check if the PHP service is running. If it isn't, click the 'Start' button to start the PHP service.

Configure PHP Path

Open the AppServ control panel and click the 'Settings' tab. In the 'PHP Settings' section, ensure the 'PHP.exe Path' points to the PHP executable file. The default path is typically 'C:\AppServ\PHP5\php.exe'.

Create a PHP File

Next, create a PHP file containing your code. For example, create a file named 'hello.php' and input the following code:

<?php<br>echo "Hello, world!";<br>?>

Place the PHP File in AppServ's Document Root

The default document root for AppServ is located in 'C:\AppServ\www'. Copy or move your 'hello.php' file into this directory.

Run the PHP File in a Browser

In your browser, enter the following URL to access your PHP file:

http://localhost/hello.php
If everything is set up correctly, the browser should display 'Hello, world!'.

Additional Tips

  • If you want to use a different version of PHP, you can select it from the 'PHP Settings' section in the AppServ control panel.
  • If you encounter any issues, make sure necessary PHP extensions like MySQL or cURL are installed.
  • You can check your current PHP version and configuration by going to the 'Information' tab in the AppServ control panel.

Conclusion

That’s all for running PHP applications on AppServ. If you run into any problems, check the configurations and ensure all required PHP extensions are installed.