Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Jevon Wright
I tried this and it didn't fail... Jevon - Original Message - From: "Tumurbaatar S." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 05, 2004 1:32 PM Subject: Re: [PHP-DEV] nested includes fails? > Hi, Jevon, > Mine is not so complex: > > //all files in 'inc' include

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Tumurbaatar S.
Full path works without problem. "Daniel Convissor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, May 05, 2004 at 10:32:26AM +0900, Tumurbaatar S. wrote: > > > require_once("common.php"); > > What happens if you use the full path for ALL of your require_once > statements?

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Daniel Convissor
On Wed, May 05, 2004 at 10:32:26AM +0900, Tumurbaatar S. wrote: > require_once("common.php"); What happens if you use the full path for ALL of your require_once statements? --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and databas

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Tumurbaatar S.
Hi, Jevon, Mine is not so complex: //all files in 'inc' include 'common.php' \inc\a.php \inc\b.php //common.php does not include anything \inc\common.php //this works. Main scripts include 'common.php' indirectly \member\member.php //this fails:redeclaration of class C \member\membe

Re: [PHP-DEV] PHP -R STDIN chomping line ends

2004-05-04 Thread Marcus Boerger
Hello Aaron, the idea of removing the line ends comes from copying other unix tools behavior. Also reappending a line ending should result in the standard line ending for the platform used. So th eproblem is actually working with input from another platform. I won't change the standard behavior of

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Jevon Wright
Sorry for the delay... I didn't quite understand the problem, but I've tried to reproduce it: - \inc\a.php \inc\b.php \inc\common.php \inc\member.php \inc\foo.php - \member\member.php \member\member2.php \member\member3.php - I can ac

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Tumurbaatar S.
I'm not familiar with Linux/Apache, but if they run as Windows/IIS pair, then I'm afraid that "php.ini" would be shared among all developers hosting on a single server and my include dir would expose its contents to other app-s. Though below may be another workaround: "Kamesh Jayachandran" <[E

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Andi Gutmans
Can you give it a try with relative patches the way Tumurbaatar did? Andi At 11:41 PM 5/4/2004 +1200, Jevon Wright wrote: I tested it on PHP 5 RC1, Win XP SP1, IIS 5.1 running as CGI - it didn't fail. I tried it on PHP 5 RC2, Win XP SP1, IIS 5.1 running as CGI - it didn't fail then, either. (Call

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Jevon Wright
I tested it on PHP 5 RC1, Win XP SP1, IIS 5.1 running as CGI - it didn't fail. I tried it on PHP 5 RC2, Win XP SP1, IIS 5.1 running as CGI - it didn't fail then, either. (Calling c.php) a.php b.php c.php common.php Jevon - Original Message - From: "Tumurbaatar S."

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Ilya Sher
Ilya Sher wrote: Tumurbaatar S. wrote: 'common.php' contains some class definition and PHP5 fails with 'PHP Fatal error: Cannot redeclare class ... in common.php...' when script C.php starts. The file including map is: A.php: require_once(common.php) B.php: require_once(common.php) C.php: requ

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Andi Gutmans
He shouldn't have to use this. It should work. At 03:57 PM 5/4/2004 +0530, Kamesh Jayachandran wrote: Any reason why you want to use require_once with same filename with different paths? Why don't you set a include_dir as your e:\...\myapp\inc and just require 'common.php'. With regards Kamesh Jay

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Andi Gutmans
This is supposed to work and if it doesn't, then it's a bug. I'll try and find time to see if I can reproduce it. At 07:19 PM 5/4/2004 +0900, Tumurbaatar S. wrote: A brief directory structure: "e:\...\myapp\" - this my web apps root and it contains several subdirs: "e:\...\myapp\members\" - a no

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Kamesh Jayachandran
Any reason why you want to use require_once with same filename with different paths? Why don't you set a include_dir as your e:\...\myapp\inc and just require 'common.php'. With regards Kamesh Jayachandran On Tue, 2004-05-04 at 15:49, Tumurbaatar S. wrote: > A brief directory structure: > > "e

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Tumurbaatar S.
A brief directory structure: "e:\...\myapp\" - this my web apps root and it contains several subdirs: "e:\...\myapp\members\" - a normal, web shared subdir "e:\...\myapp\inc\" - an include subdir where are located all my include files and this subdir is not web shared (though my Inetpub dir is lo

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Andi Gutmans
This does sound like a bug because it's supposed to save the translated one in the lookup table. Can you give us some more info? It sounds as if you did take a look at the code. At 04:31 PM 5/4/2004 +0900, Tumurbaatar S. wrote: All filepaths used within require_once() are lowercase. I use relati

[PHP-DEV] PHP -R STDIN chomping line ends

2004-05-04 Thread Aaron Wormus
Greetings! I've been exploring the work done on the PHP CLI sapi, and am impressed with the new features that are in PHP 5. One thing that I am a bit troubled about is the behaviour of the -R switch in that it removes the trailing \n and \r line end characters when it delivers the line to $ar

Re: [PHP-DEV] nested includes fails?

2004-05-04 Thread Tumurbaatar S.
All filepaths used within require_once() are lowercase. I use relative paths for include, depending on what directory a file located in, my requires look like 'inc/common.php' or 'common.php' or '../inc/common.php'. And it seems that PHP5 for Windows require() does some error on translating these r