php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8079 warning: unknown filetype...
Submitted: 2000-12-02 10:31 UTC Modified: 2000-12-03 08:44 UTC
From: juker at gmx dot de Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.3 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: juker at gmx dot de
New email:
PHP Version: OS:

 

 [2000-12-02 10:31 UTC] juker at gmx dot de
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-03 08:44 UTC] stas@php.net
Fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC