Hello NetBeans, this is PHP!

Do you know that you can use NetBeans to build web applications using PHP? PHP plug-in is an extension to the NetBeans IDE that enables you to perform web based development on NetBeans. While there are several PHP IDEs available in the market today, NetBeans PHP plug-in offers the same functionalities offered by other IDEs and then much more. Here is a short note to quickly get you started with NetBeans PHP plug-in in Solaris.

What do you need?

1. Solaris OS
2. NetBeans 6.1 Nightly Build
3. Apache 2.2 and PHP 5.2.4 (Get the CoolStack)

After installing the NetBeans 6.1 nightly build, Go to Tools > Plugins > Available Plugins

Select PHP plug-in and click Install. Follow the screens and restart the IDE.

After installing CoolStack, start httpd. Make sure Apache is running by pointing your browser to http://localhost.

In the Services tab select Web Servers > Add Host and select Local Web Server.

Then, provide the correct path to Apache 2 configuration file.

Enter a valid Document Root for Apache2 [Accept the defaults].

After finishing with the configuration, you should see Apache2 connection under Web Servers as shown below:

For creating a new PHP project, select File > New Project and select PHP Project from the PHP category.

Provide a target server for your PHP project.

In your PHP code, type phpinfo(); to get the PHP configuration information.

OK, now is my simple PHP code:

You can right click the project and select Run Project to view the output on a browser. There are also NetBeans modules for PHP Debugging.

Check out the NetBeans PHP Wiki for more information.

Trackback URL: http://blogs.sun.com/phantom/entry/hello_netbeans_this_is_php

Discussion Area - Leave a Comment