Home » PHP » PHP_CompatInfo » Bug #8559
PHP_CompatInfo fails to scan if it finds empty file in path
Details
| Submitted | 2006-08-25 14:32 UTC |
|---|---|
| From | glen at delfi dot ee |
| Assigned | farell |
| Status | Closed |
| Package | PHP_CompatInfo |
| PHP Version | 5.1.4 |
| OS | PLD Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-08-25 14:32 UTC] glen at delfi dot ee
Description:
------------
PHP_CompatInfo fails to scan if it finds empty file in
path. besides it gives bogus error that it can't open
directory.
strace showed that it tries to mmap the found files, and
mmap(2) returns EINVAL if one tries to mmap() 0 byte file.
$ mkdir test
$ cd test/
$ l
total 0
$ > test.php
$ php-compatinfo -d .
Failed opening directory ("/tmp/test"). Please check your
spelling and try again.
Usage:
Cli.php --dir=DIR [--no-recurse] | --file=FILE
[--debug] | [--help]
$ cat /usr/bin/php-compatinfo
#!/usr/bin/php
<?php
/**
* Get the Compatibility info from PHP CLI
*
* @version $Id: PHP_CompatInfo.php,v 1.1 2006/08/24
22:29:55 glen Exp $
* @author Davey Shafik <davey@php.net>
* @package PHP_CompatInfo
* @access public
* @ignore
*/
ini_set('memory_limit', '24M');
require_once 'PHP/CompatInfo/Cli.php';
$cli = new PHP_CompatInfo_Cli();
$cli->run();
$