Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

force include_path to search in $_Server['Document_Root']

38 views
Skip to first unread message

jans

unread,
May 27, 2015, 3:08:23 PM5/27/15
to
I don't want php to search for an include_path. I want it to search on the relative directory.
The included files are local to where they are needed. All I need to do is document this system. I don't need to develop anything further so I don't need a functioning include_path but I need to remove the errors to get it to work.

How can I change include_path or hard wire it in the index.php to search for $_Server['Document_Root'] but on windows? I commented out all the include_paths in php_ini. There were two php.ini's on Wamp server. One in apache and one in php. Not sure why there are two in Wamp, but I commented out all include_paths. It is still defaulting to (include_path='.;C:\php\pear') can I make it default to the root directory? That should fix my problem? Thanks.

Below is the scripts that get the error in the root 'www' directory in Wamp
--------------------
my_app/public/index --> require'../application/bootstrap.php';
my_app/application/bootstrap --> require_once 'intializer.php& Zend/Loader/Autoloader.php;





ERROR Msgs:
Warning: require_once(C:\php\pear\Zend\Controller\Plugin\Abstract.php): failed to open stream: Permission denied in C:\wamp\www\conduit-local\application\Initializer.php on line 9
Call Stack
( ! ) Fatal error: require_once(): Failed opening required 'Zend/Controller/Plugin/Abstract.php' (include_path='.;C:\php\pear') in C:\wamp\www\conduit-local\application\Initializer.php on line 9

so it opens initializer.php and stops on line 9 trying to find the include_path and its defaulting to a wamp directory which is not relative.

thanks,

Jerry Stuckle

unread,
May 27, 2015, 9:24:38 PM5/27/15
to
You do not need to change the include path for the server to look in the
document root. Every request to the server is based off the directory
configured in the server.

From your errors it looks like your directory structure is not set up
correctly. And after changing the php.ini file, did you restart the web
server?

You REALLY NEED TO BE TALKING TO THE PERSON WHO GAVE YOU THE FILES ABOUT
THIS! ALL YOU ARE DOING IS SHOOTING IN THE DARK AND WASTING OTHER
PEOPLE'S TIME (ALONG WITH YOUR OWN).

If you had done this at the start, you would have had a working system
two (or more) weeks ago.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

Christoph M. Becker

unread,
May 27, 2015, 9:50:32 PM5/27/15
to
Jerry Stuckle wrote:

> You do not need to change the include path for the server to look in the
> document root. Every request to the server is based off the directory
> configured in the server.
>
> From your errors it looks like your directory structure is not set up
> correctly. And after changing the php.ini file, did you restart the web
> server?
>
> You REALLY NEED TO BE TALKING TO THE PERSON WHO GAVE YOU THE FILES ABOUT
> THIS! ALL YOU ARE DOING IS SHOOTING IN THE DARK AND WASTING OTHER
> PEOPLE'S TIME (ALONG WITH YOUR OWN).
>
> If you had done this at the start, you would have had a working system
> two (or more) weeks ago.

Even if I think that SHOUTING is generally a bad practice, in this case
it appears to be appropriate. I fully agree with Jerry, that you,
Janis, really should get the basic setup right, instead of trying to
work around the errors one by one.

And most likely it is appropriate to rewrite the script to work with
recent versions of Zend Framework (or any other framework, or even
none), instead of sticking with an already old, probably buggy and
unsupported version.

--
Christoph M. Becker

jans

unread,
Jun 1, 2015, 8:08:17 PM6/1/15
to
On Wednesday, May 27, 2015 at 6:50:32 PM UTC-7, Christoph M. Becker wrote:
Well it turns out it was an encryptions issue that permission denied on line 0 ..but not the hard drive encryption it was either enryption from a shared web address or files from a mac.

Anyway, now it goes to line 24 and appears to stop on request for /Zend/loader.php?

It appears my include_path is set up correctly because I can see the boolean= true from this check page that gets a vardump of the system in c:\wamp\bin\php\php5.5.12\pear into this pear directory I just dropped the old zend framework folder but I haven't seen it use the include_path it just uses the zend folder in the application directory
www/conduit-master/earth/application/zend
In the pear directory I have dropped the old Zend framework. I did download the new framework but it has a lot of zend autoloader mapping files I don't understand at all and I am not supposed to write any new code.

Here is the error message:
[02-Jun-2015 01:04:23 Europe/Paris] PHP Warning: require_once(/Zend/Loader.php): failed to open stream: No such file or directory in C:\wamp\www\conduit-master\earth\application\Zend\Controller\Front.php on line 24

