[PHP] Zend refuses to include file while parser finds it
When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. My development machine is a WIMP (the server is a LAMP but it's not relevant here). This is not the first include in this site, but the first include inside of an include: require(includes/initiate.php); I have tried pretty much everything: require(initiate.php); require(/includes/initiate.php); require(./initiate.php); And a few others more exotic. The error I get is: Debug Warning: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(includes/initiate.php): failed to open stream: No such file or directory Compile Error: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(): Failed opening required 'includes/initiate.php' (include_path='.;c:\php4\pear') The include initiate.php calls a bunch of functions and classes. Should I change the include_path to make Zend understand where to look? And why don't I get the error message with the previous includes? I am testing Zend to determine if it is good environment (currently using Dreamweaver, which is not that bad, but I heard that Zend is the reference). Thanks for the help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend refuses to include file while parser finds it
At 01:06 AM 5/1/2006, Nicolas Verhaeghe wrote: When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. ... The error I get is: Debug Warning: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(includes/initiate.php): failed to open stream: No such file or directory Compile Error: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(): Failed opening required 'includes/initiate.php' (include_path='.;c:\php4\pear') Could it have anything to do with the difference between forward-slashes on the net and back-slashes on a local computer? Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend refuses to include file while parser finds it
Nicolas Verhaeghe wrote: When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. My development machine is a WIMP (the server is a LAMP but it's not relevant here). there is a world of difference between IIS and Apache - might I suggest you install a copy of apache on your local machine and use that instead, it would rule out another difference between the dev and production envs. This is not the first include in this site, but the first include inside of an include: require(includes/initiate.php); I have tried pretty much everything: require(initiate.php); require(/includes/initiate.php); require(./initiate.php); And a few others more exotic. The error I get is: Debug Warning: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(includes/initiate.php): failed to open stream: No such file or directory Compile Error: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(): Failed opening required 'includes/initiate.php' (include_path='.;c:\php4\pear') The include initiate.php calls a bunch of functions and classes. Should I change the include_path to make Zend understand where to look? And why don't I get the error message with the previous includes? I am testing Zend to determine if it is good environment (currently using Dreamweaver, which is not that bad, but I heard that Zend is the reference). I have seen problems with Zend Server/Debugger related to includes/requires failing where the file definitely does exist. the 'solution' in the cases where I was party was always to restart apache - I'd add that I've only ever seen this happen on windows boxes (local development). It might be worth reinstalling everything and getting the apache2/php5 up2date (and ofcourse installing the correct version of the zend extensions) so that your working with a clean slate. Thanks for the help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend refuses to include file while parser finds it
At 1:06 AM -0700 5/1/06, Nicolas Verhaeghe wrote: When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. My development machine is a WIMP (the server is a LAMP but it's not relevant here). This is not the first include in this site, but the first include inside of an include: require(includes/initiate.php); I have tried pretty much everything: require(initiate.php); require(/includes/initiate.php); require(./initiate.php); Nicolas: Try: require(../initiate.php); One dot doesn't do anything (that I know of). Also, place the following in your code (initiate.php), run it, and find the correct path: ?php echo(br/); echo(pre); print_r($_SERVER); echo(/pre); ? HTH's tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend refuses to include file while parser finds it
tedd wrote: At 1:06 AM -0700 5/1/06, Nicolas Verhaeghe wrote: When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. My development machine is a WIMP (the server is a LAMP but it's not relevant here). This is not the first include in this site, but the first include inside of an include: require(includes/initiate.php); I have tried pretty much everything: require(initiate.php); require(/includes/initiate.php); require(./initiate.php); Nicolas: Try: require(../initiate.php); One dot doesn't do anything (that I know of). ./ is the current working directory -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend refuses to include file while parser finds it
John Nichel wrote: tedd wrote: At 1:06 AM -0700 5/1/06, Nicolas Verhaeghe wrote: When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. My development machine is a WIMP (the server is a LAMP but it's not relevant here). This is not the first include in this site, but the first include inside of an include: require(includes/initiate.php); I have tried pretty much everything: require(initiate.php); require(/includes/initiate.php); require(./initiate.php); Nicolas: Try: require(../initiate.php); One dot doesn't do anything (that I know of). this is what seems to happen because normally the DOT (as explained by John) is part of the include_path declaration. it certainly does do something! ./ is the current working directory where 'current working directory' is the directory of the script that was actually called and not the directory of the current file (something I'm always making a thinko about). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend refuses to include file while parser finds it
On 5/1/06, Nicolas Verhaeghe [EMAIL PROTECTED] wrote: When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. My development machine is a WIMP (the server is a LAMP but it's not relevant here). This is not the first include in this site, but the first include inside of an include: require(includes/initiate.php); I have tried pretty much everything: require(initiate.php); require(/includes/initiate.php); require(./initiate.php); And a few others more exotic. The error I get is: Debug Warning: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(includes/initiate.php): failed to open stream: No such file or directory Compile Error: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(): Failed opening required 'includes/initiate.php' (include_path='.;c:\php4\pear') The include initiate.php calls a bunch of functions and classes. Should I change the include_path to make Zend understand where to look? And why don't I get the error message with the previous includes? I am testing Zend to determine if it is good environment (currently using Dreamweaver, which is not that bad, but I heard that Zend is the reference). Thanks for the help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Try using a combination of dirname(__FILE__) and DIRECTORY_SEPARATOR to get your paths. You could say require( dirname(__FILE__) . DIRECTORY_SEPARATOR . 'includes'. DIRECTORY_SEPARATOR .'initiate.php); which would resolve the full path with the correct separator reguardless of OS.
RE: [PHP] Zend refuses to include file while parser finds it
Thanks to all the messages let me answer to all of them at once. First, I'd like to have a dedicated Linux server, but I cannot have too many machines in my home office, unfortunately. I also develop ASP Web sites and I find that PHP is usually IIS compatible. There is no reason why I should not run PHP on IIS on a Windows machine. Also the site works perfectly on Apache hosted on a Linux box. This include problem is therefore not server related. It therefore has to be a Zend issue. The Zend debugger will accept the links to the includes when I call the include from the include point of view itself. Meaning that if the calling include is in the includes folder, and the called include in the same folder, Zend will expect it to be called this way: include(include.php); But this previous code will not work on the IIS or Apache server, which expect the following: include(includes/include.php); And this wherever you are on the server. I think there is something that I need to fix in Zend itself. I also wonder if I could not redefine the include folder locally, so that both Zend and the API picks it up and agree with each other. Do you think that an .htaccess could do the job? I had problems with such a file on Windows. Otherwise I like Zend as an editor so far but I'd love to be able to use all the features. -Original Message- From: Eric Butera [mailto:[EMAIL PROTECTED] Sent: Monday, May 01, 2006 9:24 AM To: php Subject: Re: [PHP] Zend refuses to include file while parser finds it On 5/1/06, Nicolas Verhaeghe [EMAIL PROTECTED] wrote: When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. My development machine is a WIMP (the server is a LAMP but it's not relevant here). This is not the first include in this site, but the first include inside of an include: require(includes/initiate.php); I have tried pretty much everything: require(initiate.php); require(/includes/initiate.php); require(./initiate.php); And a few others more exotic. The error I get is: Debug Warning: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(includes/initiate.php): failed to open stream: No such file or directory Compile Error: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(): Failed opening required 'includes/initiate.php' (include_path='.;c:\php4\pear') The include initiate.php calls a bunch of functions and classes. Should I change the include_path to make Zend understand where to look? And why don't I get the error message with the previous includes? I am testing Zend to determine if it is good environment (currently using Dreamweaver, which is not that bad, but I heard that Zend is the reference). Thanks for the help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Try using a combination of dirname(__FILE__) and DIRECTORY_SEPARATOR to get your paths. You could say require( dirname(__FILE__) . DIRECTORY_SEPARATOR . 'includes'. DIRECTORY_SEPARATOR .'initiate.php); which would resolve the full path with the correct separator reguardless of OS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Zend refuses to include file while parser finds it
Thanks to all the messages let me answer to all of them at once. First, I'd like to have a dedicated Linux server, but I cannot have too many machines in my home office, unfortunately. I also develop ASP Web sites and I find that PHP is usually IIS compatible. There is no reason why I should not run PHP on IIS on a Windows machine. Also the site works perfectly on Apache hosted on a Linux box. This include problem is therefore not server related. It therefore has to be a Zend issue. The Zend debugger will accept the links to the includes when I call the include from the include point of view itself. Meaning that if the calling include is in the includes folder, and the called include in the same folder, Zend will expect it to be called this way: include(include.php); But this previous code will not work on the IIS or Apache server, which expect the following: include(includes/include.php); And this wherever you are on the server. I think there is something that I need to fix in Zend itself. I also wonder if I could not redefine the include folder locally, so that both Zend and the API picks it up and agree with each other. Do you think that an .htaccess could do the job? I had problems with such a file on Windows. Otherwise I like Zend as an editor so far but I'd love to be able to use all the features. -Original Message- From: Eric Butera [mailto:[EMAIL PROTECTED] Sent: Monday, May 01, 2006 9:24 AM To: php Subject: Re: [PHP] Zend refuses to include file while parser finds it On 5/1/06, Nicolas Verhaeghe [EMAIL PROTECTED] wrote: When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. My development machine is a WIMP (the server is a LAMP but it's not relevant here). This is not the first include in this site, but the first include inside of an include: require(includes/initiate.php); I have tried pretty much everything: require(initiate.php); require(/includes/initiate.php); require(./initiate.php); And a few others more exotic. The error I get is: Debug Warning: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(includes/initiate.php): failed to open stream: No such file or directory Compile Error: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(): Failed opening required 'includes/initiate.php' (include_path='.;c:\php4\pear') The include initiate.php calls a bunch of functions and classes. Should I change the include_path to make Zend understand where to look? And why don't I get the error message with the previous includes? I am testing Zend to determine if it is good environment (currently using Dreamweaver, which is not that bad, but I heard that Zend is the reference). Thanks for the help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Try using a combination of dirname(__FILE__) and DIRECTORY_SEPARATOR to get your paths. You could say require( dirname(__FILE__) . DIRECTORY_SEPARATOR . 'includes'. DIRECTORY_SEPARATOR .'initiate.php); which would resolve the full path with the correct separator reguardless of OS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend refuses to include file while parser finds it
What happens when you run Project-Check Included Files? Is Zend using this cache in the debugger too? Ed On May 1, 2006, at 4:56 PM, Nicolas Verhaeghe wrote: Thanks to all the messages let me answer to all of them at once. First, I'd like to have a dedicated Linux server, but I cannot have too many machines in my home office, unfortunately. I also develop ASP Web sites and I find that PHP is usually IIS compatible. There is no reason why I should not run PHP on IIS on a Windows machine. Also the site works perfectly on Apache hosted on a Linux box. This include problem is therefore not server related. It therefore has to be a Zend issue. The Zend debugger will accept the links to the includes when I call the include from the include point of view itself. Meaning that if the calling include is in the includes folder, and the called include in the same folder, Zend will expect it to be called this way: include(include.php); But this previous code will not work on the IIS or Apache server, which expect the following: include(includes/include.php); And this wherever you are on the server. I think there is something that I need to fix in Zend itself. I also wonder if I could not redefine the include folder locally, so that both Zend and the API picks it up and agree with each other. Do you think that an .htaccess could do the job? I had problems with such a file on Windows. Otherwise I like Zend as an editor so far but I'd love to be able to use all the features. -Original Message- From: Eric Butera [mailto:[EMAIL PROTECTED] Sent: Monday, May 01, 2006 9:24 AM To: php Subject: Re: [PHP] Zend refuses to include file while parser finds it On 5/1/06, Nicolas Verhaeghe [EMAIL PROTECTED] wrote: When I run the Zend debugger, it returns an error telling me it cannot find a certain include, while when I run the site it works fine. My development machine is a WIMP (the server is a LAMP but it's not relevant here). This is not the first include in this site, but the first include inside of an include: require(includes/initiate.php); I have tried pretty much everything: require(initiate.php); require(/includes/initiate.php); require(./initiate.php); And a few others more exotic. The error I get is: Debug Warning: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(includes/initiate.php): failed to open stream: No such file or directory Compile Error: C:\Inetpub\wwwroot\bfbb\includes\pages\header.php line 3 - main(): Failed opening required 'includes/initiate.php' (include_path='.;c:\php4\pear') The include initiate.php calls a bunch of functions and classes. Should I change the include_path to make Zend understand where to look? And why don't I get the error message with the previous includes? I am testing Zend to determine if it is good environment (currently using Dreamweaver, which is not that bad, but I heard that Zend is the reference). Thanks for the help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Try using a combination of dirname(__FILE__) and DIRECTORY_SEPARATOR to get your paths. You could say require( dirname(__FILE__) . DIRECTORY_SEPARATOR . 'includes'. DIRECTORY_SEPARATOR .'initiate.php); which would resolve the full path with the correct separator reguardless of OS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend refuses to include file while parser finds it
Nicolas Verhaeghe wrote: Thanks to all the messages let me answer to all of them at once. First, I'd like to have a dedicated Linux server, but I cannot have too many machines in my home office, unfortunately. I also develop ASP Web sites and I find that PHP is usually IIS compatible. *usually* besides apache on windows is also possible - and running 2 webservers is also not a problem. There is no reason why I should not run PHP on IIS on a Windows machine. many beg to differ. :-) Also the site works perfectly on Apache hosted on a Linux box. This include problem is therefore not server related. It therefore has to be a Zend issue. it works on LAMP but not on WIMP zo it must be Zend - I think I missed something in the logic there, heh it's late ;-) The Zend debugger will accept the links to the includes when I call the include from the include point of view itself. Meaning that if the calling include is in the includes folder, and the called include in the same folder, Zend will expect it to be called this way: include(include.php); But this previous code will not work on the IIS or Apache server, which expect the following: include(includes/include.php); And this wherever you are on the server. is your include path changing at some point? I think there is something that I need to fix in Zend itself. Zend is closed source, so that is going to be tough and with regard to your env. Zend [debugger] should be completely agnostic - things should run the same with or without it. I also wonder if I could not redefine the include folder locally, so that both Zend and the API picks it up and agree with each other. Do you think that an .htaccess could do the job? I had problems with such a file on Windows. not if your using IIS. or are you now using Apache - I'm really confused! Otherwise I like Zend as an editor so far but I'd love to be able to use all the features. run the debugger on a local apache - I swear to pick a deity that it will be alot more stable. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Zend refuses to include file while parser finds it
Yes, I know that Apache works on Windows, but I just don't feel like having two Web servers on the same box. -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, May 01, 2006 4:28 PM To: Nicolas Verhaeghe Cc: 'Eric Butera'; 'php' Subject: Re: [PHP] Zend refuses to include file while parser finds it Nicolas Verhaeghe wrote: Thanks to all the messages let me answer to all of them at once. First, I'd like to have a dedicated Linux server, but I cannot have too many machines in my home office, unfortunately. I also develop ASP Web sites and I find that PHP is usually IIS compatible. *usually* besides apache on windows is also possible - and running 2 webservers is also not a problem. There is no reason why I should not run PHP on IIS on a Windows machine. many beg to differ. :-) Also the site works perfectly on Apache hosted on a Linux box. This include problem is therefore not server related. It therefore has to be a Zend issue. it works on LAMP but not on WIMP zo it must be Zend - I think I missed something in the logic there, heh it's late ;-) The Zend debugger will accept the links to the includes when I call the include from the include point of view itself. Meaning that if the calling include is in the includes folder, and the called include in the same folder, Zend will expect it to be called this way: include(include.php); But this previous code will not work on the IIS or Apache server, which expect the following: include(includes/include.php); And this wherever you are on the server. is your include path changing at some point? I think there is something that I need to fix in Zend itself. Zend is closed source, so that is going to be tough and with regard to your env. Zend [debugger] should be completely agnostic - things should run the same with or without it. I also wonder if I could not redefine the include folder locally, so that both Zend and the API picks it up and agree with each other. Do you think that an .htaccess could do the job? I had problems with such a file on Windows. not if your using IIS. or are you now using Apache - I'm really confused! Otherwise I like Zend as an editor so far but I'd love to be able to use all the features. run the debugger on a local apache - I swear to pick a deity that it will be alot more stable. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php