Troubleshooting OJS Upgrade: HTTP 500 Error on Subdomain (Version OJS-3.4.0.5)

Hello @everyone;

After successfully upgrading the OJS to the new version on my localhost using the XAMPP server, it worked properly in my local browser. I then transferred the new version to my subdomain website to test the upgrade’s success.

However, I encountered an HTTP error 500 with the message “the page isn’t working.”

Here is the PHP error log:

[28-Feb-2024 03:31:15 UTC] PHP Fatal error:  Uncaught Error: Class "Locale" not found in /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php:148
Stack trace:
#0 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php(130): PKP\i18n\Locale->setLocale('en')
#1 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php(419): PKP\i18n\Locale->getLocale()
#2 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php(105): PKP\i18n\Locale->translate('plugins.themes....', NULL, Array, NULL)
#3 /home/MyServer2024/public_html/mybeta/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(938): PKP\i18n\Locale->get('plugins.themes....', Array, NULL)
#4 /home/MyServer2024/public_html/mybeta/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(973): trans('plugins.themes....', Array, NULL)
#5 /home/MyServer2024/public_html/mybeta/plugins/themes/default/DefaultThemePlugin.php(45): __('plugins.themes....')
#6 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/ThemePlugin.php(743): APP\plugins\themes\default\DefaultThemePlugin->init()
#7 /home/MyServer2024/public_html/mybeta/plugins/themes/defaultManuscript/DefaultManuscriptChildThemePlugin.php(29): PKP\plugins\ThemePlugin->setParent(Object(APP\plugins\themes\default\DefaultThemePlugin))
#8 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/ThemePlugin.php(130): APP\plugins\themes\defaultManuscript\DefaultManuscriptChildThemePlugin->init()
#9 [internal function]: PKP\plugins\ThemePlugin->themeRegistered('PluginRegistry:...', Array)
#10 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array(Array, Array)
#11 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run('PluginRegistry:...', Array)
#12 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/PluginRegistry.php(128): PKP\plugins\Hook::call('PluginRegistry:...', Array)
#13 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/template/PKPTemplateManager.php(1435): PKP\plugins\PluginRegistry::loadCategory('themes', true)
#14 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/Plugin.php(403): PKP\template\PKPTemplateManager::getManager(Object(APP\core\Request))
#15 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/Plugin.php(137): PKP\plugins\Plugin->_registerTemplateResource()
#16 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/LazyLoadPlugin.php(34): PKP\plugins\Plugin->register('generic', 'plugins/generic...', NULL)
#17 /home/MyServer2024/public_html/mybeta/plugins/generic/recommendBySimilarity/RecommendBySimilarityPlugin.php(39): PKP\plugins\LazyLoadPlugin->register('generic', 'plugins/generic...', NULL)
#18 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/PluginRegistry.php(76): APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin->register('generic', 'plugins/generic...', NULL)
#19 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/PluginRegistry.php(121): PKP\plugins\PluginRegistry::register('generic', Object(APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin), 'plugins/generic...', NULL)
#20 [internal function]: PKP\plugins\PluginRegistry::PKP\plugins\{closure}(Object(APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin), 'plugins/generic...')
#21 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/PluginRegistry.php(121): array_walk_recursive(Array, Object(Closure))
#22 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/core/Dispatcher.php(155): PKP\plugins\PluginRegistry::loadCategory('generic', true)
#23 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#24 /home/MyServer2024/public_html/mybeta/index.php(21): PKP\core\PKPApplication->execute()
#25 {main}
  thrown in /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php on line 148
