Creating a ZnetDK project in NetBeans

86 views
Skip to first unread message

Pascal Martinez

unread,
Sep 27, 2015, 9:30:45 AM9/27/15
to zne...@googlegroups.com
Hello,

This post shows you how to create a new ZnetDK project in NetBeans, to develop and debug your custom application.

Prerequisites
  • NetBeans 8 is installed locally on your personal computer (NetBeans 8.0.2 is used in this post),
  • A WAMP or LAMP package is installed locally on your personal computer (EasyPHP 14.1 is used in this post),
  • You've downloaded ZnetDK 1.0 on your personal computer.
Procedure
 
1. Copy in your NetBeansProjects directory the content of the znetdk-1.0.zip archive: for example, in "C:\Users\MyName\Documents\NetBeansProjects\znetdk".

2. Launch NetBeans and select in the main menu the 'File | New Project...' item.
 

 
 3. In step 1, choose PHP Application with Existing Sources then click the Next button.

 
 4. In step 2, clicking on the Browse button, select the "C:\Users\MyName\Documents\NetBeansProjects\znetdk" directory where you've copied ZnetDK 1.0, then click on the Next button.

 
5. In step 3, choose for Run As: the option "Local Web Site", check the boxes "Copy files from Sources Folder to another location", select your WAMP web publishing directory for the Copy to Folder: field. Finally, check the "Copy files on project open" and click on the Finish button.

 
6. Your project is now created as shown below:



 7. Now, add a breakpoint to the line of the PHP script of your choice, then click on the Debug Project button (Ctrl + F5) to start a debug session.



For more information on NetBeans, go to the official website at https://netbeans.org/features/php/

Pascal MARTINEZ


Pascal Martinez

unread,
Oct 4, 2015, 3:33:14 PM10/4/15
to zne...@googlegroups.com
Hello,

For those who choose to develop their ZnetDK application with the XAMPP distribution, extra configuration is required.

Disabling PEAR
The PEAR framework is enabled by default in XAMPP and must be disabled to avoid conflicts and errors in ZnetDK.
To do so, comment the following line in the 'C:\xampp\php\php.ini' configuration file:

include_path=".;C:\xampp\php\PEAR"

Configuring Xdebug
Xdebug is disabled by default in XAMPP and must be enabled to debug the PHP code from NetBeans.
The following options must be set in the 'C:\xampp\php\php.ini' configuration file:

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000


For additional informations, see the website https://netbeans.org/kb/docs/php/configure-php-environment-windows.html#installConfigureXAMPP and the help locally installed with XAMPP. 

Pascal MARTINEZ




Reply all
Reply to author
Forward
0 new messages