s the first time when I use Zend and I am a little comfused. I have this code
require_once('Zend/Loader.php'); and this error
Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in D:\wamp\www\phpweb20\htdocs\index.php on line 3
I tought that I didn't do something well and I tried to fine manually the file loader.php but I couldn't find it. There is no such file.
Can anyone tell me what is wrong?
zend problem
Moderator: General Moderators
Re: zend problem
You need to add the Zend directory to your include path. You can do it in php.ini or in code:
That is one thing that is kind of annoying about Zend: you have no choice but to update your include path.
Code: Select all
$incl = get_include_path();
// absolute path
set_include_path($incl . PATH_SEPARATOR . '/path/to/Zend/');
// OR path relative to current file
set_include_path($incl . PATH_SEPARATOR . dirname(__FILE__) . '/relative/path/to/Zend');Re: zend problem
Thank you for your answer.
I am reather new in php so please be more specific
The zend framwork is in:
c:/program files/wamp/www/webpage/include/ZendFramework-1.9.7
also the path for pear is
c:/program files/wamp/bin/php/pear
Do I need to configure the apache server also?
I included the path in php.ini also but the error is the same
Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\webpage\htdocs\index.php on line 3
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.;C:\php5\pear') in C:\wamp\www\webpage\htdocs\index.php on line 3
I am reather new in php so please be more specific
The zend framwork is in:
c:/program files/wamp/www/webpage/include/ZendFramework-1.9.7
also the path for pear is
c:/program files/wamp/bin/php/pear
Do I need to configure the apache server also?
I included the path in php.ini also but the error is the same
Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\webpage\htdocs\index.php on line 3
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.;C:\php5\pear') in C:\wamp\www\webpage\htdocs\index.php on line 3
Re: zend problem
Your include_path needs to be ''.;C:\php5\pear;c:/program files/wamp/www/webpage/include/ZendFramework-1.9.7"eduard77 wrote:Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.;C:\php5\pear') in C:\wamp\www\webpage\htdocs\index.php on line 3
You can change the include_path value in php.ini and restart apache or set your include path with set_include_path() before including Zend/Loader.php
Re: zend problem
Thanks but I just found out that mu Zend framework dosen't support Loader.php because they changed with aoutoloader.php.
So that was the problem.
Thanks anyway
It took me 1 day to figure it out but hey " no pain no gain"

So that was the problem.
Thanks anyway
It took me 1 day to figure it out but hey " no pain no gain"