Web Stack Getting Started Guide

Working with PHP, Apache, and NetBeans

For creating a PHP application using NetBeans and to deploy the application to Apache Web Server, here is what you need to do:

ProcedureTo Configure PHP, Apache, and NetBeans

  1. Register Apache Web Server with NetBeans.

    1. In the NetBeans IDE, select the Services tab, select Web Servers > Add Host and select Local Web Server.

    2. Enter the correct path to Apache 2 configuration file.

      The default path of the Apache configuration file, httpd.conf is: /etc/apache2/2.2.

    3. Accept the default path for the Document Root field.

    4. Click Finish.

      The Apache 2 web server is listed under the Web Server node.

  2. Create a PHP project using NetBeans.

    1. Select File > New Project.

    2. Select PHP Project from the PHP category.

    3. Enter a target server for your PHP project.

    4. Click Finish.

  3. Write a PHP program.

  4. Right click on the project and select Run Project to view the output on a browser.

ProcedureTo Enable Debug for PHP Applications

  1. From the Launch menu of the Solaris operating system, select All Applications > Developer Tools > Web Stack Admin > Options.

    The Options screen is displayed.

  2. Select the PHP tab.

  3. Select the Debug check box.

    By selecting the check box you are enabling the automatic debug option for all PHP applications.

  4. You are prompted to restart the server.

  5. Click Restart for the change to take effect.