PHP Fatal error: Call to undefined method after uploading on the web-Record and share programming errors

Try putting a debug statement into the file that defines class DB and DB::exists(), such as:

echo "DB file was included\n";

Does that message appear? If not, then the file isn’t being included, which explains why the method isn’t found.

Find the the location where that file is supposed to be getting included, and examine the include path at the point:

echo "Include path is: " . get_include_path() . "\n";

Does another file with the same name exist in one of the other directories listed in the include path? If so, you might need to alter the other of the entries in your include path (which is defined by include_path in php.ini, but can also be edited at runtime with set_include_path())

Originally posted 2013-08-31 05:00:17.