[02-Jun-2015 01:04:23 Europe/Paris] PHP Stack trace:

[02-Jun-2015 01:04:23 Europe/Paris] PHP 1. {main}() C:\wamp\www\conduit-master\earth\public\index.php:0

[02-Jun-2015 01:04:23 Europe/Paris] PHP 2. require() C:\wamp\www\conduit-master\earth\public\index.php:10

[02-Jun-2015 01:04:23 Europe/Paris] PHP 3. require_once() C:\wamp\www\conduit-master\earth\application\bootstrap.php:9

[02-Jun-2015 01:04:23 Europe/Paris] PHP 4. require_once() C:\wamp\www\conduit-master\earth\application\Initializer.php:10

[02-Jun-2015 01:04:23 Europe/Paris] PHP Fatal error: require_once(): Failed opening required '/Zend/Loader.php' (include_path='.;C:\wamp\bin\php\php5.5.12\pear') in C:\wamp\www\conduit-master\earth\application\Zend\Controller\Front.php on line 24

[02-Jun-2015 01:04:23 Europe/Paris] PHP Stack trace:

[02-Jun-2015 01:04:23 Europe/Paris] PHP 1. {main}() C:\wamp\www\conduit-master\earth\public\index.php:0

[02-Jun-2015 01:04:23 Europe/Paris] PHP 2. require() C:\wamp\www\conduit-master\earth\public\index.php:10

[02-Jun-2015 01:04:23 Europe/Paris] PHP 3. require_once() C:\wamp\www\conduit-master\earth\application\bootstrap.php:9

[02-Jun-2015 01:04:23 Europe/Paris] PHP 4. require_once() C:\wamp\www\conduit-master\earth\application\Initializer.php:10

----required local files----------------
conduit-master/earth/public/index.php requires ../application/bootstrap.php
conduit-master/earth/application/bootstrap.php requires /application/initialiizer.php which requires
/Zend/controller/front.php which requires /Zend/loader.php ****

This is where it stops on /Zend/loader.php and the file is there. Does it require a $class? I don't know what is wrong it should load even if it is old loader. It looks like it should work.

thanks,

.

jans

unread,
Jun 2, 2015, 1:05:19 PM6/2/15
to
On Monday, June 1, 2015 at 5:08:17 PM UTC-7, jans wrote:
The include_path was set but it got unset with troubleshooting the encrypted files. The zend library was encrypted also. Really sorry I didn't know. I hardcoded the include path set set_include_path. It is stopping on line 24 where it calls the loader.php So can you just tell me where to start looking? Is it something wrong with the library file? It just has to work that is all for one output.

Thanks,

! ) Warning: require_once(/Zend/Loader.php): failed to open stream: No such file or directory in C:\wamp\www\conduit-master\earth\application\Zend\Controller\Front.php on line 24
Call Stack
# Time Memory Function Location
1 0.0030 236848 {main}( ) ..\index.php:0
2 0.0050 255760 require( 'C:\wamp\www\conduit-master\earth\application\bootstrap.php' ) ..\index.php:10
3 0.0070 279552 require_once( 'C:\wamp\www\conduit-master\earth\application\Initializer.php' ) ..\bootstrap.php:9
4 0.0130 442520 require_once( 'C:\wamp\www\conduit-master\earth\application\Zend\Controller\Front.php' ) ..\Initializer.php:10

( ! ) Fatal error: require_once(): Failed opening required '/Zend/Loader.php' (include_path='.;C:\wamp\bin\php\php5.5.12\pear') in C:\wamp\www\conduit-master\earth\application\Zend\Controller\Front.php on line 24
Call Stack
# Time Memory Function Location
1 0.0030 236848 {main}( ) ..\index.php:0
2 0.0050 255760 require( 'C:\wamp\www\conduit-master\earth\application\bootstrap.php' ) ..\index.php:10
3 0.0070 279552 require_once( 'C:\wamp\www\conduit-master\earth\application\Initializer.php' ) ..\bootstrap.php:9
4 0.0130 442520 require_once( 'C:\wamp\www\conduit-master\earth\application\Zend\Controller\Front.php' ) ..\Initializer.php:10

jans

unread,
Jun 2, 2015, 1:54:35 PM6/2/15
to
On Wednesday, May 27, 2015 at 6:50:32 PM UTC-7, Christoph M. Becker wrote:

Okay, I got it, the person who gave me the files left something out of the library but it didn't help that windows encrypted the files. thanks, you were right.
0 new messages