Support » Alpha/Beta/RC » Fatal error: Cannot redeclare glob

  • I´m trying a fresh install of 2.0RC1, and all that I get is:

    Fatal error: Cannot redeclare glob() in /DISK4/WWW/ on line 95
    Any ideas?


    PS: Running on Apache 2.0.55, PHP 5.0.5, MySQL 4.1.15, eAccelerator 0.9.3

Viewing 7 replies - 1 through 7 (of 7 total)
  • well, if you look at the code (functions-compat.php) you’ll see that the function declaration of glob() only will be declared if a declaration of glob doesn’t already exist.


    if( !(function_exists('glob')) ):
    function glob($pattern) {

    and so on. Now I don’t know if this actually will help you out, but try to rewrite the condition to:
    if(!function_exists(‘glob’)) {
    function glob($pattern) {

    } // end of glob()
    } // end of condition

    I don´t know if this is the best solution, but after commenting the entire sentence, install process was ok.



    Hi, I have the same problem and I try rewrite the condition in functions-compat.php, but nothing changed.

    Don´t you have any ideas? Thank you very much for each advice!

    Fatal error: Cannot redeclare glob() in /DISK3/WWW/ on line 95



    I have same problem with globe function.

    1. You must rename function globe() in functions-compat.php for example to globeX
    … function globX($pattern) { …

    2. You must open cache.php and find text globe( and replace this by globeX(

    I had the same problem and did what OzzyQ suggested. Installation went ok but after it when I log in as admin I see the following errors:

    Warning: glob() has been disabled for security reasons in /DISK2/WWW/….

    Please can someone help?

    But fallen, why WP 2 RC1?
    Hmm – sorry, old thread!

    I use stable version of WP 2, I added the question here to this topic because it is what I think caused prob.

    Anyway I solved it by editing file wp-includes/functions.php and change row 1785 from:

    $screenshot = glob(“$theme_root/$stylesheet/screenshot.*”);


    $screenshot = globX(“$theme_root/$stylesheet/screenshot.*”);

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error: Cannot redeclare glob’ is closed to new replies.