Activating CGI programs in EasyPHP

EasyPHP is a free Web-server software suite, providing a Windows version of Apache, MySQL and PHP (WAMP) in an easy-to-install package. But it doesn’t run CGI programs automatically. But it is quite easy to enable.

After installing, and ensuring it runs to make the changes, you needs to quit! Then:

  1. “Run as administrator” (right-click on the icon, and select from the pop-up menu).
  2. Right-click on the tray icon, and from the pop-up menu, select Configuration, and then Apache.
  3. The Apache http web configuration file, httpd.conf, will appear. Look for the line:
    #AddHandler cgi-script .cgi
  4. Uncomment the line by removing the preceding #, which tells Apache to run the CGI program if encountered.
  5. Search for the line: # DocumentRootDirectory. Below another block of comments find the line:
    Options Indexes FollowSymLinks, and add to it:
    Options Indexes FollowSymLinks ExecCGI
  6. Save the file (if won’t save, then you might not have run easyPHP as an administrator.

You don’t need to restart the server for the changes to the configuration file to take effect, just save the file, and refresh your web page.

You’ll also need to repeat steps 5-6, each time you add a new Alias in the EasyPHP Administration screen to a new directory.