#21674 [Com]: Warning: main(lang.php) [function.main]: failed to create stream: No such file

2003-04-02 Thread jot at agonize dot org
 ID:   21674
 Comment by:   jot at agonize dot org
 Reported By:  moderator at blackpeeps dot com
 Status:   No Feedback
 Bug Type: *URL Functions
 Operating System: Cobalt RAQ4 Apache/Linux
 PHP Version:  4.3.0
 New Comment:

this exact problem has spawned when i moved my php files from a
webserver running a slightly earlier version of php to php 4.3.0

it would seem that files do not get included unless the absolute path
is used in the include statement.


Previous Comments:


[2003-03-13 10:22:17] datsnice at bolt dot com

What is wrong with the web site it tells me that I have already signed
up and do not sign up twice, and I have never signed up before. It also
tells me that my e-mail address already exist with someone else which
it is not.



[2003-02-26 09:28:36] hmm dot hmm at firemail dot de

Hi

I have the some problem


Warning: main(shop/indexmain_kat=11nr=.php) [function.main]: failed
to create stream: No such file or directory in
/home/admin/lala.com/index.php on line 260

Warning: main() [function.main]: Failed opening
'shop/indexmain_kat=11nr=.php' for inclusion
(include_path='.:/usr/local/lib/php') in /home/admin/lala.com/index.php
on line 260

Can anyone help me?



[2003-02-12 01:18:49] xilord at yahoo dot com

Make sure you have the file names exactly correct and paths or you'll
get the same error messages.



[2003-02-04 16:49:32] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





[2003-01-22 22:25:22] [EMAIL PROTECTED]

The point of asking for var_dump(ini_get('include_path')); is so you'll
show the output of it.  This is a form of debugging.

The problem has to do with the include_path directive.  Now we're
trying to figure out why/where it gets set to '' before doing some of
these includes as this seems to be the case.

So, whenever you get this error:

Warning: main() [function.main]: Failed opening 'foo.php'...

Add this line above the include:

var_dump(array(ini_get('include_path'),__LINE__,__FILE));

This way we'll know some useful information.  Basically put this line
above EVERY one of these failed includes, such as the inclusion
config.php, extra.php, and lang.php.  

Please do this and show the output in your next reply.  Btw, I modified
Wez's debug dump a little so we can be a little more specific :)  Also,
be 100% sure you are not setting this directive in either httpd.conf or
.htaccess.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21674

-- 
Edit this bug report at http://bugs.php.net/?id=21674edit=1



#21565 [Com]: include/require fail under safe-mode.

2003-04-02 Thread jot at agonize dot org
 ID:   21565
 Comment by:   jot at agonize dot org
 Reported By:  komanek at natur dot cuni dot cz
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Tru64Unix 5.1A
 PHP Version:  4.3.0
 New Comment:

Same issue under Apache 1.3.27 and PHP 4.3.1. Includes dont seem to
work at all unless the absolute path is used.. even with safe_mode set
to off.


Previous Comments:


[2003-02-11 08:28:27] s dot birkhoff at liwest dot at

I have the same Problem under Windows 2000/XP/IIS and
PHP Version 4.3.0

In Version 4.2.3 it all works fine.



[2003-01-30 06:49:10] Emil at Wayers dot com

My Solaris 8 and Solaris 7 both have this problem with Apache 1.3.27
and MySQL-max-3.23.54a-sun-solaris2.8 +
MySQL-max-3.23.54a-sun-solaris2.7 under PHP 4.3.0



[2003-01-30 06:45:19] Emil at Wayers dot com

I found the excact same problem.

Fatal error: main() [function.main]: Failed opening required
'./libraries/grab_globals.lib.php'
(include_path='.:/usr/local/lib/php') in
/opt/www/conf/phpMyAdmin/index.php on line 9

Safe_mode is on here; I traced the problem to a require/include
function problem (duh)

You will have to specify the exact path to the file in safemode, even
if you have the path in your include_path.

If the file has no path given in the require or the include PHP 4.3.0
gives these kind of errors. But older version accept it.

Note; even ../../ and ./ do not work. The latest phpMyAdmin will not
work on PHP 4.3.0 with safemode on.



[2003-01-14 00:12:45] komanek at natur dot cuni dot cz

I turned all errors and warnings reporting to have maximum info. Here
is a real example from my web, with real paths in filesystem. Both
include and require are used to demonstrate the difference,
previously, I used only require. Strange is that in php 4.2.2 it
worked fine for me. The only difference is the upgraded php dynamic
module for Apache. It is not the problem of non-existing files or paths
because with safe_mode = Off the included and required files are found
and opened with no errors.

?php
include header.php;?
center
p
b
a href=free_catalogue.phpThe Catalogue/a
/b
/p
/center
?php
require footer.php;?
/body
/html


The output of this is:

Warning: main() [function.main]: Unable to access ./header.php in
/usr/users/dbminer/public_html/index.php on line 2

Warning: main(header.php) [function.main]: failed to create stream: No
such file or directory in /usr/users/dbminer/public_html/index.php on
line 2

Warning: main() [function.main]: Failed opening 'header.php' for
inclusion
(include_path='.:./:/usr/users/komanek/public_html/TEST/phpclasses:/usr/local/lib/php:/usr/local/www/apache/htdocs/MINER:/usr/users/dbminer/public_html:/usr/users/popin/html2/statistics/i')
in /usr/users/dbminer/public_html/index.php on line 2

The Catalogue

Warning: main() [function.main]: Unable to access ./footer.php in
/usr/users/dbminer/public_html/index.php on line 11

Warning: main(footer.php) [function.main]: failed to create stream: No
such file or directory in /usr/users/dbminer/public_html/index.php on
line 11

Fatal error: main() [function.main]: Failed opening required
'footer.php'
(include_path='.:./:/usr/users/komanek/public_html/TEST/phpclasses:/usr/local/lib/php:/usr/local/www/apache/htdocs/MINER:/usr/users/dbminer/public_html:/usr/users/popin/html2/statistics/i')
in /usr/users/dbminer/public_html/index.php on line 11



From filesystem:

lib[0]:/usr/users/dbminer/public_html(07:04)# ls -al index.php
header.php footer.php
-rw-r--r--   1 dbminer  users174 Oct 30  2000 footer.php
-rw-r--r--   1 dbminer  users   1047 Nov  7  2001 header.php
-rw-r--r--   1 dbminer  users161 Jan 13 12:08 index.php

Configure switches:

--with-apache=/scratch/sources/apache_1.3.26 --with-openssl
--with-zlib=/usr/local --with-zlib-dir=/usr/local --with-bz2=/usr/local
--with-db --enable-dbase --with-gd --with-dom --enable-ftp
--enable-gd-native-ttf --with-freetype-dir=/usr/local/freetype2
--with-iconv --with-mysql --enable-trans-sid
--with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib
--enable-sockets --enable-discard-path --enable-safe-mode
--enable-bcmatch --enable-calendar --enable-ctype --enable-mailparse
--enable-force-cgi-redirect --enable-memory-limit
--with-expat-dir=/usr/local --with-xml --with-gettext --with-mcrypt
--with-imap=/scratch/sources/imap/imap-2002.RC2
--with-imap-ssl=/scratch/sources/imap/imap-2002.RC2 --disable-cgi



[2003-01-13 17:45:48] [EMAIL PROTECTED]

Do you get any other warning/error messages, something about UID of the
script not matching that of the file