[28-Feb-2024 03:31:17 UTC] PHP Fatal error:  Uncaught Error: Class "Locale" not found in /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php:148
Stack trace:
#0 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php(130): PKP\i18n\Locale->setLocale('en')
#1 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php(419): PKP\i18n\Locale->getLocale()
#2 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php(105): PKP\i18n\Locale->translate('plugins.themes....', NULL, Array, NULL)
#3 /home/MyServer2024/public_html/mybeta/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(938): PKP\i18n\Locale->get('plugins.themes....', Array, NULL)
#4 /home/MyServer2024/public_html/mybeta/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(973): trans('plugins.themes....', Array, NULL)
#5 /home/MyServer2024/public_html/mybeta/plugins/themes/default/DefaultThemePlugin.php(45): __('plugins.themes....')
#6 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/ThemePlugin.php(743): APP\plugins\themes\default\DefaultThemePlugin->init()
#7 /home/MyServer2024/public_html/mybeta/plugins/themes/defaultManuscript/DefaultManuscriptChildThemePlugin.php(29): PKP\plugins\ThemePlugin->setParent(Object(APP\plugins\themes\default\DefaultThemePlugin))
#8 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/ThemePlugin.php(130): APP\plugins\themes\defaultManuscript\DefaultManuscriptChildThemePlugin->init()
#9 [internal function]: PKP\plugins\ThemePlugin->themeRegistered('PluginRegistry:...', Array)
#10 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/Hook.php(139): call_user_func_array(Array, Array)
#11 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/Hook.php(113): PKP\plugins\Hook::run('PluginRegistry:...', Array)
#12 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/PluginRegistry.php(128): PKP\plugins\Hook::call('PluginRegistry:...', Array)
#13 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/template/PKPTemplateManager.php(1435): PKP\plugins\PluginRegistry::loadCategory('themes', true)
#14 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/Plugin.php(403): PKP\template\PKPTemplateManager::getManager(Object(APP\core\Request))
#15 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/Plugin.php(137): PKP\plugins\Plugin->_registerTemplateResource()
#16 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/LazyLoadPlugin.php(34): PKP\plugins\Plugin->register('generic', 'plugins/generic...', NULL)
#17 /home/MyServer2024/public_html/mybeta/plugins/generic/recommendBySimilarity/RecommendBySimilarityPlugin.php(39): PKP\plugins\LazyLoadPlugin->register('generic', 'plugins/generic...', NULL)
#18 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/PluginRegistry.php(76): APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin->register('generic', 'plugins/generic...', NULL)
#19 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/PluginRegistry.php(121): PKP\plugins\PluginRegistry::register('generic', Object(APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin), 'plugins/generic...', NULL)
#20 [internal function]: PKP\plugins\PluginRegistry::PKP\plugins\{closure}(Object(APP\plugins\generic\recommendBySimilarity\RecommendBySimilarityPlugin), 'plugins/generic...')
#21 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/plugins/PluginRegistry.php(121): array_walk_recursive(Array, Object(Closure))
#22 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/core/Dispatcher.php(155): PKP\plugins\PluginRegistry::loadCategory('generic', true)
#23 /home/MyServer2024/public_html/mybeta/lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch(Object(APP\core\Request))
#24 /home/MyServer2024/public_html/mybeta/index.php(21): PKP\core\PKPApplication->execute()
#25 {main}
  thrown in /home/MyServer2024/public_html/mybeta/lib/pkp/classes/i18n/Locale.php on line 148

What application are you using?
For example, OJS 3.4.0-5

Additional information
Please add any screenshots, logs or other information we can use to investigate this problem.

Localhost:

Live:(Subdomain)

Best Regards;
Darryl

I have exactly the same error but on the main domain.
Is it possible that php-intl is needed?
That missing this library is causing the problem?
On another server I could update without any problem, there it is installed…

Hello @loadbrain;

I have exactly the same error but on the main domain.
Is it possible that php-intl is needed?

I am using an older version of OJS that is compatible with PHP 7.4 and I tested an OJS-3.4.0.3 installation (using PHP Version 8.0.X) on a subdomain, and it worked correctly. I recently upgraded to the latest version of OJS and am now using PHP 8.0. Unfortunately, the page is no longer working.

Is it possible that php-intl is needed?

I installed the extension to my WHM/cPanel version of Apache 8.0, but the error persists.

for Version OJS-3.4.0.3 I have no Issue.
for Version OJS-3.4.0.5 - This page isn’t working (HTTP Error 505) domain is currently unable to handle this request.

Can anyone experience on this?

Best Regards;
Darryl

php-intl was installed, upgrade worked, BUT: but same error, got 500…
I have:

PHP Fatal error:  Uncaught Error: Class "Locale" not found in /var/www/xxx/lib/pkp/classes/i18n/Locale.php:148\

Code is this:

 \Locale::setDefault(\Locale::lookup(ResourceBundle::getLocales(''), $locale, true));

When I uncomment it, it works…

#     \Locale::setDefault(\Locale::lookup(ResourceBundle::getLocales(''), $locale, true));

I have no idea…

Solved.
php-intl was installed but not active…
After restarting webserver, it works now…

@loadbrain ;

Congratulations, I do the same but the error still the same.

I got it. Thanks to you @loadbrain for the tips.

I go to google.com and search the procedure how to install this php intl

https://support.cpanel.net/hc/en-us/articles/360050971633-How-to-install-a-PHP-extension-in-WHM

Procedure

  1. Log into WHM as the ‘root’ user.
  2. Navigate to “Home » Software » EasyApache 4”
  3. Click the “Customize” button under “Currently Installed Packages.”
  4. Click “PHP Extensions.”
  5. Use the search bar to search for the extension you need to install. Example: zip, soap or intl
  6. Mark the extension for installation by clicking the switch icon to the far right of the extension.
  7. This needs to be done for each version of PHP for which you need the PHP Extension.
  8. Click “Review” and review the output to ensure the PHP extension you marked for installation will be installed.
  9. Click the “Provision” button to install the selected PHP extensions.
  10. restart the EasyApache4 (Done)

Great

Best Regards,
Darryl

1 Like