How to install Zend framework with XAMPP

I, like most web developers, use the excellent XAMPP to develop and test PHP/MySQL websites and applications on my local machine. The problem is the XAMPP doesn’t come with the Zend framework installed by default.

If you want to develop with Zend, you could always use Zend Server CE instead of XAMPP, as Zend Server comes with the Zend framework installed. The downside to that is that the Zend server is not as simple to set up and use as XAMPP, and if you’ve already been using XAMPP, migrating to Zend server can be a real pain in the ass, and you can’t run both XAMPP and Zend server together.

If you google installing Zend in XAMPP, there are many different guides, all of which seem overly complicated. Installing the zend framework under XAMPP is actually a lot simpler than most guides online would suggest, and using the following guide you should be able to run Zend Apps in your existing XAMPP environment in a matter of minutes.

Step 1 – Locate your PHP include path.

This is the location the Zend framework needs to be installed to. You can easily find your include path by going to http://localhost/ (with XAMPP running) and clicking the phpinfo() link on the left menu. Near the top of that page, under the core heading will be row called “include_path”, the value in the column next to it is the one you want, eg: “C:\xampp\php” in windows or  ”/opt/lampp/lib/php” in linux.

Step 2 – Download and extract the Zend framework.

You can download the Zend framework for free here: http://framework.zend.com/download/latest, I’d recommend downloading the full package, as keeping things light weight isn’t imperative on a test/development environment, and that way you’ll be less likely to need to add anything in the future. Once the Zend framework has downloaded, extract it, and you should get a folder called somthing like “ZendFramework-1.10.4″, obviously the version numbers may be different.

Step 3 – Install Zend to your PHP include path.

Now all you have to do in copy the relevent Zend files to your PHP include path. To find the files you need to copy, open up you extracted Zend framework download, find the ‘library’ folder and open that. In that folder there is a folder called ‘Zend’, you’ll need to copy that entire folder to your PHP include path.

If you’re using windows that should be a simple drag and drop into your PHP include path. If you’re using linux, you’ll need to copy using sudo, eg: “sudo cp -r Zend/ /opt/lampp/lib/php”.

If it all went to plan you will now have a folder called ‘Zend’ in your PHP include folder and your Zend framework is ready to go. Told you it was easy.

- MB

Posted in: Programming by Matt Bearman on 18th May 2010 at 10:19 am
Tags: , , , ,

14 Responses to “How to install Zend framework with XAMPP” - (Leave a comment)

  1. [...] http://www.mattbearman.co.uk/2010/05/18/how-to-install-zend-framework-with-xampp/ [...]

    Pingback by Zend Framework News » Blog Archive » Zend Framework auf XAMPP installieren on 18th May 2010 at 8:40 pm

  2. thank you sir, for this tutorial!

    this tutorial was very helpful for me!!

    Comment by abhishek raghav on 8th August 2010 at 4:02 pm

  3. Hi

    The lastest XAMPP package uses version 1.9.6, which is located in xampp\php\PEAR\Zend

    Even if you follow the instructions above the version of ZF included with xampp will still be used. The easiest way to overrride this is to delete the xampp\php\PEAR\Zend directory then extract the library\Zend from the 1.10.4 zend archive to the PEAR directory.

    Comment by Ian Winstanley on 23rd September 2010 at 4:30 pm

  4. Still doesn’t work for me :(
    I still get the “Zend Optimizer not installed” message :|

    Comment by TimXpro on 15th November 2010 at 7:06 pm

  5. Hi all I’m ZF 1.11, I want to install it on my [xampp 1.7.3] after download it,
    1> I decompress it
    2> put /library folder in my php *include_path* my include_path is “.;C:\web_center\xampp\php\PEAR”

    3> with zf command I create a project “XXX” …

    Now if I see something I have to point to the folder “/public/index.php” with http://localhost I see the top folder :(

    thanks

    Comment by paskuale on 19th November 2010 at 12:31 pm

  6. i use xampp version 1.7.3 and there alredy exist zend folder
    in php incude_path which is xampp\php\PEAR\

    what is reason?

    Comment by jayantha on 26th November 2010 at 9:39 am

  7. I’m impressed…Zend was already in my XAMPP all along! (the 1.9.6 version) Thanks to this article, I knew where to look for it.

    Comment by Thea G on 10th December 2010 at 3:37 pm

  8. what if i need to upload a website i created on the zend framework to my hosting server ??

    Comment by Equator Lounge on 27th December 2010 at 3:31 pm

  9. Hi Matt. Thanks for the tip. My work, as a freelance TIBCO consultant, needs some new fresh insights, so I started to be the dude with XAMPP and DRUPAL, WordPress, etc… The main turnover I make is with my SOA, BPM, EAI and BRM expertise. But the PHP dev-skills with XAMPP and Zend might be a nice fit…Hope we get the change to chat soon.

    Comment by Chris Speksnijder on 21st February 2011 at 1:40 pm

  10. nice tutorial! made my installation zend on my xampp on windows easy.

    Comment by aronga on 9th May 2011 at 6:13 pm

  11. Regarding php include path, you can drop the ‘Zend’ folder into the PEAR folder but I think it would be better to put it in the root and edit php.ini as follows:
    include_path = “.;C:\xampp\php\PEAR;C:\xampp\php\Zend”

    ..this way you don’t have to put Zend in with PEAR.

    Comment by Zac on 12th September 2011 at 2:16 am

  12. …and this may be useful for ‘next steps’ after completing the zend installation above:
    http://www.bogartcomputing.com/web-programming-answers/213/a-heavily-corrected-windows-xp-xampp-zend-framework-quickstart-tutorial-revision/

    Comment by Zac on 12th September 2011 at 3:42 am

  13. Thanks alot for the tutorial.

    The Zend web site just don’t help xampp user’s at all.

    Comment by Daniel on 14th September 2011 at 3:11 pm

  14. How do i know the installation is successful. How do i create project with it

    Comment by Kobena on 22nd September 2011 at 9:06 pm

RSS | TrackBack URL

Leave a comment