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.

SponsoredNeed OJS hosting that scales?

Managed OJS hosting with backups, SSL, and priority support for scholarly publishers.

See pricing plans →

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 VersionMinimum PHPMaximum PHPRecommended
OJS 3.4.xPHP 8.0PHP 8.2PHP 8.1 or 8.2
OJS 3.3.xPHP 7.3PHP 8.1PHP 8.0 or 8.1
OJS 3.2.xPHP 7.2PHP 7.4PHP 7.4
OJS 3.1.xPHP 7.0PHP 7.3PHP 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 -v

Or on shared hosting through cPanel, go to SoftwareSelect 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:

ExtensionPurposeInstall Command
php-mysql or php-pgsqlDatabase connectionapt install php8.1-mysql
php-mbstringMulti-byte character encodingapt install php8.1-mbstring
php-xmlXML processingapt install php8.1-xml
php-curlHTTP requestsapt install php8.1-curl
php-intlInternationalizationapt install php8.1-intl
php-zipZIP file compressionapt install php8.1-zip

These extensions are strongly recommended:

ExtensionPurpose
php-gdImage manipulation (thumbnails, graphics)
php-jsonJSON processing (data interchange)
php-opcachePHP code caching (performance)

How to check if extensions are installed:

# Check a specific extension
php -m | grep mbstring

# List all installed extensions
php -m

On cPanel hosting:

Go to SoftwareSelect PHP VersionPHP 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 apache2

If any of the required extensions are missing, OJS installation will fail with errors like:

Call to undefined function mb_strlen()
Class 'DOMDocument' not found

These 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 = 256M

OJS 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 = 55M

upload_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 = 300

OJS 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 = 300

For 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.log

In 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-8

How 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.php

On shared hosting (cPanel):

  1. Go to Software → Select PHP Version
  2. Click Switch to PHP Options
  3. 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.ini

Find 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 = 300

Save and restart Apache:

sudo systemctl restart apache2

Common 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 limit

This is contradictory. post_max_size must always be larger. Fix:

; CORRECT
upload_max_filesize = 50M
post_max_size = 55M

Mistake 2: Memory limit is too low

; WRONG
memory_limit = 64M

OJS database operations exceed 64MB. Increase to at least 256M.

Mistake 3: max_execution_time is too short

; WRONG
max_execution_time = 30

OJS 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 -m

If 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:

  1. Go to cPanel Software → Select PHP Version
  2. Confirm your PHP version is 7.3+
  3. Click PHP Options
  4. Update memory_limit, upload_max_filesize, max_execution_time
  5. 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 apache2

Docker 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 higher

Required Extensions Check:

php -m | grep -E "mysql|mbstring|xml|curl|intl|zip"
# Should list all required extensions

PHP Settings Check: Create a test file:

cat > /tmp/test-ojs.php 
EOF
php /tmp/test-ojs.php

All items should show PASS before you attempt OJS installation.

"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_log

Test 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.