Bug #54803 [Fbk->Opn]: file_exists() error.

From: Date: Wed, 18 May 2011 08:53:34 +0000
Subject: Bug #54803 [Fbk->Opn]: file_exists() error.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-160810@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54803&edit=1

 ID:                 54803
 User updated by:    vinirresko at hotmail dot com
 Reported by:        vinirresko at hotmail dot com
 Summary:            file_exists() error.
-Status:             Feedback
+Status:             Open
 Type:               Bug
 Package:            *Directory/Filesystem functions
 Operating System:   Windows XP SP3
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

$test = var_dump(file_exists("/class/autenticacao.class.php"));
Returned: bool(false) 

$test = var_dump(file_exists("/class/autenticacao.class.php"));
Returned: bool(true)

I'm using Apache.


Previous Comments:
------------------------------------------------------------------------
[2011-05-18 10:48:22] pajoye@php.net

doh.... my mistake but...

ok, let me rephrase:

Please provide:

 - cacls output for this file
 - test using var_dump(file_exists($path));
 - test with an relative path (as in /foo/bar.php not c:/foo/bar.php)
and tell 
us how it works
 - test with an absolute path (as in c:/foo/bar.php not /foo/bar.php)
and tell 
us how it works

Which SAPI do you use? Apache? FastCgi? Can you try it using the command
line 
too?

------------------------------------------------------------------------
[2011-05-18 10:44:15] vinirresko at hotmail dot com

$test = var_dump("/class/autenticacao.class.php");
print $test;

returned: string(29) "/class/autenticacao.class.php"

have no junctions of the pach.

------------------------------------------------------------------------
[2011-05-18 10:40:10] pajoye@php.net

No, thanks.

All I need is the info I asked here. The permission, are junctions part
of the 
path, etc.

A simple test case like var_dump("/foo/bar.php"); is enough.

------------------------------------------------------------------------
[2011-05-18 10:36:36] vinirresko at hotmail dot com

Right, i'll send the archive, ok ?
<?
$includes = array();
$includes[0] = '/class/conexao.class.php';
$includes[1] = '/class/query.class.php';

for($i = 0; $i < count($includes);$i++){
   try{
	if(file_exists($includes[$i])){
		include_once($includes[$i]);
	}else{
		throw new Exception("Arquivo ".$includes[$i]." não existe.");
	}
	}catch(Exception $e){
			print
"<script>alert('".$e->getMessage()."')</script>";
			exit;
		}
}
?>

------------------------------------------------------------------------
[2011-05-18 10:33:08] pajoye@php.net

No idea what's wrong. Please provide all info I ask and tell us if part
of the 
path is a junction or something similar. Is it actually a file? a
directory?

------------------------------------------------------------------------


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/bug.php?id=54803


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


Thread (17 messages)

« previous php.bugs (#160810) next »