By gcreamean on
I am getting this error: Fatal error: Class 'DrupalDefaultEntityController' not found in coment.module
It is just happening periodically, I don't know why. Can anyone help with this?
Thank you
I am getting this error: Fatal error: Class 'DrupalDefaultEntityController' not found in coment.module
It is just happening periodically, I don't know why. Can anyone help with this?
Thank you
Comments
fatal errors while bootstraping drupal 7
For some reason, Drupal 7 runs best with PHP 5.3.8 on my computer. While bootstrapping Drupal in a CLI with PHP 5.3.8 I face no issues. Yet, PHP 5.3.8 can only queue files and run them from the command line, like:
c:\> php ".php". Output would be written to the standard I/O console.
In fact, I need to be able to load (bootstrap) all DRUPAL functions and variables into an interactive php session so I query DRUPAL functions, database, and variables as I am developing my modules. We all know that php 5.3.8 and other versions are not compiled to write lines to the cli while in interactive session. For that, I used the last version I have compiled with write lines and that is PHP 5.2.9-2.
Come to bootstrapping DRUPAL from an interactive php 5.2.9-2 session by [include ".php"], DRUPAL fails to bootstrap fully, crashes, and issues fatal errors that some classes are not available. This fact puzzled me, as if there are new functionality to calling files that exist in php 5.3.8 and are missing in php 5.2.9-2..
My web server interacts with PHP 5.3.8 and there are no errors in DRUPAL application presented through the browser. Also, there are no errors when running the *.php files in the background using php 5.3.8 from the command line. The fatal errors occurred through the browser before upgrading to php 5.3.8 a reason why I upgraded my WAMP system.
The work around it was by including files from within the calling file by putting [require_once "drupal_file_name.inc, *.module, *.system, *.etc...."] for every class or function that is missing.
The code that worked for me as follows:
<?php
chdir('where drupal is installed');
define('DRUPAL_ROOT', getcwd());
$defaults = array(
'HTTP_HOST' => 'localhost',
'PHP_SELF' => '/index.php',
'QUERY_STRING' => '',
'REQUEST_URI' => '/',
'SCRIPT_NAME' => NULL,
'REMOTE_ADDR' => '127.0.0.1',
'REQUEST_METHOD' => 'GET',
'SERVER_NAME' => NULL,
'SERVER_SOFTWARE' => NULL,
'HTTP_USER_AGENT' => 'console',
);
// Replace elements of the $_SERVER array, as appropriate.
$_SERVER = $_SERVER + $defaults;
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
require_once DRUPAL_ROOT . '/includes/entity.inc';
require_once DRUPAL_ROOT . '/includes/common.inc';
require_once DRUPAL_ROOT . '/modules/system/system.module';
require_once DRUPAL_ROOT . '/includes/database/select.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
#registry_rebuild();
-------------------------------------------------
You might need to require_once more files as needed until the DRUPAL_BOOTSTRAP_FULL functions.
Enjoy
Where?
Where'd you put that code?
--
anawillem
http://jellobrain.com