Debugging in Reclaim Cloud (without access to cPanel)

So the site you have running through Reclaim Cloud isn't behaving quite right, maybe it's a bit slow, or you've gotten an error code, or, as can happen with WordPress sites, you're confronted with the dreaded white screen of death. You need to know what's going on so you can fix it; that's where error, or, debugging logs come into play. These logs will show you exactly what's going on with your site, from plugin failures to imperfect code, giving you someplace to start your troubleshooting efforts.

For folks who have historically used the cPanel dashboard to manage debugging efforts, attempting to map those same techniques to their favorite applications in the Reclaim Cloud environment might seem confusing at first, if not a big daunting. This article will take you through the steps necessary to set up debugging and enable error logging in some of our more popular Reclaim Cloud applications like WordPress, Omeka S, and Omeka Classic.

WordPress

We'll need to add some PHP to our wp-config.php file to enable error logging/debugging within our WordPress install.

1. Navigate to your wp-config.php file in your Reclaim Cloud dashboard; you'll find this in /var/www/webroot/ROOT/wp-config.php

Screen_Shot_2022-08-29_at_12.35.36_PM.png

2. Search for the /* That's all, stop editing! Happy publishing. */ comment and right above it paste in the following code:

define( 'WP_DEBUG', true );

You may see this line already in your wp-config.php file, but the true value is replaced with false. Simply switch false to true to enable debugging.

Screen_Shot_2022-08-29_at_10.28.52_AM.png

3. Click the (anachronistic) Save icon on the top left of your AppServer screen. Screen_Shot_2022-08-29_at_12.44.55_PM.png

Great! Debugging is enabled.

You could be done here, but you'll likely notice that your WordPress dashboard has error/warning displays at the top of the page. That can be annoying, but in the worst of cases, you might see the same thing happen at the top of your public page, which is annoying and a security risk.

Follow the next step to get rid of these pesky notifications.

 

Disabling public error and warning display

4. Beneath the last line of code we changed, paste the following code block:

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

Again, if this base code is already in your file, just make sure that the true/false values match the above code block.

 

Omeka S

Conceptually, completing this process in Omeka S is pretty much the same as in WordPress. You'll be locating a PHP file and making some small tweaks to the code. If you'd like your Omeka S errors to be displayed publicly when there's an issue— a more detailed error page than the generic, "Omeka S has encountered an error"— you'd have to edit the .htaccess file. While is certainly an option, keep in mind that enabling error logs through .htaccess will show public errors to any user that visits your site.

Display error messages via .htaccess

1. Navigate to the root folder of your Omeka S installation and open its .htaccess file.

2. In line 1, replace the production value with the development value.

Screen_Shot_2022-08-29_at_11.31.21_AM.png

3. Click the (anachronistic) Save icon on the top left of your AppServer screen. Screen_Shot_2022-08-29_at_12.44.55_PM.png

Now when your Omeka S encounters an error, it will be detailed on the error page when attempting to load in the browser.

Enabling an error log

1. Navigate to your site's local.config.php file; you'll find this in /var/www/webroot/ROOT/config/local.config.php

Screen_Shot_2022-08-29_at_1.30.14_PM.png

2. In line 4, replace the false value with true.

Screen_Shot_2022-08-29_at_11.32.15_AM.png

3. Click the (anachronistic) Save icon on the top left of your AppServer screen. Screen_Shot_2022-08-29_at_12.44.55_PM.png

You'll find your error logs in log/application.log.

 

Omeka Classic

There are a few key differences to note when attempting to retrieve error messages in Omeka Classic when compared to Omeka S. While you still have the option of displaying error messages directly on the screen in your browser as well as activating error logging, these steps and files look somewhat different.

Display error messages via .htaccess

1. Navigate to line 14 of your Omeka Classic .htaccess file, which you can find at /var/www/webroot/ROOT/.htaccess, and uncomment by removing the hash (#) in front of SetEnv APPLICATION_ENV development.

Screen_Shot_2022-08-30_at_1.25.15_PM.png

2. Click the (anachronistic) Save icon on the top left of your AppServer screen. Screen_Shot_2022-08-29_at_12.44.55_PM.png

Enabling an error log

1. Navigate to line 87 of the config.ini file located in /var/www/webroot/ROOT/application/config/config.ini.

2. Change the value of log.errors to true.

Screen_Shot_2022-08-30_at_1.33.44_PM.png

3. Click the (anachronistic) Save icon on the top left of your AppServer screen. Screen_Shot_2022-08-29_at_12.44.55_PM.png

You'll find your error logs in the errors.log file.


Interested in enabling error logs for another application not listed above? Let us know by contacting Reclaim Hosting Support

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more
Reclaim Hosting Support Hours
8:00 am - 5:00 pm ET, Monday through Friday
Submit a Ticket
Get a quick and helpful response from the pros.
Need Extra Support?
No problem, we're here to help! Talk to us about Professional Services.