mohan.hab
mohan.hab

Reputation: 21

Failed opening required

Error Fatal error: require() [function.require]: Failed opening required '/home/demohab/public_html/mailout/admin/com/lib/mc9uowrh329xzx.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/demohab/public_html/mailout/admin/com/init.php on line 57

CODE(42-59)

function __iem_autoload_function($className)
{
    // faster than calling require_once
    // also, if the class already exists, then we don't even need to autoload the file
    if (class_exists($className)) {
        return;
    }

    $path = dirname(__FILE__) . '/lib/' . str_replace('_', '/', $className);

    // the .class.php naming convention is now deprecated, but since most files still use it
    // so it is put first to improve performance
    if (is_readable($path . '.class.php')) {
        require $path . '.class.php';
    } else {
        require $path . '.php';
    }
}

Upvotes: 0

Views: 3284

Answers (3)

mohan.hab
mohan.hab

Reputation: 21

The problem was because of wrong file permission given as 777. I rectified by reinstalling fresh one on linux server.

Upvotes: 2

Serj Sagan
Serj Sagan

Reputation: 30208

Your code is trying to open a file (require it into your code) mc9uowrh329xzx.php and it does not exist at the location of '/home/demohab/public_html/mailout/admin/com/lib/'

Upvotes: 0

Wesley van Opdorp
Wesley van Opdorp

Reputation: 14941

The path you are trying to open, does not exist.

This can have multiple reasons, the most common are:

  1. The file doesn't exist (doh!).
  2. Your include path isn't correct.

Upvotes: 0

Related Questions