Agaric Design Collective

Debugging errors in Drupal or anything running on Apache

Average: 4 (1 vote)
By Benjamin Melançon
on 05 Apr
0 comments

Key words and phrases

find Apache error log

Tags

Description

Had occasion to do a quick (read: emergency) debug session for a live site today, and as I remembered the steps for a change, wandering around on a server not our own, I share with them with the world repackaged as a debugging lesson:

$ cd /var/log/httpd/
-bash: cd: /var/log/httpd/: Permission denied
$ sudo tail -f /var/log/httpd/error.log
Password:
amos is not in the sudoers file.  This incident will be reported.
$ su root
Password:
# cd /var/log/httpd/
# ls -la
...
-rw-r--r--  1 root root  16210235 Apr  2 20:29 error_log
...
# tail -f error_log

and that shows me a live stream of the most recent errors on the site.

There was the big old fatal error of a function not found.

A site administrator had disabled a module that was an undeclared dependency of another module. Point and click parse error the Drupal way!

The logs are also likely to live in cd /var/log/www and if you do have sudo access but not root access you can use sudo ls -la /var/log/www to see what's in there (the precise name of your error log file, you generally want the one without any numbers on it, that is the current one).

 

Post new comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <small> <pre> <strike> <sub> <sup> <kbd> <s>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.