Fatal Error Call To Undefined Function Glob
I am very new to PHP and trying to learn the glob() function. I copied the example on php.net : When I ran the script, I got this error message: Fatal error: Call to undefined function glob() in /usr/local/apache2/htdocs/hrms/globtest.php on line 2 I am running PHP 5.2.17 on CentOS 4.8 . How do I compile PHP to get the glob function in ? Please help. -- al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Reply Quote Louis Huppenbauer Re: [PHP] Please help with glob April 05, 2011 09:21AM Hi there Since glob is actually a part of the core - Are you absolutely sure that you're running PHP > 4.3 2011/4/5 Al Mangkok <[emailprotected]>: > Hi everyone, > I am very new to PHP and trying to learn the glob() function. I copied > the example on php.net : > > foreach (glob("*.txt") as $filename) { > echo "$filename size " . filesize($filename) . "\n"; > } > ?> > > When I ran the script, I got this error message: > Fatal error: Call to undefined function glob() in > /usr/local/apache2/htdocs/hrms/globtest.php on line 2 > > I am running PHP 5.2.17 on CentOS 4.8 . How do I compile PHP to get > the glob function in ? > Please help. > > > -- > al > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Reply Quote Al Mangkok Re: [PHP] Please help with glob April 05, 2011 09:21AM Hi Louis, Yes, I have read that glob is only available for PHP > 4.3 and I am using version 5.2.1.7 # /usr/local/bin/php -v PHP 5.2.17 (cli) (built: Feb 16 2011 15:41:35) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies with Zend Optimizer v3.3.9, Copyright (c)
undefined function: glob() in /***/wp-inst/wpmu-settings.php on line 62 I understand this is because I'm running PHP 4.2.2 and glob was introduced in 4.3. Upgrading PHP is not an option. http://www.serverphorums.com/read.php?8,298240 Is there a workaround for this? Barring that I guess I could do a search for all the glob functions and rewrite them. Are there any other 4.3 dependencies? jaseone Inactive Posted 11 years https://mu.wordpress.org/forums/topic/315 ago # There is a replacement for glob that is detailed here define that in one of the core WP includes and you should be good to go, just remember to add it back in if you upgrade WPMU and are still on the older version of PHP. However I don't know if there are any other compatibility problems. About this Topic Started 11 years ago by codesmith Latest reply from jaseone Privacy | GPL See also: WordPress.com | WordPress.TV | WordCamp | WP Jobs | Fan WP on Facebook | Blog RSS Code is Poetry
undefined function glob()".Glob functions are not available.I am using PHP 5.4.Glob http://grokbase.com/t/php/php-install/14220n3vyf/call-to-undefined-function-glob is missing in the list of Registered PHP Streams http://share.ez.no/forums/install-configuration/undefined-function-glob in the output ofphpinfo().Glob is not in the list of disabled functions.How can I make the glob function available?Do I have to recompile PHP?Which parameter defines if glob is in the list of Registerd PHP Streams?All fatal error I found in the last few days about a missing glob function has nothingto do with my problem.My PHP version is not too old. It is not in the list of disabled functions,but still not available.As a workaround I found some suggestions like creating an alternativeversion fatal error call of glob() so that every call to glob() will be replaced with myfunction.Best regards CFR reply Tweet Search Discussions Search All Groups PHP php-install Related Discussions Registerd PHP Streams mysql_connect does not work help with mail() function Undefined pg_prepare() in 5.1.6 Problem with truetypefunction Installing Jpgraph... Modules not working Fatal error: Call to undefined function... enable mbstring frunctions? Re: mod_php4 upgrade horrors Discussion Navigation viewthread | post Discussion Overview groupphp-install @ Notice: Undefined variable: pl_domain_short in /home/whirl/sites/grokbase/root/www/public_html__www/cc/flow/tpc.main.php on line 1605 categoriesphp postedFeb 2, '14 at 11:23a activeFeb 2, '14 at 11:23a posts1 users1 websitephp.net Preferences responses expanded Hotkey:s font variable Hotkey:f user style avatars Hotkey:a 1 user in discussion Christoph Freundt (1) Content Home Groups & Organizations People Users Badges Support Welcome FAQ Contact Us Translate site design / logo © 2016 Grokbase
this section Search text: Skip to main content Get involved Events Forums eZ Platform eZ Publish 5 Platform Install & configuration Setup & design General Developer Suggestions Extensions Localized forums Translation Feedback & ideas about the eZ Community platforms & tools Discussions Learn eZ Publish Zeta Components Write a tutorial - Win an Award Downloads Downloads Blogs eZ Community Project Board eZ Publish Next UI All blogs Projects Members Teams Share.ez.no Community Project Board Diff Squad eZ Community » Forums » Install & configuration » undefined function glob() expandshrink 0 like Like it! undefined function glob() undefined function glob() Thursday 06 January 2011 9:56:33 pm - 2 replies Hi all,In trying to finish an upgrade to eZ Publish 4.4, we've run across the following problem. We're unable to clear the cache either through the web admin interface or the command line. Running the purge from command line generates the following error:Fatal error: Call to undefined function glob() in *****/kernel/classes/clusterfilehandlers/ezfsfilehandler.php on line 729A bit of Googling reveals that this problem generally occurs with PHP v4.3 or earlier. However, we're running v5.3.2.What could be causing this? php Related forum topics 2 replies Thursday 06 January 2011 11:45:11 pm does this apply?"Note: This function isn't available on some systems (e.g. old Sun OS)." Probably not, but what kind of OS is it?Is it disabled in php.ini maybe(disable_functions)? Modified on Thursday 06 January 2011 11:45:22 pm by André R 0 like Like it! Permalink Tuesday 18 January 2011 4:16:00 pm Sorry for the delay in replying.It's Red Hat Enterprise v5.4, 64 bit mode. 0 like Like it! Permalink expandshrink You must be logged in to post messages in this topic! 36 542 Users on board! Forums menu Forums eZ Platform eZ Publish 5 P