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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-03 08:44 UTC] stas@php.net
Fixed in CVS.
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC