Search code examples
phpzend-frameworkinclude-pathzend-tool

Zend_Tool include_path problem


I'm trying to install Zend Framework on my computer. I have done following:

  1. I have placed Zend framework files on C drive, the path is like: C:\ZendFramework\library C:\ZendFramework\bin (The bin folder contains the zf.bat, zf.sh and zf.php files)

  2. I have included path in php.ini file:

    include_path = “.;C:\xampp\php\PEAR;C:\ZendFramework\library”

Now when I go to command prompt and type zf command, i get following error:

In order to run the zf command, you need to ensure that Zend Framework is inside your include_path. 

Can someone suggest me what im doing wrong and how to fix this error. Thanks.


Solution

  • Make sure the PHP binary / executable you're calling from the command line is using the same php.ini file as the web version.

    Run

    php -i
    

    and look for the lines

    Configuration File (php.ini) Path => /path/to/ini/folder
    Loaded Configuration File => /path/to/ini/folder/php.ini
    

    You should also be able to see the configured include path

    include_path => local/include/path => master/include/path
    

    Edit: On Windows, you may want to run

    php -i | more
    

    There's a lot of information shown and I can't remember how many lines of scrollback the Windows terminal gives you. Most of what you're after will be at the top.