Skip to content

How to setup Zend Framework and Zend Tool in Netbeans

September 14, 2010

I have assumed that you have installed Zend Server Community Edition (5.0.2) and Netbeans IDE (6.9.1)

1- You need to let netbeans know where zf.bat is

Tools-> Options -> PHP (Tab) -> Zend (Tab)

Locate zf.bat in Zend Script textbox, and click “Register Provider”.

2- You need to let netbeans know where php.exe is, this maybe optional but I think it’s a good practice

Tools-> Options -> PHP (Tab) -> General (Tab)

Locate php.exe in the PHP 5 Interpreter

I would also check “Web Browser”

These two steps should make everything ready to go for ZF developing, you can verify this by creating a new project, you should see Zend Framework when you are doing that. So go ahead and make a new Zend project.

You should also see a Zend item added to the context menu when you right click on your project’s name, there you must see all available zf.bat’s commands.

3- You should add Zend Framework’s Libraries to your “PHP include paths”.

Right click on your project,

Properties -> PHP include path (Item) -> Add folder

Locate and add  “…….\Library\Zend\”  from the place you have installed your Zend libraries.

This will only help you with code completion,  for example when you type “$myvar = new Zend_” , Netbeans will list all available classes that are available and start with “Zend_”, this makes things much easier, but obviously is not a necessity. Notice that when you type “Zend_” You are searching through the zillions of classes that Zend Framework offers, therefore this will take a long time (It took 22 Seconds on my laptop), so don’t be demotivated, although I think Netbean’s code completion is not so great.

4- You need at add a VirtualHost to your Apache’s configuration and let NetBeans know where your Project URL is

Adding a VirtualHost can be very sophisticated, here are a few guides:

For my purpose I only added the following lines to my Apache’s httpd.conf:

      <VirtualHost *:80>
          ServerName quickstart.local
          DocumentRoot /path/to/quickstart/public
          SetEnv APPLICATION_ENV "development"
          <Directory /path/to/quickstart/public>
              DirectoryIndex index.php
              AllowOverride All
              Order allow,deny
              Allow from all

This will make Apache understand where your files are, make sure you only find the “Public” folder of your Zend Project, you don’t want other files and folders to be accessible, Apache will host your project on  10589 in my example so when you browse to http://localhost:10589/ you will see a “Welcome to the Zend Framework!” Page which means you are good to go.


From → PHP

  1. I used to see a 500 internal error when an error occured, so I changed the application.ini values

    phpSettings.display_startup_errors = 0
    phpSettings.display_errors = 0

    to 1, and now it shows the error properly

  2. Also, zend’s quickstart suggest the following virtual host settings:

    ServerName quickstart.local
    DocumentRoot /path/to/quickstart/public
    SetEnv APPLICATION_ENV “development”

    DirectoryIndex index.php
    AllowOverride All
    Order allow,deny
    Allow from all

    You also add quickstart.local to your host file

  3. Yasser permalink

    To install on WAMP
    simply download the libraries, put them somewhere safe:

    add the path to include_path

    include_path = “.;c:\php\includes;C:\Libraries\”

    You are good to go

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: