20071128 Wednesday November 28, 2007

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.

( Nov 28 2007, 02:45:54 AM PST ) Permalink Comments [9]
Comments:

Does the plugin actually require a nightly build of 6.1? I've been holding off on upgrading my Netbeans install until 6.0 comes out. I'd rather stick with that for now rather than have to go to the absolute bleeding edge.

Posted by Wayne Abbott on November 28, 2007 at 01:57 PM PST #

How'd you get the nimbus LAF working with netbeans?

Posted by lambert torres on November 28, 2007 at 04:51 PM PST #

Wayne, You don't need 6.1. You can try the plug-in with NetBeans 6.0 RC2.

Posted by Phantom on November 28, 2007 at 09:10 PM PST #

Lambert,
NB had some issues with Nimbus LAF. You can track the bug here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6612359

Posted by Phantom on November 28, 2007 at 09:15 PM PST #

PHP based on pure Java (http://www.caucho.com/resin-3.0/quercus/) is another option. This way an Apache web server is not mandatory and a Tomcat/Jetty/… for a Java WebApp is enough. On this path one can use the standard deployment/debugging tools.

Posted by Christian Ullenboom on December 12, 2007 at 02:14 PM PST #

It was about time... I'm very happy that php is finally integrated with netbeans(I hate eclipse and there were plugins).
By the way congulations to the developing team for the great work...
There is a small bug I've already reported... and it's not fixed yet but it will be ... I'm sure...
http://www.netbeans.org/issues/show_bug.cgi?id=123597

Posted by netbeansLover on December 12, 2007 at 02:55 PM PST #

Lambert, check this out for Nimbus L&F for NetBeans:
http://blogs.sun.com/phantom/entry/nimbus_look_and_feel_for

Posted by Phantom on December 17, 2007 at 10:12 PM PST #

there is a green background color for <?php ... ?> part of the page. How do i change that to something else?

Posted by kiran on December 26, 2007 at 08:18 PM PST #

Kiran,
Current release of the plug-in does not allow you to customize colors....but I will post a comment in this thread when there is something similar. Thank you for trying the plug-in.

Posted by 122.167.67.74 on December 26, 2007 at 09:09 PM PST #

Post a Comment:

Comments are closed for this entry.