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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sun Dec 22 01:01:30 2024 UTC