Problem: After running go-pear.bat to configure PEAR on Windows you may encounter the PHP error dialog "Invalid configuration directive."
Cause: This problem happens when running modern versions of PEAR on PHP 5.2 or earlier because the quoting handling of PHP 5.2 is broken.
Solution: To correct the issue, modify the file C:\Program Files (x86)\PHP\pear.bat. Scroll down to the :RUN section and modify the line with the PHP directive "-d include_path" as follows:
... -d "include_path=\".;%PHP_PEAR_INSTALL_DIR%\""
Save the file and re-run the "pear" command.
Friday, April 22, 2011
PEAR on Windows reports "Invalid configuration directive"
Subscribe to:
Post Comments (Atom)
No Longer get the error, thanks.
ReplyDeleteI found this include already existed, however I needed to append the ".;" path to remove the error popup.
ReplyDeletePEAR Version: 1.9.4
PHP Version: 5.2.17
Zend Engine Version: 2.2.0
Running on: Windows NT 6.1
Thanks a lot!
ReplyDelete