+ Reply to Thread
Results 1 to 8 of 8

Thread: Cannot instantiate non-existent class

  1. Join Date
    Mar 2006
    Posts
    5

    Cannot instantiate non-existent class

    Hi,

    I'm just trying to install the script but when i try and use it (whois.php) i get:


    Fatal error: Cannot instantiate non-existent class: ep_dev_whois_global in /home/fhlinux192/s/squibnocket.co.uk/user/htdocs/whois/whois.php on line 63

    Any ideas?

    Craig

  2. Join Date
    Mar 2006
    Posts
    5

    Re: Cannot instantiate non-existent class

    If you need my php details they are at www.squibnocket.co.uk/info.php

  3. Join Date
    Aug 2004
    Posts
    781

    Re: Cannot instantiate non-existent class

    A few things:

    1) Make sure whois/global.php is uploaded (or even upload it again, maybe it was a botched upload).
    2) Make sure your absolute path is correct.
    3) Make sure you have installed the latest version and the file came from http://www.ep-dev.com .

    The error is indicating that it cannot find ep_dev_whois_global class, which resides in global.php file, and is included through whois.php . Thus, your problem should be solved via the steps above. Try them in order, attempting to access the script after each step, and see if that fixes your problem.

  4. Join Date
    Mar 2006
    Posts
    5

    Re: Cannot instantiate non-existent class

    Ive just downloaded it again and retried and i get the same error.

    I've even changed the function to:

    function EP_Dev_Whois()
    {
    // set error reporting level
    error_reporting(E_ALL ^ E_NOTICE);

    // try include and error if bad abs path
    $include_success = include_once("http://www.squibnocket.co.uk/whois/global.php");
    if ($include_success === false)
    {
    die("<div style=\"font-weight: bold; color: red;\">Error Loading EP-Dev Whois Script: The specified absolute path is incorrect.</div>");
    }

    // initialize core
    $this->CORE = new EP_Dev_Whois_Global($this->absolute_path);
    }


    Still this produces exactally the same error.

  5. Join Date
    Aug 2004
    Posts
    781

    Re: Cannot instantiate non-existent class

    It is because your absolute path is wrong.

    Your absolute path is NOT http://www.squibnocket.co.uk/whois/ .

    You need to upload an unmodified version of whois.php .

    First try the script with a blank absolute path (default) as it will likely auto-detect it. Then, if needed, modify your absolute path to (this is based on your original error):

    /home/fhlinux192/s/squibnocket.co.uk/user/htdocs/whois/

  6. Join Date
    Mar 2006
    Posts
    5

    Re: Cannot instantiate non-existent class

    Ive tried

    // absolute path
    $this->absolute_path = "whois/";

    and

    // absolute path
    $this->absolute_path = "/whois/";

    Both return "Error Loading EP-Dev Whois Script: The specified absolute path is incorrect.".

    // absolute path
    $this->absolute_path = "/home/fhlinux192/s/squibnocket.co.uk/user/htdocs/whois/";// absolute path

    $this->absolute_path = "";

    Both of these return the original error

  7. Join Date
    Mar 2006
    Posts
    5

    Re: Cannot instantiate non-existent class

    Ive also tried completely taking out the include function part of whois.php and physically copying the whole of global.php into the whois.php so the functions are actually set in the whois.php file.

  8. Join Date
    Aug 2004
    Posts
    781

    Re: Cannot instantiate non-existent class

    FOLLOW THESE INSTRUCTIONS EXACTLY:

    Wow, you should NOT BE MANUALLY MODIFYING THESE FILES.

    That absolute path isn't the only location of the absolute path. Furthermore, manually modifying it just results in the script not being able to automatically detect it.

    Here is what you need to do:
    1. DELETE all files pertaining to the whois script (the entire folder and all its files and subfolders).
    2. UPLOAD brand new, completely unmodified, files into your webspace.
    3. Visit whois.php in your browser (YES, the script should work out-of-the-box without any admin panel visiting).

    Now, If 3 brought up the whois.php just fine, then you know the script is automatically detecting your absolute path and you DO NOT NEED TO MODIFY IT when you do login to the admin panel and configure the script (LEAVE IT BLANK).

    If 3 brought up an error, then you need to login to the admin panel and modify the absolute path THROUGH the admin panel (on the Script Settings page).

    I would *never* recommend modifying the files manually unless you are well experienced in PHP (which you are not, as you asked about the original error... an error that PHP programmers can all diagnose).

    Follow the steps above and the script will work. If for some reason you do not follow the steps above because you have not listened to me, feel free to send me a private message and I will follow the steps above for you.

    Don't take any of the above as an insult or yelling, I capitalize for emphasis and not anger.

+ Reply to Thread

Posting Permissions

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