By octav on Nov 01, 2007
Alexei and the team have been working on a PHP plugin for NetBeans 6. I am hoping they'll be able to release it on the NetBeans 6 update center in early December. The bits will be young, beta quality at best, however I am experimenting with PHP support in NetBeans and I like what I see so far.
The first thing one may do is make sure to get a runtime stack that supports the deployment of PHP applications. Given that many of these apps will have a database backend, this calls for something like MySQL. You'll also need a matching web server, and apache comes to mind . Here are few easy steps to get started:
- SSH Server (for remote access)
: sudo apt-get install ssh
- Database Server
: sudo apt-get install mysql-server
- Apache HTTP Server
: sudo apt-get install apache2
- PHP for Apache HTTP Server
: sudo apt-get install php5
- MYSQL for Apache HTTP Server
: sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
Once you install the PHP plugin in NetBeans, use the "Services" tab to configure the document root for Apache web server installation. On my Ubuntu installation the document root is /var/www/apache2-default. You will likely have to change the permission for the document root, since NetBeans is usually install in user mode and apache required sudo.
To test everything, just create a new PHP Project in the IDE and add the following line of code: phpInfo(); in the default file. Next deploy you page and in your browser look for something like: http://localhost/apache2-default/index.php