📜 ⬆️ ⬇️

Configuring Zend Framework 1.9.5 on Denwer 3

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

So let's start:
  1. Download the framework from the site and unpack the library folder in the root directory of your Denver. I have it on C: \ webserver. Rename it to zendframework :

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

    php5
  3. We are looking for the Paths and Directories section and the include_path parameter . This parameter allows you to add directories in which the PHP functions require () and include () look for include files. Add to the already existing path the newly created folder with the framework:
    ')
    include_path = ".; / usr / local / php5 / PEAR; / zendframework"

    Here I had a crutch due to which the PHP interpreter (php.exe) gave out extensions to the command line when launching the zf Command Line Tool. Therefore, we change the parameter extension_dir to:

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

    The result should be the following:

    php.ini
  4. Go ahead. Now you need to set up variable environments 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. In order to be able to call the PHP interpreter from the command line wherever we are - you need to add the path to the directory where php.exe is in the PATH variable . For my configuration, this is C: \ webserver \ usr \ local \ php5:

    PATH
  5. There is one more 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 in php.ini is specified, but for some reason I got an error without it. This variable must be assigned the path to the folder with the framework. In this case, this is C: \ webserver \ zendframework:

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

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

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


  8. If everything worked out, you will see the newly baked myproject folder .
  9. Now you can see the results of their fruits at the addresses:

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

    localhost

    localhost
Aufiderzein! And nice coding!

Source: https://habr.com/ru/post/75535/


All Articles