The 500 error in registration page

Hello,

When i open the registration page, it shows 500 error. The log is shown as below. How can i fix that?

Regards,

[07-Mar-2020 11:43:57 Asia/Shanghai] PHP Fatal error: Uncaught Error: Call to undefined function bindtextdomain() in /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php:87 Stack trace: #0 /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php(46): Sokil\IsoCodes\AbstractDatabase->bindGettextDomain() #1 /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/lib/vendor/sokil/php-isocodes/src/IsoCodesFactory.php(65): Sokil\IsoCodes\AbstractDatabase->__construct(NULL) #2 /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/classes/user/form/RegistrationForm.inc.php(103): Sokil\IsoCodes\IsoCodesFactory->getCountries() #3 /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/classes/form/Form.inc.php(151): RegistrationForm->fetch(Object(Request), NULL, true) #4 /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/pages/user/RegistrationHandler.inc.php(58): Form->display(Object(Request)) #5 /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/classes/core/PKPRouter.inc.php(391): RegistrationHandler->register(Array, Object(Request)) #6 /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/classes/core/PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false) #7 /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/classes/core/Dispatcher.inc.php(143): PKPPageRouter->route(Object(Request)) #8 /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/classes/core/PKPApplication.inc.php(278): Dispatcher->dispatch(Object(Request)) #9 /home/wwwroot/lamp7.2/domain/sun.com/web/index.php(68): PKPApplication->execute() #10 {main} thrown in /home/wwwroot/lamp7.2/domain/sun.com/web/lib/pkp/lib/vendor/sokil/php-isocodes/src/AbstractDatabase.php on line 87

Hi @littlemeizhi,

It looks like your PHP installation doesn’t include gettext support; see e.g.: https://stackoverflow.com/questions/43341209/docker-php5-6-call-to-undefined-function-bindtextdomain

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

the problem has been solved. many thanks!

Hey @littlemeizhi,

How did you solve the issue. I have the same issue but did not resolve it.

Hello,

install gettext in your php server

Hello @littlemeizhi,

I have installed gettext in php server but still the issue retains.

Hi @pjhssr,

I would suggest double-checking your PHP configuration using a phpinfo script. Create a script called phpinfo.php somewhere in your web root with the following contents:

<?php phpinfo();

Then point your web browser to it and you should see a lot of configuration information about your PHP environment. You should see this in the page:


Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I tried the same. Please have a look of the attached screenshot this is what phpinfo.php file shows.

Regards
PJHSSR

Hi @pjhssr,

That’s not the same thing; make sure you have the gettext module enabled in your PHP configuration file, and don’t forget that it may be necessary to restart your Apache process for the change to take effect.

Regards,
Alec Smecher
Public Knowledge Project Team

i try to install gettext but theres also error
PHP Warning: Module ‘imagick’ already loaded in Unknown on line 0
WARNING: “pear/Console_Getopt” is deprecated in favor of “pear/Console_GetoptPlus”
pear/PEAR dependency package “pear/Archive_Tar” installed version 1.4.9 is not the recommended version 1.4.4, but may be compatible, use --force to install
pear/File_Gettext requires package “pear/PEAR”
No valid packages found
install failed

Hi @Fauji_Nurdin,

It looks like you’re trying to install the gettext extension using Pear. I’m not sure that’s the best way to do it – I’ve always just enabled the gettext module in my php.ini using a preexisting module that comes with PHP. However, the details will depend on your server. You might try a resource like Stackoverflow, since it’s more of a server administration question than an OJS question.

Regards,
Alec Smecher
Public Knowledge Project Team

its already solved , thank you