Configuring the PHP Development Environment in Solaris
This tutorial shows you how to set up the PHP development environment on OpenSolaris 2008.05 or the Sun Solaris Express Community Engine (SXCE). On both Solaris systems, the PHP engine, Apache server, and MySQL database server are included in a Web Stack package.
MySQL Server 5.0 is recommended.
Included in the amp-dev package.
A PHP debugger (optional)
Included in the amp-dev package but disabled by default.
Installing the Web Stack on OpenSolaris 2008.05
Use the package manager or the command line to install the amp-dev web stack package. The amp-dev package includes the PHP engine, the Apache HTTP server, the MySQL database server, and the webstackui package, with desktop tools for using the AMP components. After the package is installed, the Applications > Developer Tools > Web Stack Admin menu is available.
On SXCE the web stack is installed by default. You only need to initialize it.
Initializing the Web Stack Components
Before you can use the AMP for Solaris, you need to initialize the Web Stack components.
To initialize the Web Stack:
Choose Applications > Developers Tools > Web Stack Admin > Initialize.
The following Terminal appears:
Press Enter upon a prompt.
A context menu for Web Stack Admin appears. To configure a component, choose Options. To start/stop the Apache/MySQL server, choose the relevant menu item. You can also create and run a Sample App.
Enabling Debugging and Configuring PHP Components
After you initialize the AMP package, you can enable debugging and configure other components.
To enable debugging and configure the AMP:
Open the Options dialog (Applications > Developer Tools > Web Stack Admin > Options).
To see the information about your AMP configuration, click Show phpinfo. This runs the built-in <php-info> script.
The Options dialog also helps you perform the following configuration
tasks:
In addition to debugging and running php-info, the PHP tab lets you set error reporting levels and gives you a quick link for opening php.ini if you need to edit it.
You can allow remote access to the MySQL server or edit the my.cnf configuration file from the MySQL tab.
You can start or stop the Apache servers from the General tab.
In the Apache2 tab, you can set the Apache port number, change the web directory (/var/apache2/2.2/htdocs by default), create separate home directories for different users in the web directory, and open the httpd.conf file for editing.
To send comments and suggestions, get support, and keep informed on the latest
developments on the NetBeans IDE PHP development features, join
the mailing list.