douraoyw194498 2010-11-18 21:47
浏览 81
已采纳

为什么我不能配置Zend-framework

Racking my head as to why I can't include the Zend-framework into my project. The documentation is unclear about how to set up the environment (Or haven't found where it is). Looked at this thread: How to configure Zend Framework on linux machine? but no luck. In the phpinfo() I see Zend configured but why can't I use it? Looked for documentation on how to add this to PEAR/PECL, no luck.

I did see this post: http://devzone.zend.com/article/4683 but still not working

What I have tried:

Option 1

require_once('/usr/share/php/libzend-framework-php/Zend/Loader/Autoloader.php');
Zend_Loader_Autoloader::getInstance();

Option 2

sudo vi /etc/php5/apache2/php.ini

changed this line:

;include_path = ".:/usr/share/php"

to:

include_path=".:/usr/share/php:/usr/share/pear:/usr/share/php/libzend-framework-php"

restarted Apache

Getting this error:

Warning: require_once(Zend/Loader.php): failed to open stream: No such file or directory in /usr/share/php/libzend-framework-php/Zend/Loader/Autoloader.php on
 line 24

Call Stack:
    0.0002      61600   1. {main}() /var/www/webservice/zend/server.zend.xmlrpc.php:0
    0.0009     174412   2. require_once('/usr/share/php/libzend-framework-php/Zend/Loader/Autoloader.php') /var/www/webservice/zend/server.zend.xmlrpc.php:2


Fatal error: require_once(): Failed opening required 'Zend/Loader.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/php/libzend-framework-p
hp/Zend/Loader/Autoloader.php on line 24

Call Stack:
    0.0002      61600   1. {main}() /var/www/webservice/zend/server.zend.xmlrpc.php:0
    0.0009     174412   2. require_once('/usr/share/php/libzend-framework-php/Zend/Loader/Autoloader.php') /var/www/webservice/zend/server.zend.xmlrpc.php:2
  • 写回答

6条回答 默认 最新

  • douqiao1997 2010-11-19 14:07
    关注

    i would suggest to

    chmod 775 /usr/share/php/libzend-framework-php -R as Ran BarZik suggestion . and double check the apache user's permissions .

    then symlink it to the your application library by using this :

    ln -s /var/www/webservice/library/Zend  /usr/share/php/libzend-framework-php/
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(5条)

报告相同问题?