For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > August 2007 > Re: [PHP-INSTALL] PHP v4 vs. PHP v5 behavior (fwd)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-INSTALL] PHP v4 vs. PHP v5 behavior (fwd)
Keith Roberts

2007-08-10, 7:01 pm

Sorry for posting to you directly Jesse. Here it is for the
list now.

---------- Forwarded message ----------
To: Jesse Santana <jsantana@csulb.edu>
From: Keith Roberts <keith@karsites.net>
Subject: Re: [PHP-INSTALL] PHP v4 vs. PHP v5 behavior

On Fri, 10 Aug 2007, Jesse Santana wrote:

<snip>

> The new server we are setting up is running Solaris 10, apache 2.2.4 and
> PHP 5.2.3. The same script I mentioned above produces this error:
>
> Warning: include(./../extension.inc) [function.include]: failed to open
> stream: Permission denied in
> /home/bu/jsantana/htdocs/php/IncludeExample.php on line 3
>
> Warning: include() [function.include]: Failed opening
> './../extension.inc'


> for inclusion (include_path='.:/usr/local/php5/lib/php') in


^^^this directive is not set correctly - it looks like the default values
to me. Maybe you need to check the include_path value for the previous
version of PHP.

> If I define my include path as
> include("/home/bu/jsantana/htdocs/extension.inc");, the script works fine
> with PHP 5. Can anyone explain why under PHP 5 the ./../ does not back
> up
> one directory from the directory where I call my script from?



include("/home/bu/jsantana/htdocs/extension.inc")

You may need to set that option in your php.ini file, so it is a standard
include path.

I use ../../ all over the place on PHP 5.2.1 - the only complaints I get
from PHP is if I have not set the include path correctly.

I compile php myself, and use a copy of the configuration file for the
previous version. I make backups as well, just in case I need them.

You could also use a GUI-based file comparison utility (like KDiff3) if
Solaris has one, to compare both php.ini files from PHP4 and the new PHP5.
This will highlight right away any differences in those two files.

HTH

Keith


> Thank you,
>
> Jesse
>
> Jesse Santana
> Project Lead - Enterprise Services Group
> Information Technology Services
> California State University, Long Beach
> 1250 Bellflower Blvd.
> Long Beach, CA 90840
> Office: (562)985-8511
> Fax: (562)985-8855
>


------------------------------------------------------------
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

This email address is challenge-response protected with
http://www.tmda.net
------------------------------------------------------------
Paul Blondé

2007-08-10, 7:01 pm

-----Original Message-----
>
>I use ../../ all over the place on PHP 5.2.1 - the only complaints I =

get=20
>from PHP is if I have not set the include path correctly.
>
>HTH
>
>Keith
>


The only thing I noticed, though, was that he posted a path with =
"./../",
not "../../", which could have been a typo but might not have been. I =
seem
to recall that some *NIX variants (notably Solaris) used to support that
style for disambiguity reasons or some such nonsense, but I can't locate =
the
reference to it anymore and Google chokes on even a quoted search for =
that.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paul Blond=E9
Web Programmer
enTel Communications Inc
jpb@entel.ca
250.633.5151
866.633.2644
Jesse Santana

2007-08-10, 7:02 pm

That wasn't a typo. This code is pulled directly from the phpBB
installation (install.php). It is in fact:

$phpbb_root_path = './../';
include($phpbb_root_path.'extension.inc');

Jesse Santana
Project Lead - Enterprise Services Group
Information Technology Services
California State University, Long Beach
1250 Bellflower Blvd.
Long Beach, CA 90840
Office: (562)985-8511
Fax: (562)985-8855




Paul Blondé <jpb@entel.ca>
08/10/2007 02:03 PM

To
"'Keith Roberts'" <keith@karsites.net>, <php-install@lists.php.net>
cc

Subject
RE: [PHP-INSTALL] PHP v4 vs. PHP v5 behavior (fwd)






-----Original Message-----
>
>I use ../../ all over the place on PHP 5.2.1 - the only complaints I get
>from PHP is if I have not set the include path correctly.
>
>HTH
>
>Keith
>


The only thing I noticed, though, was that he posted a path with "./../",
not "../../", which could have been a typo but might not have been. I seem
to recall that some *NIX variants (notably Solaris) used to support that
style for disambiguity reasons or some such nonsense, but I can't locate
the
reference to it anymore and Google chokes on even a quoted search for
that.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paul Blondé
Web Programmer
enTel Communications Inc
jpb@entel.ca
250.633.5151
866.633.2644


Keith Roberts

2007-08-10, 7:02 pm

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com