The Error That Stops Your Journal Cold
It happens without warning. Your OJS journal was working fine yesterday. Today, every page returns the same message:
500 Internal Server Error
No details. No explanation. Just a blank white screen or a generic error page and a growing queue of authors waiting to submit, reviewers expecting assignment emails, and editors wondering what went wrong.
The OJS 500 Internal Server Error is the most common and most feared technical failure in Open Journal Systems. It can appear after a plugin update, a PHP version change, a server migration, or completely out of nowhere. And because it gives you almost no information to work with, most journal editors have no idea where to even begin looking.
This guide covers every known cause of the OJS 500 error, how to diagnose exactly which one is affecting your journal, and the specific steps to fix it, written by OJS specialists who have resolved this error hundreds of times across installations in 20+ countries.
If you'd rather have an expert fix it for you instead, visit ojsguru.com for a free consultation.
What Is a 500 Internal Server Error?
A 500 error is a server-side HTTP status code that means something went wrong on the server but the server can't or won't tell you specifically what. It's a catch-all error that covers dozens of possible underlying problems.
In the context of OJS, a 500 error almost always means one of the following:
- PHP configuration doesn't meet OJS requirements
- A plugin is generating a fatal PHP error
- File or directory permissions are incorrect
- The database connection has failed or been corrupted
- OJS's configuration file has an error
- A recent OJS upgrade introduced a compatibility conflict
- Server resources (memory, execution time) have been exhausted
The good news: every one of these causes is fixable. The challenge is identifying which one is responsible because the error message itself tells you nothing.
Step 1: Enable OJS Error Logging Before You Do Anything Else
The 500 error hides the real problem from your browser but OJS and your server are almost certainly logging the actual error somewhere. Your first step is always to find and read those logs.
Option A, Check OJS's own error log:
OJS writes errors to a log file located at:
/path-to-your-ojs/cache/logs/errors.logIf this file exists and has recent entries, the actual error message will be here. This is the fastest way to identify your specific problem.
Option B, Check your server's PHP error log:
The location varies by server:
- cPanel hosting: usually /home/yourusername/logs/error_log
- Ubuntu/Debian VPS: /var/log/apache2/error.log or /var/log/nginx/error.log
- CentOS/RHEL VPS: /var/log/httpd/error_log
Option C, Enable display errors temporarily:
In your OJS config.inc.php file, find and change:
display_errors = Offto
display_errors = OnImportant: Change this back to Off as soon as you've identified the error. Displaying errors on a live journal is a security risk. Once you have the actual error message from your logs, you can match it to one of the causes below and jump directly to the relevant fix.
Cause 1: PHP Version Incompatibility
This is the #1 cause of OJS 500 errors, especially after a server update, a hosting plan change, or a new OJS installation.
OJS has strict PHP version requirements:
| OJS Version | Minimum PHP | Maximum PHP |
|---|---|---|
| OJS 3.4.x | PHP 8.0 | PHP 8.2 |
| OJS 3.3.x | PHP 7.3 | PHP 8.1 |
| OJS 3.2.x | PHP 7.2 | PHP 7.4 |
| OJS 3.1.x | PHP 7.0 | PHP 7.3 |
Running OJS on a PHP version outside this range, either too old or too new, will almost always produce a 500 error.
How to identify this cause in your error log:Look for messages containing PHP Fatal error, Deprecated, Undefined function, or Call to undefined method. These indicate PHP version conflicts.
How to fix it:
On cPanel hosting, you can change PHP version from the cPanel dashboard under MultiPHP Manager or PHP Selector, select your OJS directory and choose a compatible PHP version.
On a VPS or dedicated server running Ubuntu:
# Check current PHP version
php -v
# Install PHP 8.1 (for OJS 3.3.x)
sudo apt install php8.1 php8.1-mysql php8.1-xml php8.1-mbstring php8.1-intl php8.1-curl php8.1-zip
# Set as default
sudo update-alternatives --set php /usr/bin/php8.1After changing PHP version, clear your OJS cache:
rm -rf /path-to-ojs/cache/fc/*
rm -rf /path-to-ojs/cache/t_cache/*Then reload your journal. If the 500 error was PHP version-related, it will be gone.
Cause 2: Missing or Incorrect PHP Extensions
Even when your PHP version is correct, OJS requires specific PHP extensions to be enabled. If any of these are missing, OJS will fail with a 500 error.
Required PHP extensions for OJS 3.x:
php-mbstring
php-xml
php-intl
php-curl
php-zip
php-gd
php-json
php-mysql (or php-pgsql for PostgreSQL)How to identify this cause in your error log: Look for Call to undefined function mb_strlen(), Class 'DOMDocument' not found, or similar messages referencing specific functions. Each missing extension produces a specific function name error.
How to fix it on Ubuntu/Debian:
sudo apt install php8.1-mbstring php8.1-xml php8.1-intl php8.1-curl php8.1-zip php8.1-gd php8.1-mysql
sudo systemctl restart apache2
# or for Nginx + PHP-FPM:
sudo systemctl restart php8.1-fpmOn cPanel hosting:Go to PHP Extensions or MultiPHP INI Editor and enable each required extension for your domain.
Cause 3: PHP Memory Limit Too Low
OJS is a complex application. On resource-constrained hosting plans, the default PHP memory limit, often 64MB or 128MB, is too low. When OJS exceeds this limit, the server returns a 500 error.
How to identify this cause in your error log: Look for PHP Fatal error: Allowed memory size of X bytes exhausted.
Recommended PHP memory settings for OJS
memory_limit = 256M
upload_max_filesize = 50M
post_max_size = 50M
max_execution_time = 300
max_input_time = 300How to fix it:
Option A, Edit php.ini directly (VPS/dedicated server):
sudo nano /etc/php/8.1/apache2/php.ini
# Find and update the memory_limit line
memory_limit = 256MOption B, Add a .htaccess rule (shared hosting):
Create or edit .htaccess in your OJS root directory and add:
php_value memory_limit 256M
php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value max_execution_time 300Option C, Edit OJS's config.inc.php:
; Increase memory limit in OJS config
memory_limit = 256MAfter making changes, restart your web server and test your journal.
Cause 4: File and Directory Permission Errors
OJS requires specific file and directory permissions to read, write, and execute correctly. Incorrect permissions, too restrictive or too permissive, can both cause 500 errors.
How to identify this cause in your error log: Look for Permission denied, failed to open stream, or Unable to create directory.
Correct OJS file permissions:
Directories: 755
Files: 644
config.inc.php: 600 (more restrictive for security)The files directory (where OJS stores uploaded submissions) must be writable by the web server:
# Set correct ownership (replace www-data with your web server user)
sudo chown -R www-data:www-data /path-to-ojs/
# Set correct permissions
sudo find /path-to-ojs/ -type d -exec chmod 755 {} \;
sudo find /path-to-ojs/ -type f -exec chmod 644 {} \;
# Make the files directory writable
sudo chmod -R 775 /path-to-ojs/public/
sudo chmod 600 /path-to-ojs/config.inc.phpImportant: The path to your OJS files directory is set in config.inc.php. Make sure this directory exists, is outside your web root if possible, and is writable by the web server.
Cause 5: Plugin Conflict or Corrupt Plugin
A faulty, outdated, or incompatible plugin is one of the most common causes of OJS 500 errors — particularly after an OJS upgrade or after installing a new plugin from the Plugin Gallery.When a plugin generates a PHP fatal error, OJS can't complete page rendering and returns a 500 error. Because OJS loads plugins on every page, a single broken plugin brings down the entire journal.How to identify this cause in your error log: Look for the plugin name in the error trace. Messages often reference a path like /plugins/generic/pluginname/ followed by a PHP error.
How to fix it, Method B (if you cannot access the admin panel):
Disable plugins directly via the database:
UPDATE plugin_settings
SET setting_value = '0'
WHERE setting_name = 'enabled'
AND plugin_name = 'YourPluginName';Or rename the plugin directory to prevent OJS from loading it:
mv /path-to-ojs/plugins/generic/problemplugin /path-to-ojs/plugins/generic/problemplugin_DISABLEDAfter identifying the problematic plugin, check whether an updated version is available or contact the plugin developer. If the plugin is no longer maintained or compatible with your OJS version, remove it and find an alternative.
Cause 6: Database Connection Failure
If OJS cannot connect to its MySQL or PostgreSQL database, every page will return a 500 error. This commonly happens after a server migration, a hosting change, a database password update, or a MySQL service crash.
How to identify this cause in your error log: Look for Access denied for user, Can't connect to MySQL server, Unknown database, or Connection refused.
How to fix it:
Open config.inc.php and verify the database settings:
[database]
driver = mysqli
host = localhost
username = your_db_username
password = your_db_password
name = your_db_nameCommon issues to check:
- The database username or password has changed on the server
- The database name is incorrect
- The database host is not localhost (some hosting providers use a different host — check your hosting control panel)
- MySQL service is not running (sudo systemctl start mysql)
- The database user doesn't have full privileges on the OJS database
To verify database connectivity manually:
mysql -u your_db_username -p your_db_password -h localhost your_db_nameIf this command fails, the credentials in your config.inc.php are wrong or the database service is down.
Cause 7: Corrupt or Misconfigured config.inc.php
The config.inc.php file is OJS's master configuration file. A syntax error, an incorrect setting, or file corruption in this file will prevent OJS from loading entirely — producing a 500 error on every page.This commonly happens after a manual edit, a failed upgrade, or file transfer using an FTP client that corrupted the file encoding.
How to identify this cause in your error log: Look for Parse error: syntax error or Failed opening required referencing config.inc.php.
How to fix it:
- Download your config.inc.php and compare it to the default config.TEMPLATE.inc.php included in your OJS installation
- Look for missing quotes, extra characters, or broken lines
- Verify that all required fields have valid values, particularly base_url, files_dir, and the [database] section
- Make sure there are no Windows-style line endings (CRLF) if your server runs Linux — use a proper code editor like VS Code to check
If the file is too corrupted to repair, restore it from your most recent backup and re-enter your database credentials.
Cause 8: Failed OJS Upgrade
Upgrading OJS is one of the highest-risk operations for triggering a 500 error. An incomplete upgrade — caused by a timeout, a PHP memory error, or an interrupted file transfer — can leave OJS in a partially upgraded state where the database schema and the application files are out of sync.
How to identify this cause:The 500 error appeared immediately after running an OJS upgrade. Your error log may reference missing database tables or undefined class names.
How to fix it:
If the upgrade was interrupted, do not attempt to run it again without first restoring from backup. A partially upgraded OJS database combined with a second upgrade attempt can cause irreversible data loss.
The correct recovery path:
- Restore your pre-upgrade backup (database + files)
- Verify the restored installation works correctly
- Review the OJS upgrade documentation for your specific version jump
- Increase PHP memory_limit and max_execution_time before retrying
- Run the upgrade again — ideally on a staging server first
If you don't have a pre-upgrade backup, the recovery process becomes significantly more complex. This is a situation where professional assistance is strongly recommended.
Cause 9: .htaccess or Nginx Configuration Error
OJS uses .htaccess rules (on Apache) or specific Nginx configuration blocks to handle URL rewriting for clean URLs. If these rules are broken, missing, or conflicting, OJS can produce 500 errors — particularly on specific pages or URLs while others load fine.
How to identify this cause: The 500 error only appears on certain pages (e.g., article landing pages, submission steps) while the journal homepage loads normally. Your error log may reference mod_rewrite or Rewrite rules.
For Apache — verify mod_rewrite is enabled:
sudo a2enmod rewrite
sudo systemctl restart apache2Verify your OJS .htaccess file exists in the OJS root directory and contains the standard OJS rewrite rules. If it's missing, copy it from the OJS installation package.
Verify your Apache VirtualHost has AllowOverride All:
AllowOverride All
Require all granted
For Nginx — verify your OJS location block:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}Quick Diagnostic Checklist
If you're not sure where to start, work through this checklist in order:
- Check OJS error log at /cache/logs/errors.log
- Check server PHP error log
- Verify PHP version matches your OJS version requirements
- Verify all required PHP extensions are installed and enabled
- Check PHP memory limit (must be at least 256M)
- Check file and directory permissions (755/644)
- Disable recently installed or updated plugins
- Verify database credentials in config.inc.php
- Check that MySQL/PostgreSQL service is running
- Verify .htaccess file exists and mod_rewrite is enabled
- Check for recent OJS upgrade that may have been interrupted
When to Call in a Professional
Most OJS 500 errors can be resolved by following the steps above — if you have server access, basic command-line familiarity, and time to work through the diagnosis systematically.
But there are situations where professional help is the faster, safer choice:
- Your journal is down and authors or reviewers are waiting — every hour costs you submissions
- You don't have SSH or server-level access to check error logs
- The error appeared after a failed OJS upgrade with no backup in place
- You've worked through this checklist and the error persists
- The error log references database corruption or missing tables
In these situations, attempting further fixes without expert guidance risks making the problem worse — particularly if database integrity is already compromised.
OJS Guru resolves OJS 500 errors as a priority service. Send us your journal URL and a brief description of when the error started, and we'll diagnose and fix it — typically within one business day.
Preventing OJS 500 Errors Before They Happen
The best 500 error is the one that never occurs. Here's how to significantly reduce your risk:
Always back up before upgrades. Take a complete backup of your OJS database and files directory before running any OJS upgrade, plugin update, or PHP version change. If something goes wrong, you have a clean restore point.
Test updates on a staging environment first. Before applying any change to your live journal, test it on a copy of your installation on a staging server. This is standard practice for production OJS installations serving active submissions.
Keep PHP within the supported range for your OJS version. Don't let your hosting provider upgrade your PHP version automatically without verifying compatibility with your current OJS version first.
Monitor your journal regularly. A simple uptime monitoring service (many are free) will alert you the moment your journal returns a 500 error — before your editorial team or authors notice.
Keep plugins updated — carefully. Outdated plugins are security risks. But every plugin update should be tested before deployment. Disable rather than delete plugins you're not using.
Summary
The OJS 500 Internal Server Error is frightening — but it is always caused by something specific and fixable. The key is finding your error log, reading the actual error message, and matching it to the right cause and fix.
The nine causes covered in this guide account for the vast majority of OJS 500 errors seen in production:
- PHP version incompatibility
- Missing PHP extensions
- PHP memory limit too low
- File and directory permission errors
- Plugin conflict or corrupt plugin
- Database connection failure
- Corrupt or misconfigured config.inc.php
- Failed OJS upgrade
- .htaccess or Nginx configuration error
Work through the diagnostic checklist above, check your error logs, and apply the relevant fix. In most cases, your journal will be back online within the hour.
If you'd rather have an OJS specialist handle it — especially if your journal is down and you need it back up fast — contact OJS Guru at ojsguru.com. We've fixed this exact problem hundreds of times and we can fix it for you too.
OJS Guru is a professional Open Journal Systems service provider specializing in OJS installation, customization, migration, and technical support for research journal publishers in 20+ countries. Visit ojsguru.com to request a free consultation.
