Your Hosting Provider Says PHP 7.4 Is Installed. OJS Still Won't Install.
You check your hosting control panel. PHP version shows 7.4. That should work with OJS, right? You start the OJS installation wizard and hit an error. The error message references a missing PHP extension, or a memory limit that is too low, or a configuration setting you have never heard of.
The frustration sets in. The hosting provider says "PHP 7.4 is installed." OJS says "installation failed." Who is right?
Both are. Your server has PHP 7.4 installed, but it is missing a required extension, or a critical PHP setting is misconfigured. PHP version is only part of the equation. OJS requires not just a specific PHP version but also specific extensions and specific PHP configuration settings that must all be correct together.
Most installation failures happen before the installation wizard even loads, because your server's PHP environment does not meet OJS's requirements. Knowing these requirements before you install can save hours of troubleshooting.
This guide covers every PHP requirement for OJS 3.x, how to verify your current settings, and exactly what to do if something is missing, written by OJS specialists who have solved PHP configuration problems across hundreds of installations.
If you want an expert to verify your server meets all OJS requirements before you attempt installation, visit ojsguru.com for a free consultation.
PHP Version Requirements by OJS Release
Different OJS versions require different PHP versions. You must match both your OJS version and your PHP version.
| OJS Version | Minimum PHP | Maximum PHP | Recommended |
|---|---|---|---|
| OJS 3.4.x | PHP 8.0 | PHP 8.2 | PHP 8.1 or 8.2 |
| OJS 3.3.x | PHP 7.3 | PHP 8.1 | PHP 8.0 or 8.1 |
| OJS 3.2.x | PHP 7.2 | PHP 7.4 | PHP 7.4 |
| OJS 3.1.x | PHP 7.0 | PHP 7.3 | PHP 7.3 |
Important: Running OJS on a PHP version outside the supported range will produce fatal errors that prevent installation and cause white screens on every page.
Check your current PHP version:
php -vOr on shared hosting through cPanel, go to Software → Select PHP Version.
If your PHP version is incompatible:
Contact your hosting provider to upgrade PHP. Do not attempt to install OJS on an unsupported version, it will fail.
Required PHP Extensions
Beyond the PHP version, OJS requires specific PHP extensions to be installed and enabled. These are optional components of PHP that add specific functionality.
OJS cannot run without these extensions:
| Extension | Purpose | Install Command |
|---|---|---|
| php-mysql or php-pgsql | Database connection | apt install php8.1-mysql |
| php-mbstring | Multi-byte character encoding | apt install php8.1-mbstring |
| php-xml | XML processing | apt install php8.1-xml |
| php-curl | HTTP requests | apt install php8.1-curl |
| php-intl | Internationalization | apt install php8.1-intl |
| php-zip | ZIP file compression | apt install php8.1-zip |
These extensions are strongly recommended:
| Extension | Purpose |
|---|---|
| php-gd | Image manipulation (thumbnails, graphics) |
| php-json | JSON processing (data interchange) |
| php-opcache | PHP code caching (performance) |
How to check if extensions are installed:
# Check a specific extension
php -m | grep mbstring
# List all installed extensions
php -mOn cPanel hosting:
Go to Software → Select PHP Version → PHP Options and scroll down. Look for checkboxes next to each extension. Enable all required extensions for OJS.
On Ubuntu VPS:
Install missing extensions:
sudo apt install php8.1-gd php8.1-json php8.1-opcache -y
sudo systemctl restart apache2If any of the required extensions are missing, OJS installation will fail with errors like:
Call to undefined function mb_strlen()
Class 'DOMDocument' not foundThese errors tell you which extension is missing.
Critical PHP Configuration Settings
PHP has dozens of configuration options. These are the ones that directly affect OJS functionality.
Memory Limit
Controls how much RAM a single PHP script can use.
memory_limit = 256MOJS needs at least 128MB, but 256MB is recommended for production journals. If memory limit is too low, OJS database migrations fail and file uploads are rejected.
Upload File Size Limits
Controls the maximum size of files that can be uploaded through the web.
upload_max_filesize = 50M
post_max_size = 55Mupload_max_filesize must be at least 50MB for academic manuscripts. post_max_size must be larger than upload_max_filesize.
If these are set to 2MB (the default), any manuscript over 2MB will fail to upload.
Execution Time
Controls how long a PHP script can run before timing out.
max_execution_time = 300OJS database operations and plugin uploads can take 5 minutes or more. If max_execution_time is 30 seconds, the upgrade script will timeout and fail.
Input Processing Time
Controls how long PHP waits to receive uploaded file data.
max_input_time = 300For large file uploads, the server needs time to receive all the data. If this is too low, uploads fail with timeout errors.
Display Errors
Controls whether PHP errors are displayed to users.
display_errors = Off
log_errors = On
error_log = /var/log/php_errors.logIn production, errors should NOT be displayed (security risk) but should be logged. Never leave display_errors = On on a live journal.
Summary of Required PHP Settings:
memory_limit = 256M
upload_max_filesize = 50M
post_max_size = 55M
max_execution_time = 300
max_input_time = 300
display_errors = Off
log_errors = On
default_charset = utf-8How to Check and Update PHP Settings
Check current settings:
php -i | grep "memory_limit\|upload_max\|max_execution"Or create a PHP info file:
echo "" > /tmp/info.php
php /tmp/info.phpOn shared hosting (cPanel):
- Go to Software → Select PHP Version
- Click Switch to PHP Options
- Find each setting and update as needed:
- memory_limit = 256
- upload_max_filesize = 50
- post_max_size = 55
- max_execution_time = 300
- max_input_time = 300
On VPS (Ubuntu):
Edit the PHP configuration file:
sudo nano /etc/php/8.1/apache2/php.iniFind each setting using Ctrl+W and update:
memory_limit = 256M
upload_max_filesize = 50M
post_max_size = 55M
max_execution_time = 300
max_input_time = 300Save and restart Apache:
sudo systemctl restart apache2Common PHP Configuration Mistakes
Mistake 1: post_max_size is smaller than upload_max_filesize
; WRONG
upload_max_filesize = 50M
post_max_size = 8M ; smaller than upload limitThis is contradictory. post_max_size must always be larger. Fix:
; CORRECT
upload_max_filesize = 50M
post_max_size = 55MMistake 2: Memory limit is too low
; WRONG
memory_limit = 64MOJS database operations exceed 64MB. Increase to at least 256M.
Mistake 3: max_execution_time is too short
; WRONG
max_execution_time = 30OJS upgrades and large imports need 5+ minutes. Set to 300 seconds minimum.
Mistake 4: Extensions enabled in CLI but not in Apache
PHP has separate configurations for command line (CLI) and web server (Apache). An extension might be enabled for CLI but not for Apache.
Check both:
# Check Apache PHP modules
php -r "phpinfo();" | grep -i "Loaded Modules"
# Check CLI PHP modules
php -mIf they differ, enable the extension in the Apache configuration file.
PHP Configuration for Different Hosting Environments
Shared Hosting (cPanel)
Use cPanel's built-in PHP Options. Most settings are easily changeable through the web interface.
Typical workflow:
- Go to cPanel Software → Select PHP Version
- Confirm your PHP version is 7.3+
- Click PHP Options
- Update memory_limit, upload_max_filesize, max_execution_time
- Save and test
VPS (Ubuntu/Debian)
Edit /etc/php/[version]/apache2/php.ini directly. Requires SSH access.
After editing, always restart Apache:
sudo systemctl restart apache2Docker Container
PHP settings are typically set via environment variables or a custom php.ini included in the container.
Refer to your container's documentation for how to configure PHP.
Managed WordPress/OJS Hosting
Contact your hosting provider. They may have pre-configured PHP settings that cannot be changed directly.
Verifying All Requirements Are Met
Before installing OJS, create a checklist:
PHP Version Check:
php -v
# Output should show PHP 7.3 or higherRequired Extensions Check:
php -m | grep -E "mysql|mbstring|xml|curl|intl|zip"
# Should list all required extensionsPHP Settings Check: Create a test file:
cat > /tmp/test-ojs.php
EOF
php /tmp/test-ojs.phpAll items should show PASS before you attempt OJS installation.
Common PHP-Related Installation Errors and What They Mean
"Call to undefined function mb_strlen()" → php-mbstring extension is not installed
"Class 'DOMDocument' not found" → php-xml extension is not installed
"Call to undefined function curl_init()" → php-curl extension is not installed
"Allowed memory size exhausted" → memory_limit is too low (increase to 256M)
"Maximum execution time exceeded" → max_execution_time is too short (increase to 300)
"POST Content-Length exceeds the limit" → post_max_size is too low (increase to 55M or higher)
"Uploaded file exceeds the upload_max_filesize" → upload_max_filesize is too low (increase to 50M or higher)
Each error points directly to the PHP setting or extension that needs to be fixed.
Post-Installation PHP Configuration
After OJS is installed, monitor your PHP configuration:
Check logs for PHP errors:
# Ubuntu
sudo tail -50 /var/log/php_errors.log
# cPanel
tail /home/youraccount/public_html/error_logTest PHP functionality:
Go to OJS Administration → System Information → Email and send a test email. This tests multiple PHP functions at once.
Monitor resource usage:
For production journals, monitor PHP memory usage:
# Ubuntu
ps aux | grep apache2 | awk '{sum+=$6} END {print "Total memory:", sum/1024 "MB"}'If memory usage approaches your limit, increase memory_limit or reduce the number of concurrent processes.
When to Call in a Professional
PHP configuration is straightforward once you know what to look for, but some situations benefit from professional help:
- You don't have access to your PHP configuration files or control panel
- Your hosting provider won't enable required extensions
- You need help diagnosing a specific PHP error
- You want an expert to verify your server is optimally configured before installation
- You are migrating from one server to another and want to replicate the exact PHP configuration
OJS Guru verifies PHP requirements and configures optimal PHP settings for OJS, ensuring your server meets every requirement before installation.
👉 Get a free consultation at ojsguru.com
Summary
OJS requires specific PHP versions, extensions, and configuration settings working together. The requirements covered in this guide are:
PHP Version: 7.3 minimum (8.0+ recommended)
Required Extensions: mysql, mbstring, xml, curl, intl, zip
Critical Settings:
- memory_limit = 256M
- upload_max_filesize = 50M
- post_max_size = 55M
- max_execution_time = 300
- max_input_time = 300
Verify all of these before installing OJS. A single missing extension or misconfigured setting will cause installation to fail.
If you want an expert to verify your PHP configuration meets all OJS requirements, contact OJS Guru at ojsguru.com. We check every requirement and fix any gaps before you attempt installation.
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.
