ID: 48365
Updated by: jani@php.net
Reported By: peter dot chen at itg dot com
-Status: Open
+Status: Feedback
Bug Type: Apache2 related
Operating System: sparc-sol2.10
PHP Version: 5.2.9
New Comment:
Is all dirs in that path readable by the user you run it with? (try as
root..?) glob() returns false if there's some error..
Previous Comments:
------------------------------------------------------------------------
[2009-05-28 18:49:08] peter dot chen at itg dot com
Oh yeah, and the command returns:
bool(false)
------------------------------------------------------------------------
[2009-05-28 18:42:33] peter dot chen at itg dot com
I'm using sparc-solaris2.10.
Was there a flag I needed to include for my php install to enable
glob() to work?
------------------------------------------------------------------------
[2009-05-28 16:50:31] jani@php.net
Try this on command line:
# php -r 'var_dump(glob("/home/apache/htdocs/testkt/*"));'
------------------------------------------------------------------------
[2009-05-28 16:49:23] jani@php.net
Exactly what Solaris version are you on?
Try this on command line:
# php -r 'var_dump(glob("/home/apache/htdocs/testkt/"));'
------------------------------------------------------------------------
[2009-05-27 23:05:14] peter dot chen at itg dot com
My apologies, I did not read all the instructions.
Is there a flag I needed to enable when building php?
As for the code, I mistakenly left the ';' that caused the parse error.
The code should be as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>glob test</title>
</head>
<body>
<?
$path = "/home/apache/htdocs/testkt/";
print("<b>glob:</b><br><br>");
print_r(glob($path . '*.*'));
print("<br><br>***********************<br><br>");
print("<b>scandir:</b><br><br>");
print_r(scandir($path));
?>
</body>
</html>
------------------------------------------------------------------------
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/48365--
Edit this bug report at http://bugs.php.net/?id=48365&edit=1