Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ in ….functions.php on line 73

*Without quotes PHP interprets the REQUEST_URI as a constant** but corrects your typo error if there is no such constant and interprets it as string. When error_reporting includes E_NOTICE, you would probably get an error such as: Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ in <file path> on line <line number> But if … Read more

Trying to display ads on only a third of posts in a loop. Keep getting Error 500?

echo “<img src=\”” . bloginfo(‘template_url’); . “/img/sample-ad-side.png\” alt=\”Sample Advertisement\”>”; You added a semicolon, what comes after that semicolon is a new statement. . “img/ etc is not valid PHP, so it errors out. Also bloginfo does not return its value, it prints it, so you need to change that to get_bloginfo. I would suggest you … Read more

Why would running an admin check throw a 500 error? I’m calling is_super_admin();

From your pastebin: if (!function_exists(‘wp_get_current_user’)) { include_once( ABSPATH . ‘wp-admin/includes/pluggable.php’ ); } if ( is_super_admin() ) { add_action( ‘admin_init’, ‘myplugin_register’); add_action( ‘admin_menu’, ‘myplugin_menu’ ); } There is no file at wp-admin/includes/pluggable.php. pluggable.php is at wp-includes/pluggable.php, but I see no reason you should have to intentionally include that file. It load front and back end.

Site no longer working following server crash – how to restore it

Since you do have ftp access, edit your wp-config.php add these lines: @ini_set(‘display_errors’,0); define(‘WP_DEBUG’, true); // Turn debugging ON define(‘WP_DEBUG_DISPLAY’, false); // Turn forced display OFF define(‘WP_DEBUG_LOG’, true); // Turn logging to wp-content/debug.log at the same time, comment out any lines that define WP_DEBUG as false. Then do a page reload and finally look at … Read more