Configuring Zend Framework 1.9.5 on Denwer 3

    Hello everyone! Today I will tell and show how to put Zend Framework 1.9.5 on the well-known Denver 3. But the setup will not be simple, but with the ability to use the zf Command Line Tool .

    So let's get started:
    1. Download the framework from the site and unzip the library folder into the root directory of your Denver. I have it located on C: \ webserver. Rename it to zendframework :

      Create a new zendframework folder
    2. Now go to the usr \ local \ php5 folder and open the php.ini configuration file :

      Folder with php5 
    3. We are looking for the Paths and Directories section and the include_path parameter . This option allows you to add directories in which the require () and include () PHP functions search for include files. Add the newly created folder with the framework to the existing path:

      include_path = ".; / Usr / local / php5 / PEAR; / zendframework"

      Here I got a crutch because of which the PHP interpreter (php.exe) issued at the command line errors connecting extensions (extensions) when starting the zf Command Line Tool. Therefore, we change the extension_dir parameter to:

      extension_dir = "C: \ webserver \ usr \ local \ php5 \ ext"

      The result should be the following:

      php.ini 
    4. Move on. Now you need to set up environment variables for comfortable work with the zf Command Line Tool. In Windows 7, this setting is located in Control Panel \ System and Security \ System \ Advanced System Settings \ Advanced tab \ Environment Variables button. So that you can call the PHP interpreter from the command line wherever you are, you need to add the path to the directory where php.exe is located in the PATH variable . For my configuration, this is C: \ webserver \ usr \ local \ php5:

      Environment Variables Window  Window changing PATH variable
    5. There is another variable that needs to be added - this is ZEND_TOOL_INCLUDE_PATH . In theory, the zf Command Line Tool should work without it, if the include_path parameter is specified in php.ini, but for some reason an error popped up without it. This variable must be assigned the path to the folder with the framework. In this case, this is C: \ webserver \ zendframework:

      Creating ZEND_TOOL_INCLUDE_PATH 
    6. All preparations are completed. We extract two files from the bin folder of the archive with the framework - zf.bat and zf.php into our home folder C: \ webserver \ home:

      zf.bat and zf.php
    7. Now run the command line ( cmd ), go to the home folder and try to create the project frame:

      cd c: \ webserver \ home
      zf.bat create project myproject

      Command line
    8. If everything worked out, you will see the freshly baked myproject folder .
    9. Now you can see the results of your fruits at the addresses:

      localhost / denwer / Tools / sitelist / index.php
      public.myproject

      localhost

      localhost 
    Aufiderzein! And enjoy the coding!

    Also popular now: