PHP 5.4 Support: Built-in web server

Hi all, today we would like to show you how easily in NetBeans one can use the PHP built-in web server which will be part of the upcoming PHP 5.4. This functionality will be available in NetBeans 7.2.

Note: For the built-in web server to work, one must install PHP 5.4 (RC 6 available these days). Please notice that there are still some issues that needs to be solved for the final version of NetBeans 7.2.

As I promised, using it is very simple - just open Project Properties of any of your existing projects, select Run Configuration and choose PHP Built-in web server from the Run As combo box. You will see something like this:

PHP Built-in web server configuration.

As you can see, all the configuration options are available to be set in NetBeans. This configuration panel is also available for new PHP projects wizard.

That's all for today, as always, please test it and report all the issues or enhancements you find in NetBeans BugZilla (component php, subcomponent Project).

Comments:

Great work!

I'll use/test it today, Netbeans 7.2 will be really awesome!

Posted by hwao on February 22, 2012 at 04:13 PM CET #

This is a very nice feature.

It would be great if there was a little tutorial show to configure NetBeans with the internal web server and xdebug.

My only request is that PHP profiling support be included :)

http://xdebug.org/docs/profiler

Posted by raymond on February 22, 2012 at 05:06 PM CET #

There no problem to configure xdebug with php 5.4 built-in server.

If you debugging on local (dev) machine you need to edit php.ini:
1) add:
zend_extention=/abosute/path/to/xdebug.dll
# USE ABSOLUTE PATH!!! relative path does not work.
#http://xdebug.org/docs/install
2) add:
xdebug.remote_enable=1
3) run php from command line:
php.exe -S localhost:3000
4) check if xdebug loaded:
#index.php
<?php phpinfo();

4) configure NetBeans to work with localhost:3000

Notes: latest release of NetBeans 7.1,(7.2RC) (date july 2012)
seems to be unstable when working with build-in webserver and xdebug.

Posted by zuzu on July 16, 2012 at 09:34 AM CEST #

I have tried using the new php built in web server but when it runs I get lots of dll errors saying the specified module can not be found.
I don't know if this is a netbeans error or I need to configure something else.

Posted by luvdubz on July 25, 2012 at 04:43 PM CEST #

@luvdubz: It seems that there is some problem with your local PHP installation (also please verify that you have PHP 5.4 installed).

Posted by Tomas Mysik on July 26, 2012 at 05:44 AM CEST #

Thank you for the reply, yes netbeans was pointing to the wrong place I have now installed the correct version of php and all is working fine except kohana projects.
Does anyone know of a step by step guide on how to install and set up a full environment that is php apache & mysql and how to get it all working to run and test on local host.

Posted by luvdubz on July 27, 2012 at 08:21 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today