Read log files through Drupal Devel's Execute PHP tool

$out = shell_exec('tail -n 100 /path/to/apache/logs/php_error-log');

output the last 100 lines from the log file.

Also, using the PHP shell_exec() function you could run "ls" or "less" commands to verify that the proper files are in an environment for which you don't have file level access.

Important note: shell_exec() is a powerful reason to keep PHP filter access restricted to only the most trusted users in your Drupal site - or disabled altogether if not needed.

No comments

Add your comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

Find Me Around

User login