如何使用pearper HTTP_OAUTH的dropbox-php库工作?

时间:2011-09-22 18:10:01

标签: php oauth pear dropbox-api dropbox-php

我一直在努力让dropbox-php库工作,但我尝试使用这些类的页面输出错误:

Warning: include(HTTP/OAuth/Consumer.php) [function.include]: failed to open stream: No such file or directory in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 47   

Warning: include(HTTP/OAuth/Consumer.php) [function.include]: failed to open stream: No such  file or directory in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 47

Warning: include() [function.include]: Failed opening 'HTTP/OAuth/Consumer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 47

Fatal error: Uncaught exception 'Dropbox_Exception' with message 'The HTTP_OAuth_Consumer class could not be found! Did you install the pear HTTP_OAUTH class?' in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php:51 Stack trace: #0 /home/sensured/public_html/sensured.net/Dropbox/getmetadata.php(11): Dropbox_OAuth_PEAR->__construct('', '') #1 {main} thrown in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 51  

安装了梨HTTP_OAUTH类(v 0.2.3),但它是通过cpanel完成的,所以我不确定在哪里,甚至不知道是否有什么要说的。

1 个答案:

答案 0 :(得分:4)

您需要确保PEAR的PHP目录位于include_path

使用

查找路径
$ pear config-get php_dir

然后将其添加到php.ini的{​​{1}}指令中。之后重新启动Web服务器软件以激活新设置。