梨包不起作用 [英] Pear Packages not working

查看:57
本文介绍了梨包不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几个小时以来,我一直在尝试使用一些 PEAR 软件包,但无济于事.PEAR 本身正在运行,我相信我正确设置了所有配置变量,但是当我尝试从命令行运行我的任何包时,我收到 PHP 错误,告诉我所需的文件不是'找到了.例如,使用 phpdoc:

I've been trying to use a few PEAR packages for a few hours now to no avail. PEAR itself is functioning, and I believe I set all of the configuration variables correctly, but when I try to run any of my packages from the command line, I get PHP errors telling me the required file wasn't found. For example, with phpdoc:

$ phpdoc
PHP Warning:  require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40

Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40
PHP Fatal error:  require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40

Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40

我尝试手动编辑文件,插入文件的绝对路径,但是当我纠正一个 require 错误时,一个新的错误就会出现.

I tried manually editing the files, inserting the absolute path to the files, but when I correct one require error a new one just comes up.

这是我的 pear.conf:

This is my pear.conf:

#PEAR_Config 0.9
a:15:{s:10:"__channels";a:2:{s:12:"pecl.php.net";a:0:{}s:5:"__uri";a:0:{}}s:15:"preferred_state";s:6:"stable";s:8:"temp_dir";s:35:"/Applications/MAMP/htdocs/pear/temp";s:7:"bin_dir";s:34:"/Applications/MAMP/htdocs/pear/bin";s:7:"php_dir";s:35:"/Applications/MAMP/htdocs/pear/PEAR";s:7:"doc_dir";s:40:"/Applications/MAMP/htdocs/pear/PEAR/docs";s:8:"data_dir";s:40:"/Applications/MAMP/htdocs/pear/PEAR/data";s:8:"test_dir";s:41:"/Applications/MAMP/htdocs/pear/PEAR/tests";s:9:"cache_dir";s:41:"/Applications/MAMP/htdocs/pear/PEAR/cache";s:9:"cache_ttl";i:300;s:12:"download_dir";s:44:"/Applications/MAMP/htdocs/pear/temp/download";s:10:"http_proxy";s:0:"";s:7:"ext_dir";s:74:"/Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20050922";s:7:"php_bin";s:37:"/Applications/MAMP/bin/php5.2/bin/php";s:10:"sig_keydir";s:39:"/Applications/MAMP/conf/php5.2/pearkeys";}

我在 Mac OS 10.7.5 和 PHP v5.2.17 上使用 MAMP PRO v1.9.5.此外,我使用 PEAR Web 界面包管理器安装了这些包.如果需要任何进一步的信息,请告诉我,我会发布.

I'm using MAMP PRO v1.9.5 on Mac OS 10.7.5 with PHP v5.2.17. Also, I installed the packages with the PEAR web interface package manager. If any further information is required, please let me know and I'll post it.

推荐答案

确保包含路径包含 PEAR 安装 php 类文件的文件夹.检查您的 include_path ini 设置.它应该看起来像:

Make sure that the include path contains the folder where PEAR installs php class files. Check your include_path ini setting. It should look like:

include_path=".:PEAR_CLASSES_PATH"

其中 PEAR_CLASSES_PATH 是梨类路径

这篇关于梨包不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