Posted by kdineshbe on October 25, 2010 at 4:48am
Please anyone tell me how to recover from the fatal error pages?
For example, i am writing a php code in my node which has some errors, which results in fatal error page. Then the whole site is inaccessible?
Tnakhs in advance
Comments
You can configure custom
You can configure custom error pages with apache configurations. Check http://www.codestyle.org/sitemanager/apache/errors-500.shtml link for more info.
Can you post the error message
Fatal error normally come when memory limit exhausts or php script time out occurs. If you can post the error message here it will be easy to find out the problem.
Normally you can debug this by pasting below code in index.php file of drupal.
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
Post the fatal error message to get better anwers.
Cheers,
Anil Sagar,
Sr, Drupal Developer
SourceN
www.sourcen.com
Nice Lullabot article
Hi Dinesh
You should avoid writing php code in nodes. Try creating a custom module for any custom php code.
Here is a great Lullabot article about Debugging with Drupal - http://www.lullabot.com/articles/quick-and-dirty-debugging . Also go through the comments to get a insight on different debugging methods.
Siva Kumar Epari
Another precise article about debugging
FYI
http://ratatosk.backpackit.com/pub/1836982-debugging-drupal
Siva Kumar Epari
After D7 calendar update
Hi,
I've just ran a Calendar update (to 7.x-3.0) & run database update when the whole site crash. I can't enter to any admin or public page. The error is:
Fatal error: Call to undefined function date_views_base_tables() in /htdocs/public/www/sites/all/modules/calendar/includes/calendar.views.inc on line 18
I understand that it has to do with this module, can I make a quick recover if I replace the modules/calendar/includes folder with backup files? If you have any solution at all please help me, I'm not very used to Drupal or DB.
Thanks in advance!
Disable the module via phpmyadmin
Two options:
1. Disable the module via phpmyadmin.
2. Delete the module folder via ftp.
Good luck.
kevinsiji
Submitted by -
Submitted by - trevorforrest
"Discovered there was a discrepancy with the versions of calendar and date I was running. So solved problem by downloading the latest versions of date and calendad...DELETED the old versions in the modules directory and then uploaded the new ones. Had to run update.php after and all was well thereafter.
Hope this helps"
Refer=http://drupal.org/node/1475506
Thanks
Actually I solved it replacing two calendar files of the 'incliudes' folder: calendar_plugin_row.inc & calendar.views.inc. Now it seems to be working stable. Thanks for replying!
Not a coder so thats how I do it as well.
I usually get those fatal 'white' pages when enabling / disabling modules
so like the comment above ...
1) disable the module via phpmyadmin
2) look for System... table in your db
3)..fields are simple eg:
Name - aggregator
Type - module
Status (1=on , 0=off)
and yes deleting the folder from ftp works...but in my opinion not a good practice as it leaves the 'tables' of that module in your db....a proper 'un-install' will delete these tables and keep your db healthy and clean :)
...a good module to check the health of your db is the schema module
http://drupal.org/project/schema
Help with a fatal error!
Hi friends of Drupal,
I just took over helping out with a volunteer-run site and I'm getting a fatal error message, I think because I did an update that said it was not "backwards compatible" with the site. Here is the error message I am getting at www.spiralfoods.coop:
Fatal error: require_once() [function.require]: Failed opening required '/home/spiralfoods/www/www/sites/all/modules/views/modules/translation/views_handler_filter_node_language.inc' (include_path='.:/home/spiralfoods/www/www/sites/all/modules/civicrm:/home/spiralfoods/www/www/sites/all/modules/civicrm/packages:.:/usr/local/php53/lib/php') in /home/spiralfoods/www/www/includes/bootstrap.inc on line 3046
I don't actually know where the files for the site are kept because I just got the site login info. I'm guessing I need to find the person who created the site and ask where all the site files are stored?
Thanks for any ideas,
Janel
Your Drupal files are stored
Your Drupal files are stored at "/home/spiralfoods/www/www" in your webserver.
Anyway, the answer at stackexchange.com will help you to get rid of the fatal error.
kevinsiji
drush cc all
drush cc all
1st you take a backup of ur
1st you take a backup of ur database.
then You could also try to clear the cache_bootstrap table using: mysql -uusername -ppassword -hhostname database -e"DELETE FROM cache_bootstrap WHERE cid='system_list';"
It should work
Take backup!
1) Check in error log.
2) Disable the module or set status of the module to zero using phpmyadmin.
3)Install drush in your root and clear cache
4) or you can update the database using updatedb
The problem was fixed. Thank you!
Hi all,
Yesterday afternoon I contacted our web host, CiviHosting, and they walked me through how to fix the problem. Thanks!
Janel
Drupal 7 module using SOAP cleint: Fatal error: Cannot redeclare
I have a problem with my Drupal 7 site when my server reboot. The problem started when a module using SOAP (require_once('SOAP/Client.php');) was enabled.
When accessing my Drupal site after my server has rebooted, the site is not displayed and the following message is displayed in the browser:
Fatal error: Cannot redeclare drupal_error_levels() in /usr/share/php/HTTP/Request.php on line 16 Call Stack: 0.0020 646768 1. {main}() /var/www/damco_berp/index.php:0 0.0108 1516288 2. drupal_bootstrap() /var/www/damco_berp/index.php:20 0.0840 9439400 3. _drupal_bootstrap_full() /var/www/damco_berp/includes/bootstrap.inc:2218 0.1281 16250152 4. module_load_all() /var/www/damco_berp/includes/common.inc:5114 0.4074 31574072 5. drupal_load() /var/www/damco_berp/includes/module.inc:24 0.4161 31724880 6. include_once('/var/www/damco_berp/sites/all/modules/bnetsolution/modules/bsjasper/bsjasper.module') /var/www/damco_berp/includes/bootstrap.inc:1104 0.4197 31956544 7. require_once('/var/www/damco_berp/sites/all/modules/bnetsolution/modules/bsjasper/includes/client.php') /var/www/damco_berp/sites/all/modules/bnetsolution/modules/bsjasper/bsjasper.module:18 0.4227 32207672 8. require_once('/usr/share/php/SOAP/Client.php') /var/www/damco_berp/sites/all/modules/bnetsolution/modules/bsjasper/includes/client.php:10 0.4525 34264480 9. require_once('/usr/share/php/SOAP/WSDL.php') /usr/share/php/SOAP/Client.php:29
I tried to solve this problem, by adding the following lines to my settings.php (sites/default/settings.php):
error_reporting(E_ALL ^ E_DEPRECATED);
$conf['error_level'] = 2;
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
With this modification, after the server is rebooted, I still have the same behavior except for one thing. After the fatal error, if the browser page is refreshed (Ctrl+F5), my site is displayed correctly and everything work well until the next server reboot.
I have tried to modify some code to search for a solution:
In the file: includes/bootstrap.inc The function: _drupal_bootstrap_configuration()
I have temporary disabled the line: set_error_handler('_drupal_error_handler');
With this line commented out, every time the server reboot, my site is up and running ok, but I have warnings messages displayed at the top or bottom of the browser (deprecated function, strict warning, ....).
This site was running under Drupal 6 before and this problem was not present.
Any suggestions would be very appreciated!
Thanks in advance!
Regards,
N.B. The following text is the log file of my Server (Apache2 log) where we can see the PHP Fatal error:
[Fri Sep 20 16:23:49 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Fri Sep 20 16:23:49 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Fri Sep 20 16:23:50 2013] [error] python_init: Python version mismatch, expected '2.6.5+', found '2.6.6'. [Fri Sep 20 16:23:50 2013] [error] python_init: Python executable found '/usr/bin/python'. [Fri Sep 20 16:23:50 2013] [error] python_init: Python path being used '/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload'. [Fri Sep 20 16:23:50 2013] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads. [Fri Sep 20 16:23:50 2013] [notice] mod_python: using mutex_directory /tmp [Fri Sep 20 16:23:50 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Fri Sep 20 16:23:50 2013] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Fri Sep 20 16:23:50 2013] [notice] Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze17 with Suhosin-Patch mod_python/3.3.1 Python/2.6.6 mod_ssl/2.2.16 OpenSSL/0.9.8o mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP Fatal error: Cannot redeclare drupal_error_levels() in /usr/share/php/HTTP/Request.php on line 16 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP Stack trace: [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 1. {main}() /var/www/damco_berp/index.php:0 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 2. drupal_bootstrap() /var/www/damco_berp/index.php:20 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 3. _drupal_bootstrap_full() /var/www/damco_berp/includes/bootstrap.inc:2218 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 4. module_load_all() /var/www/damco_berp/includes/common.inc:5114 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 5. drupal_load() /var/www/damco_berp/includes/module.inc:24 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 6. include_once() /var/www/damco_berp/includes/bootstrap.inc:1104 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 7. require_once() /var/www/damco_berp/sites/all/modules/bnetsolution/modules/bsjasper/bsjasper.module:18 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 8. require_once() /var/www/damco_berp/sites/all/modules/bnetsolution/modules/bsjasper/includes/client.php:10 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 9. require_once() /usr/share/php/SOAP/Client.php:29 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP Fatal error: Cannot redeclare class InsertQuery in /var/www/damco_berp/includes/database/query.inc on line 727 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP Stack trace: [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 1. {main}() /var/www/damco_berp/index.php:0 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 2. drupal_bootstrap() /var/www/damco_berp/index.php:20 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 3. _drupal_bootstrap_full() /var/www/damco_berp/includes/bootstrap.inc:2218 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 4. module_load_all() /var/www/damco_berp/includes/common.inc:5114 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 5. drupal_load() /var/www/damco_berp/includes/module.inc:24 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 6. include_once() /var/www/damco_berp/includes/bootstrap.inc:1104 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 7. require_once() /var/www/damco_berp/sites/all/modules/bnetsolution/modules/bsjasper/bsjasper.module:18 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 8. require_once() /var/www/damco_berp/sites/all/modules/bnetsolution/modules/bsjasper/includes/client.php:10 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 9. require_once() /usr/share/php/SOAP/Client.php:29 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 10. _drupal_shutdown_function() /var/www/damco_berp/includes/bootstrap.inc:0 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 11. call_user_func_array() /var/www/damco_berp/includes/bootstrap.inc:3405 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 12. _drupal_session_write() /var/www/damco_berp/includes/session.inc:0 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 13. db_merge() /var/www/damco_berp/includes/session.inc:206 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 14. DatabaseConnection->merge() /var/www/damco_berp/includes/database/database.inc:2445 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 15. DatabaseConnection->getDriverClass() /var/www/damco_berp/includes/database/database.inc:841 [Fri Sep 20 16:24:02 2013] [error] [client 192.168.1.103] PHP 16. Database::loadDriverFile() /var/www/damco_berp/includes/database/database.inc:781