php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #36747 glob() not defined
Submitted: 2006-03-15 18:01 UTC Modified: 2006-08-11 16:50 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: s dot manzari at icom dot de Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.4.2 OS: Sun 5.10
Private report: No CVE-ID: None
 [2006-03-15 18:01 UTC] s dot manzari at icom dot de
Description:
------------
the glob() function is not defined.

Fatal error: Call to undefined function: glob() in /ifo.kt/test/htdocs/glob.php on line 4

Configuration:
Sun OS 5.10 SPARC 64bit
Apache/1.3.33 (Unix) PHP/4.4.2 mod_perl/1.29
Configure Command:
'./configure' '--with-oci8-instant-client=/usr/lib/oracle/10.1.0.3/client/lib' '--enable-ftp'
'--enable-ssl' '--with-apxs=/usr/apache/bin/apxs' '--enable-track-vars' '--enable-bcmath'
'--with-config-file-path=/etc' '--enable-shmop' '--with-dom' '--with-zlib-dir=/usr/local'

It is my understanding, that the glob() function is available anytime after php 4.3 or so. It does work on php4.4 on a Sun 5.9 SPARC. Is there a special compile option required?

Reproduce code:
---------------
$files = glob("*.php");

foreach ($files as $filename)
{
   echo "<br>$filename size " . filesize($filename) . " kb";
}


Expected result:
----------------
index.php size 2367 kb
info.php size 317 kb
ll_test.php size 178 kb
logout.php size 576 kb
main.php size 1438 kb
todo.php size 882 kb
version.php size 2880 kb

Actual result:
--------------
Fatal error: Call to undefined function: glob() in /apache/htdocs/glob.php on line 4

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-15 18:09 UTC] tony2001@php.net
No glob() in glibc -> no glob() in PHP.
Reclassified as docu problem.
 [2006-03-15 18:22 UTC] s dot manzari at icom dot de
wow! thanks for the quick answer :-)
is glibc the same as glib found on sunfreeware.com and how do i determine whether it has glob in it.
final question: do i need to re-compile php after i update glibc or is it used dynamically?
 [2006-03-15 18:27 UTC] simp@php.net
No, glib is not the same as glibc. Additionally I doubt SUN uses the GNU libc. Problem then being: SUN OS does not support glob() in its libc.
 [2006-03-15 18:31 UTC] s dot manzari at icom dot de
but it does work on a Sun 5.9 SPARC 64 with php 4.3.11?!
 [2006-08-11 16:50 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=9f30643fe20f29981233ab562cf93658dd62f6d5
Log: fix #36747: not available everywhere
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Aug 13 01:00:03 2025 UTC