Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2007
    Posts
    106
    Thanks
    19
    Thanked 12 Times in 12 Posts

    Odd PHP error situation

    Occasionally I've seen this error happen on a Wordpress installation I manage:

    Fatal error: Call to undefined function define() in /home/blog012/public_html/index.php on line 14


    What is really odd is that defiine() is a built-in PHP function. If PHP is running then the function should always be available.

    Could this type of error then indicate there is something wrong elsewhere in the system, like PHP isn't configured properly?


    This is the source code of index.php, there's nothing wrong with it, just posting it so we can all see that.

    Code:
    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ?>
    Any help is appreciated, thanks!
    The CodingForums Funny Images thread ** Now with 20+ pages!! ** - http://www.codingforums.com/showthread.php?t=245405

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    This appears to be a bug with APC when compiled with NTS PHP. There's no resolution indicated here: https://bugs.php.net/bug.php?id=62851
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • Users who have thanked Fou-Lu for this post:

    >ssp-cdr< (02-27-2013)

  • #3
    Regular Coder
    Join Date
    May 2007
    Posts
    106
    Thanks
    19
    Thanked 12 Times in 12 Posts
    Oh great thanks that must be it
    The CodingForums Funny Images thread ** Now with 20+ pages!! ** - http://www.codingforums.com/showthread.php?t=245405


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •