0

I am receiving a 500 internal error in Prestashop whenever it comes to using the inbuilt PHP mail() method. After enabling debug mode, I found that the cause is this:

(1/1) UndefinedFunctionException

Attempted to call function "idn_to_ascii" from the global namespace.

in Mail.php line 893

I googled this issue as it is most probably common and was hit with a GitHub issue https://github.com/PrestaShop/PrestaShop/issues/10640 which states that the php-intl extension is needed.

I SSH'd into my VPS and ran sudo apt install php7.3-intl since the PHP version I use is 7.3. This worked fine and installed the extension. However, after restarting the Apache2 service like so: sudo systemctl restart apache2.service. I am still hit with the same error message.

I have tried editing my /etc/php/7.3/apache2/php.ini fine to include the extension=intl on the autoloading but this did not fix my issue either.

Any information or help appreciated in advance.

Community
  • 1
  • 1
Jaquarh
  • 6,493
  • 7
  • 34
  • 86

1 Answers1

0

After following some advice on another forum, I created a blank file and outputted the phpinfo() to see which PHP ini was default loading since my Server has PHP5 on it.

This told me that the php5 ini was being used.

To change this to my PHP7.3, I did this:

sudo a2dismod php5
sudo a2enmod php7.3

This fixed my issues.

Jaquarh
  • 6,493
  • 7
  • 34
  • 86