Re: [PHP4BETA] bug or feature (with phpMyAdmin 2.0.2)?
| From: | Administrateur | Date: | Mon, 26 Jul 1999 18:30:30 +0000 |
| Subject: | Re: [PHP4BETA] bug or feature (with phpMyAdmin 2.0.2)? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-2792@lists.php.net to get a copy of this message | ||
Le ven, 23 jui 1999, Jason Brooke a écrit :
> >
> > The cause for this error is definitely in line 107 in the file
> > tbl_select.php3 where it says:
> >
> > require("sql.php3");
> >
> > Interestingly the error disappears when you change it to:
> >
> > include("sql.php3");
> >
> > Now, is this a bug of PHP4 (because it runs totally flawless under
> > PHP 3.0.x)? Or is it a bug in phpMyAdmin and therefore a bug in PHP
>
> That suggests to me that you have a phpx_include_path in your apache
> config file and sql.php3 isn't in one of the directories specified in
> the directive.
This is definitively _NOT_ a PHP4 problem. I had to patch phpmyadmin with 3
series.
As soon as you use some system wide include dirs, when you "require" something,
it has to be in one of those.
A good programming practice would be to code
require "./sql.inc"
or whatever you need if those includes sit in the current dir. This would
prevent some nasty problems as 2 includes with the same name sitting in 2
different directories, both in the include path... Sounds crazy, but I found
this with one of the sites hosted here.
Another twist would be prepending the include pat with ./, but this could lead
to some security holes.
JC