0

I'm trying to get my feet wet with the Zend Framework here. I'm following the beginner's guide ebook and it asks me to add the Zend Framework to my include path in php.ini file

I had already xampp installed and from what I gathered I can just unpack my zf in either xampp\php or xampp\php\PEAR. I figured I'd install it in xampp\php\PEAR

Then I changed the include path in the php.ini file into

 ; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
include_path = ".library;C:\xampp\php\PEAR;C:\xampp\php\PEAR\ZendFramework-1.11.5\library"

I got this from http://normankosmal.com/wordpress/?p=47 but then adjusted to my current path of course.

Then I need to use the windows command line and here's what I insert

C:\>xampp\php\pear\zendframework-1.11.5\bin\zf.bat

error follows "php.exe" is not recognized as an internal or external command, operable program or batch file.

1 Answer 1

1

This isn't an issue with PHP's ìnclude_path; it's an issue with the %PATH% environment variable. The path to the php.exe executable (C:\xampp\php) needs to be added to the environment variable if you want to be able to call php without specifying its full path.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your answer that's exactly it. One thing I did though was replace the current path last mentioned in the %PATH% environment variable with c:\xampp\php\ instead of adding it, which seems like a little mistake I made there. I remember the original path starting with c:\program files\something... is it important to put it back there?
Yes, you'll need to restore it, otherwise you might find a number of critical services are not able to run... this page gives some default values for XP and Win 7. I would probably use: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\xampp\php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.