PHP 4.0 Bug #8079: warning: unknown filetype...
| From: | juker at gmx dot de | Date: | Sat, 02 Dec 2000 15:31:05 +0000 |
| Subject: | PHP 4.0 Bug #8079: warning: unknown filetype... | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39847@lists.php.net to get a copy of this message | ||
From: juker@gmx.de
Operating system: linux
PHP version: 4.0.3
PHP Bug Type: Filesystem function related
Bug description: warning: unknown filetype...
When I run the filetype()-function on a unix-socket, my php 4.0.3 drops a warning like:
<b>Warning: Unknown file type (49152) in /home/path/test.php on line 7</b>
A good example to reproduce this behaviour is a 'echo filetype("/dev/log");',
where I would expect a result like "socket", but I get a "unknown" and the
warning.
I include a short script which dumps the contents of a directory and calls the filetype-function on
every found entry. When I run the script on /dev I get two warnings.
------------- test.php -------------------
<pre>
<?
$d = "/dev"; // dir to show
$h = opendir($d);
while($e = readdir($h))
{
echo filetype("$d/$e");
echo " ";
echo htmlentities($e);
echo "<br>\n";
}
closedir($h);
?>
</pre>
------------------------------------------
yours, juker
--
Edit Bug report at: http://bugs.php.net/?id=8079&edit=1