0

I get a 500 HTTP Error (Display Error is enabled) when this script is ran.

centOS 7 latest w/WHM & Wordpress

<?php
include 'wp-includes/pluggable.php';
$user = wp_get_current_user();
echo $user
?>

Expecting userID echo'd on page. Results in HTTP 500 error. Nothing logged in php log.

I looked into wordpress documentations and pluggable.php should be the script to include.

  • 1
    Check the Wordpress directory for error_log. Sometimes errors are logged there, instead. – aynber May 20 '19 at 18:25
  • Not sure if this will help but check out https://stackoverflow.com/questions/4731364/internal-error-500-apache-but-nothing-in-the-logs in the `Make sure PHP logging is turned on` section – GoinOff May 21 '19 at 21:32
  • Either check error_log in that cPanel's user account where the script is. The location should be `/home/cpaneluser/public_html/error_log`. Also you coudl check `/usr/local/apache/logs/error_log` to see if any logs are thrown there by apache. – Bogdan Stoica Jun 05 '19 at 09:13

0 Answers0