Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15366 > unrolled thread

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

Started byjans <janis.rough@gmail.com>
First post2015-05-27 12:08 -0700
Last post2015-06-02 10:54 -0700
Articles 6 — 3 participants

Back to article view | Back to comp.lang.php


Contents

  force include_path to search in $_Server['Document_Root'] jans <janis.rough@gmail.com> - 2015-05-27 12:08 -0700
    Re: force include_path to search in $_Server['Document_Root'] Jerry Stuckle <jstucklex@attglobal.net> - 2015-05-27 21:24 -0400
      Re: force include_path to search in $_Server['Document_Root'] "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-05-28 03:50 +0200
        Re: force include_path to search in $_Server['Document_Root'] jans <janis.rough@gmail.com> - 2015-06-01 17:08 -0700
          Re: force include_path to search in $_Server['Document_Root'] jans <janis.rough@gmail.com> - 2015-06-02 10:05 -0700
        Re: force include_path to search in $_Server['Document_Root'] jans <janis.rough@gmail.com> - 2015-06-02 10:54 -0700

#15366 — force include_path to search in $_Server['Document_Root']

Fromjans <janis.rough@gmail.com>
Date2015-05-27 12:08 -0700
Subjectforce include_path to search in $_Server['Document_Root']
Message-ID<3686f5b6-f8d9-47d8-abe2-377b713f6c9b@googlegroups.com>
 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,

[toc] | [next] | [standalone]


#15367

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-05-27 21:24 -0400
Message-ID<mk5qm6$5bl$1@dont-email.me>
In reply to#15366
On 5/27/2015 3:08 PM, jans wrote:
>  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,
> 

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
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#15368

From"Christoph M. Becker" <cmbecker69@arcor.de>
Date2015-05-28 03:50 +0200
Message-ID<mk5s92$k1a$1@solani.org>
In reply to#15367
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

[toc] | [prev] | [next] | [standalone]


#15380

Fromjans <janis.rough@gmail.com>
Date2015-06-01 17:08 -0700
Message-ID<c690bc25-2952-4c57-8863-03f964ba4bf4@googlegroups.com>
In reply to#15368
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,

.
> 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

[toc] | [prev] | [next] | [standalone]


#15381

Fromjans <janis.rough@gmail.com>
Date2015-06-02 10:05 -0700
Message-ID<b1d9c608-3279-4f37-963a-0fa540c28584@googlegroups.com>
In reply to#15380
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



> 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,
> 
> .
> > 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

[toc] | [prev] | [next] | [standalone]


#15382

Fromjans <janis.rough@gmail.com>
Date2015-06-02 10:54 -0700
Message-ID<9dde102e-0baa-46c2-ab19-eef4c018b650@googlegroups.com>
In reply to#15368
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.
> 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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web