Page 1 of 1
include_path changes not reflecting
Posted: Thu Feb 11, 2010 10:18 am
by ritratt
Hello
I am totally new to PHP. I downloaded the Zend framework and have been trying to add it to the include_path.
I am running php 5.3.0 through wamp 2.0 on Windows XP.
Problem is that even after editing the php.ini file to include the zend directory, a simple script to test the Zend inclusion is not working.
Kindly help me out. Thank you.
Edit: I even downloaded the AnalogX php.ini editor. It has a gui and I tried giving it the directory path but it did not help.
Re: include_path changes not reflecting
Posted: Thu Feb 11, 2010 12:34 pm
by Christopher
You need to restart the web server to load the new configuration.
Re: include_path changes not reflecting
Posted: Thu Feb 11, 2010 1:21 pm
by ritratt
thanks for replying.
I restarted the web server but that has no effect on the errors.
Re: include_path changes not reflecting
Posted: Thu Feb 11, 2010 2:54 pm
by Christopher
Are you changing the Windows or Unix path? It is a little difficult to solve what may be a tiny syntax error without more information.
Re: include_path changes not reflecting
Posted: Thu Feb 11, 2010 10:28 pm
by ritratt
arborint wrote:Are you changing the Windows or Unix path? It is a little difficult to solve what may be a tiny syntax error without more information.
Here is the part of php.ini where I have set the path.
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = "J:\Documents and Settings\Rituraj\My Documents\Study\8th Sem\WAMP\Zend"
;
I am using windows hence I have uncommented the windows part. I have copied the zend folder path directly from the address bar so dont think the problem lies in the path itself.
The script i am trying to run is as follows:
<?php
include 'Zend.php';
Zend::loadClass('Zend_Controller_Front');
phpinfo();
?>
The errors are:
Warning: include(Zend.php) [function.include]: failed to open stream: No such file or directory in J:\Documents and Settings\Rituraj\My Documents\Study\8th Sem\WAMP\www\x.php on line 3
Warning: include() [function.include]: Failed opening 'Zend.php' for inclusion (include_path='J:\Documents and Settings\Rituraj\My Documents\Study\8th Sem\WAMP\Zend') in J:\Documents and Settings\Rituraj\My Documents\Study\8th Sem\WAMP\www\x.php on line 3
Fatal error: Class 'Zend' not found in J:\Documents and Settings\Rituraj\My Documents\Study\8th Sem\WAMP\www\x.php on line 4
I hope this is sufficient.
thanks for the help.
Re: include_path changes not reflecting
Posted: Fri Feb 12, 2010 2:47 am
by Christopher
I am assuming that in your 'WAMP' directory you have 'Zend' and 'www' directories?
There is not such file Zend.php. You should check the documentation about creating a bootstrap for ZF because it is not very obvious how it works (for example Zend_Application_Bootstrap_Bootstrap!).
Re: include_path changes not reflecting
Posted: Fri Feb 12, 2010 4:25 am
by ritratt
arborint wrote:I am assuming that in your 'WAMP' directory you have 'Zend' and 'www' directories?
There is not such file Zend.php. You should check the documentation about creating a bootstrap for ZF because it is not very obvious how it works (for example Zend_Application_Bootstrap_Bootstrap!).
Yes thats right. my zend dir is in fact inside the wamp dir.
ok i will try the documentation.
btw the script was just for testing. i also ran the php installation checker script and it showed the zend framework as not tested. Really <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> now. everywhere on the internet it has been given that i am just supposed to add the zend dir to the include path and thats what i am freakin doing.
Thanks for the help.