Re: Help with strange include problem in PHP 5.2.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Richard,
Hi all,

The include path is correct.  That was one of the first things I played around 
with.  At the moment, it's  include_path = ".".  I also tried renaming the 
php.ini file to php.ini.off so that it wasn't found and took all the 
defaults, but with no success.  

Last night I built PHP 5.1.6 and took the same php.ini file.  Everything 
worked.  The build environment was the same, the configure arguments were the 
same, only the php version was different.  

I'm guessing that I've done something wrong somewhere because I haven't found 
any references to this problem from any one else.  I just have no idea what 
it could be.  I don't know if it's any help in locating the problem, my build 
environment is Solaris 10, Sun Studio 10 with the Sun C and C++ compilers.  
# cc-V
Sun C 5.7 2005/01/07
# CC -V
CC: Sun C++ 5.7 2005/01/07

LDFLAGS=-L/opt/sfw/lib -L/usr/sfw/lib -L/usr/lib -R/opt/sfw/lib:/usr/sfw/lib:/usr/lib:/opt/oracle/instantclient_10_2
CPPFLAGS=-I/opt/sfw/include -I/usr/sfw/include/openssl -I/usr/local/BerkeleyDB/include -I/usr/include -I/opt/oracle/instantclient_10_2/sdk/include
CFLAGS=-I/opt/sfw/include -I/usr/sfw/include/openssl -I/usr/local/BerkeleyDB/include -I/usr/include -I/opt/oracle/instantclient_10_2/sdk/include

And to your "rant" about the code developers make - I totally agree with you.  
As the administrator of a server with close to 600 users who all put their 
own applications in their own accounts up, then ask me why it "doesn't work", 
I get annoyed at such things too.

regards
Markus



On Thursday 30 November 2006 19:04, Richard Lynch wrote:
> On Thu, November 30, 2006 6:49 am, Markus Mayer wrote:
> > I have a strange problem including files in PHP 5.2.0 running on Unix.
> >  If I
> > try to include a file using include 'filename.inc';, everything is
> > fine.  As
> > soon as I try to put a "." in front of the file name, for example
> > include './filename.inc';, I get a "failed to open stream: No such
> > file or
> > directory" error.  Does anyone have any suggestions as to what is
> > going
> > wrong?` This all works with php 4.4.4 built with the same environment
> > and
> > compiler on the same system.
>
> What is your include path in PHP 5.2.0?
>
> I'm going to go out on a limb and bet a dollar that the PHP 4.4.4
> include_path has "." as one element within the list and that the PHP
> 5.2.0 include_path does NOT have "." within the list.
>
> I.e.:
> 4.4.4 include_path ".:include_test_dir"
> 5.2.0 include_path "include_test_dir"
>
> In the first case, 4.4.4, you've got . in there, so . combined with ./
> will "find" the file you want.
>
> In the second case, 5.2.0, you've got no . in there, so ./ is looking
> in a directory, not the directory you expect, and it ain't finding the
> file because it's not there.
>
> Rant #24, not directed at Markus, but the world at large :-)
> PHP developers should understand and use include_path instead of
> hacking up their source with hard-coded paths and weird sub-directory
> / parent-directory hacks in include/require statements.
>
> It drives me nuts when I install nice software packages, but I can't
> put their components where I want them.
>
> End result:
> rm -rf [insert your nifty project directory name here]
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some starving artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux