Zend Configuration on Ubuntu

2019-06-12 11:48发布

问题:

I am completely new with zend and Ubuntu as well.

Though I have configured Zend on my ubuntu system. but issue is that at each set I have to copy my Zend library to my project/library/.. else it arises 'require_once(): Failed opening required 'Zend/Application.php' error.

Is it necessory to copy each time my Zend library to my project/library location. Can't I use it globlally from my /opt/Zend/library/Zend where exactly I have put my Zend Library folder. What changes I need to make to use it globally for all project. Please help.

回答1:

You can place Zend Framework source in any folder on your linux system, then just make symlink from _source_dir_/library/Zend into any project's library/Zend.

You can easy switch between different ZF versions (eg 1.12.x, 1.11.x) such way also if you need this.

ln -s _SOURCE_DIR_/library/Zend _TARGET_DIR_/library/Zend


回答2:

An easier way for Linux users. Type in terminal

sudo apt-get install zend-framework

You need to remove comment in first line from file /etc/php5/apache2/conf.d/zend-framework.ini

;include_path=${include_path} ":/usr/share/php/libzend-framework-php"

Just remove this semicolon(;) from from the beginning.