Jump to content
Carlos

Internal Server error on Checkout prestashop 1.7.4.2

Recommended Posts

Internal Server error on Checkout prestashop 1.7.4.2

after choose wire payment and confirm the final step order the error happen.

the link related to error /module/ps_wirepayment/validation

i Try to reach the hosting and they say its application file error(check the file attached)
 

the line 872 related on the mail.php file says:

    public static function toPunycode($to)
    {
        $address = explode('@', $to);
        if (empty($address[0]) || empty($address[1])) {
            return $to;
        }

        return $address[0].'@'.idn_to_ascii($address[1]);   // this is the line
    }
 

 

 

enable debug mode: on front store, this is what shows when i try to finish the order.

(1/1) UndefinedFunctionException

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

in Mail.php line 872
at MailCore::toPunycode('encomendas@fcquatro.com')in Mail.php line 317
at MailCore::send(3, 'productoutofstock', 'Product out of stock', array('{qty}' => 0, '{last_qty}' => 3, '{product}' => 'David Beckham Classic EDT 60ml'), 'encomendas@fcquatro.com', '', 'encomendas@fcquatro.com', 'fcquatro', null, null, '/hermes/bosnaweb03a/b2758/ipg.ticlicks/sitefc4/fc4/modules/mailalerts/mails/', false, 1)in mailalerts.php line 550
at MailAlerts->hookActionUpdateQuantity(array('id_product' => 30, 'id_product_attribute' => '0', 'quantity' => 0, 'cookie' => object(Cookie), 'cart' =>object(Cart), 'altern' => 1))in Hook.php line 924
at HookCore::coreCallHook(object(MailAlerts), 'hookactionUpdateQuantity', array('id_product' => 30, 'id_product_attribute' => '0', 'quantity' => 0, 'cookie' =>object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 328
at HookCore::callHookOn(object(MailAlerts), 'actionUpdateQuantity', array('id_product' => 30, 'id_product_attribute' => '0', 'quantity' => 0, 'cookie' =>object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 860
at HookCore::exec('actionUpdateQuantity', array('id_product' => 30, 'id_product_attribute' => '0', 'quantity' => 0, 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1), null, false, true, false, null)in HookManager.php line 73
at HookManager->exec('actionUpdateQuantity', array('id_product' => 30, 'id_product_attribute' => '0', 'quantity' => 0))in StockManager.php line 192
at StockManager->updateQuantity(object(Product), '0', -1, null, false, array())in StockAvailable.php line 479
at StockAvailableCore::updateQuantity('30', '0', -1)in OrderDetail.php line 482
at OrderDetailCore->checkProductStock(array('id_product_attribute' => '0', 'id_product' => '30', 'cart_quantity' => '1', 'id_shop' => '1', 'id_customization' => null, 'name' => 'David Beckham Classic EDT 60ml', 'is_virtual' => '0', 'description_short' => '', 'available_now' => '', 'available_later' => '', 'id_category_default' => '4', 'id_supplier' => '0', 'id_manufacturer' => '0', 'manufacturer_name' => null, 'on_sale' => '0', 'ecotax' => '0.000000', 'additional_shipping_cost' => '0.00', 'available_for_order' => '1', 'show_price' => '1', 'price' => 17500.0, 'active' => '1', 'unity' => '', 'unit_price_ratio' => '0.000000', 'quantity_available' => '1', 'width' => '0.000000', 'height' => '0.000000', 'depth' => '0.000000', 'out_of_stock' => '2', 'weight' => 0.0, 'available_date' => '0000-00-00', 'date_add' => '2018-08-27 19:59:08', 'date_upd' => '2018-09-11 13:08:41', 'quantity' => 1, 'link_rewrite' => 'david-beckham-classic-edt-60ml', 'category' => 'homem', 'unique_id' => '0000000030000000000090', 'id_address_delivery' => '9', 'advanced_stock_management' => '0', 'supplier_reference' => null, 'customization_quantity' => null, 'price_attribute' => null, 'ecotax_attr' => null, 'reference' => '', 'weight_attribute' => null, 'ean13' => '', 'isbn' => '', 'upc' => '', 'minimal_quantity' => '1', 'wholesale_price' => '0.000000', 'id_image' => '30-30', 'legend' => '', 'reduction_type' => 0, 'is_gift' => false, 'reduction' => 0.0, 'price_without_reduction' => 17500.0, 'specific_prices' => array(), 'stock_quantity' => 1, 'price_with_reduction' => 17500.0, 'price_with_reduction_without_tax' => 17500.0, 'total' => 17500.0, 'total_wt' => 17500.0, 'price_wt' => 17500.0, 'reduction_applies' => false, 'quantity_discount_applies' => false, 'allow_oosp' => 0, 'features' => array(), 'rate' => 0.0, 'tax_name' => '', 'warehouse_list' => array(0), 'in_stock' => true, 'carrier_list' => array('6')), '10')in OrderDetail.php line 676
at OrderDetailCore->create(object(Order), object(Cart), array('id_product_attribute' => '0', 'id_product' => '30', 'cart_quantity' => '1', 'id_shop' => '1', 'id_customization' => null, 'name' => 'David Beckham Classic EDT 60ml', 'is_virtual' => '0', 'description_short' => '', 'available_now' => '', 'available_later' => '', 'id_category_default' => '4', 'id_supplier' => '0', 'id_manufacturer' => '0', 'manufacturer_name' => null, 'on_sale' => '0', 'ecotax' => '0.000000', 'additional_shipping_cost' => '0.00', 'available_for_order' => '1', 'show_price' => '1', 'price' => 17500.0, 'active' => '1', 'unity' => '', 'unit_price_ratio' => '0.000000', 'quantity_available' => '1', 'width' => '0.000000', 'height' => '0.000000', 'depth' => '0.000000', 'out_of_stock' => '2', 'weight' => 0.0, 'available_date' => '0000-00-00', 'date_add' => '2018-08-27 19:59:08', 'date_upd' => '2018-09-11 13:08:41', 'quantity' => 1, 'link_rewrite' => 'david-beckham-classic-edt-60ml', 'category' => 'homem', 'unique_id' => '0000000030000000000090', 'id_address_delivery' => '9', 'advanced_stock_management' => '0', 'supplier_reference' => null, 'customization_quantity' => null, 'price_attribute' => null, 'ecotax_attr' => null, 'reference' => '', 'weight_attribute' => null, 'ean13' => '', 'isbn' => '', 'upc' => '', 'minimal_quantity' => '1', 'wholesale_price' => '0.000000', 'id_image' => '30-30', 'legend' => '', 'reduction_type' => 0, 'is_gift' => false, 'reduction' => 0.0, 'price_without_reduction' => 17500.0, 'specific_prices' => array(), 'stock_quantity' => 1, 'price_with_reduction' => 17500.0, 'price_with_reduction_without_tax' => 17500.0, 'total' => 17500.0, 'total_wt' => 17500.0, 'price_wt' => 17500.0, 'reduction_applies' => false, 'quantity_discount_applies' => false, 'allow_oosp' => 0, 'features' => array(), 'rate' => 0.0, 'tax_name' => '', 'warehouse_list' => array(0), 'in_stock' => true, 'carrier_list' => array('6')), '10', 0, true, 0)in OrderDetail.php line 716
at OrderDetailCore->createList(object(Order), object(Cart), '10', array(array('id_product_attribute' => '0', 'id_product' => '30', 'cart_quantity' => '1', 'id_shop' => '1', 'id_customization' => null, 'name' => 'David Beckham Classic EDT 60ml', 'is_virtual' => '0', 'description_short' => '', 'available_now' => '', 'available_later' => '', 'id_category_default' => '4', 'id_supplier' => '0', 'id_manufacturer' => '0', 'manufacturer_name' => null, 'on_sale' => '0', 'ecotax' => '0.000000', 'additional_shipping_cost' => '0.00', 'available_for_order' => '1', 'show_price' => '1', 'price' => 17500.0, 'active' => '1', 'unity' => '', 'unit_price_ratio' => '0.000000', 'quantity_available' => '1', 'width' => '0.000000', 'height' => '0.000000', 'depth' => '0.000000', 'out_of_stock' => '2', 'weight' => 0.0, 'available_date' => '0000-00-00', 'date_add' => '2018-08-27 19:59:08', 'date_upd' => '2018-09-11 13:08:41', 'quantity' => 1, 'link_rewrite' => 'david-beckham-classic-edt-60ml', 'category' => 'homem', 'unique_id' => '0000000030000000000090', 'id_address_delivery' => '9', 'advanced_stock_management' => '0', 'supplier_reference' => null, 'customization_quantity' => null, 'price_attribute' => null, 'ecotax_attr' => null, 'reference' => '', 'weight_attribute' => null, 'ean13' => '', 'isbn' => '', 'upc' => '', 'minimal_quantity' => '1', 'wholesale_price' => '0.000000', 'id_image' => '30-30', 'legend' => '', 'reduction_type' => 0, 'is_gift' => false, 'reduction' => 0.0, 'price_without_reduction' => 17500.0, 'specific_prices' => array(), 'stock_quantity' => 1, 'price_with_reduction' => 17500.0, 'price_with_reduction_without_tax' => 17500.0, 'total' => 17500.0, 'total_wt' => 17500.0, 'price_wt' => 17500.0, 'reduction_applies' => false, 'quantity_discount_applies' => false, 'allow_oosp' => 0, 'features' => array(), 'rate' => 0.0, 'tax_name' => '', 'warehouse_list' => array(0), 'in_stock' => true, 'carrier_list' => array('6'))), 0, true, 0)in PaymentModule.php line 402
at PaymentModuleCore->validateOrder(28, '10', 17500.0, 'Pagamento por transferência bancária', null, array('{bankwire_owner}' => 'hjds dhsckbhj', '{bankwire_details}' => 'hkbfj', '{bankwire_address}' => 'sdffdfdf'), 2, false, '0c37bb58dc2e0ec5b0cec2e8e63c05d9')in validation.php line 64
at Ps_WirepaymentValidationModuleFrontController->postProcess()in Controller.php line 244
at ControllerCore->run()in Dispatcher.php line 428
at DispatcherCore->dispatch()in index.php line 28

 

i try a brand new 1.7.4.2 instalation and the same error happen!...
but on old 1.6 it does not happen

 

I need help...pleeeease

site.png

Share this post


Link to post
Share on other sites

I have the same problem in the same version of PrestaShop (1.7.4.2). I've found that the solution can be enabling the php-intl extension, but on my server is this extension activated.

The same issue occurs when I try resend email in the order detail or use another payment method (e.g. COD).

Edited by michalniks

Share this post


Link to post
Share on other sites
2 minutes ago, Carlos said:

Where can i find this: php-intl extension? where can i enable?

I don't know how enable it on your hosting (ask your hosting provider), but if you are using XAMPP on your local PC, you have to uncomment line with extension=php_intl.dll in xampp/php/php.ini.

Share this post


Link to post
Share on other sites

Hello! I got same problem. Error on payment and confirm the final step order and on try to resend email.  Can some one say me how to fix it? www.magicstyle-kands.de its my shop and sadly wont work correct.

Share this post


Link to post
Share on other sites

(1/1) UndefinedFunctionException

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

in Mail.php line 872
at MailCore::toPunycode('direxallegro@wp.pl')in Mail.php line 317
at MailCore::send(2, 'bankwire', 'Warten auf Zahlungseingang Überweisung', array('{lastname}' => 'Jasiu', '{firstname}' => 'Duży', '{id_order}' => 14, '{order_name}' => 'KCFWGOUKL', '{bankwire_owner}' => 'Sylwia Klencz , Karolina Pietrowski', '{bankwire_details}' => 'IBAN: DE73 7007 0024 0847 3092 05<br /> BIC: DEUTDEDBMUC', '{bankwire_address}' => 'Beethowenstraße 1, <br /> 82110 Germering', '{total_paid}' => '44,89 €'), 'direxallegro@wp.pl', '=?UTF-8?B?RHXFvHkgSmFzaXU=?=', 'kontakt@magicstyle-kands.de', 'K&S Magic Style', null, null, '/home/husariap2/public_html/magicstyle-kands.de/mails/', false, 1)in OrderHistory.php line 534
at OrderHistoryCore->sendEmail(object(Order), array('{bankwire_owner}' => 'Sylwia Klencz , Karolina Pietrowski', '{bankwire_details}' => 'IBAN: DE73 7007 0024 0847 3092 05<br /> BIC: DEUTDEDBMUC', '{bankwire_address}' => 'Beethowenstraße 1, <br /> 82110 Germering'))in OrderHistory.php line 456
at OrderHistoryCore->addWithemail(true, array('{bankwire_owner}' => 'Sylwia Klencz , Karolina Pietrowski', '{bankwire_details}' => 'IBAN: DE73 7007 0024 0847 3092 05<br /> BIC: DEUTDEDBMUC', '{bankwire_address}' => 'Beethowenstraße 1, <br /> 82110 Germering'))in PaymentModule.php line 738
at PaymentModuleCore->validateOrder(21, '10', 44.8900000000000005684341886080801486968994140625, 'Banküberweisung', null, array('{bankwire_owner}' => 'Sylwia Klencz , Karolina Pietrowski', '{bankwire_details}' => 'IBAN: DE73 7007 0024 0847 3092 05<br /> BIC: DEUTDEDBMUC', '{bankwire_address}' => 'Beethowenstraße 1, <br /> 82110 Germering'), 1, false, '9bfd2e1987f3d96d3fdde0e56a6a10c9')in validation.php line 64
at Ps_WirepaymentValidationModuleFrontController->postProcess()in Controller.php line 244
at ControllerCore->run()in Dispatcher.php line 428
at DispatcherCore->dispatch()in index.php line 28

 

I got this error, i just configure my SMTP email on prestashop and did TEST MAIL and its working fine... But when i try the final step order  or resend a email frome order come this error (up)

Share this post


Link to post
Share on other sites

У меня подобная проблемма ((

 

Предупреждение: использование неопределенная константа INTL_IDNA_VARIANT_UTS46 в том, что INTL_IDNA_VARIANT_UTS46 (это вызовет ошибки в будущих версиях PHP) в /var/www/u0585149/data/www/stayhe.com/classes/Mail.php на линии 878

предупреждение: idn_to_ascii() ожидает параметр 3 должен быть целым числом, строкой, указанной в /var/www/u0585149/data/www/stayhe.com/classes/Mail.php на линии 878

фатальная ошибка: Uncaught Swift_RfcComplianceException: Адрес в почтовом ящике [russt44ech@] не соответствует RFC 2822, 3.6.2. в /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:345 трассировка стека: #0 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(261): Swift_Mime_Headers_MailboxHeader - >_assertValidAddress('russt44ech@') #1 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader - > normalizeMailboxes (массив) #2 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader - > setNameAddresses (Array) #3 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php(58): Swift_Mime_Headers_MailboxHeader - > setFieldBodyModel (Array) #4 /var/www/u0585149 in /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php по строке 345

Share this post


Link to post
Share on other sites
Warning: Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46' (this will throw an Error in a future version of PHP) in /var/www/u0585149/data/www/stayhe.com/classes/Mail.php on line 878

Warning: idn_to_ascii() expects parameter 3 to be integer, string given in /var/www/u0585149/data/www/stayhe.com/classes/Mail.php on line 878

Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [russt44ech@] does not comply with RFC 2822, 3.6.2. in /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:345 Stack trace: #0 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(261): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('russt44ech@') #1 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php(58): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 /var/www/u0585149 in /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php on line 345

 

Share this post


Link to post
Share on other sites

Warning: Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46' (this will throw an Error in a future version of PHP) in /var/www/u0585149/data/www/stayhe.com/classes/Mail.php on line 878

Warning: idn_to_ascii() expects parameter 3 to be integer, string given in /var/www/u0585149/data/www/stayhe.com/classes/Mail.php on line 878

Fatal error: Uncaught Swift_RfcComplianceException: Address in mailbox given [airvent75@] does not comply with RFC 2822, 3.6.2. in /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:345 Stack trace: #0 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(261): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('airvent75@') #1 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array) #2 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array) #3 /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php(58): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array) #4 /var/www/u0585149/d in /var/www/u0585149/data/www/stayhe.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php on line 345

Share this post


Link to post
Share on other sites

 

Hi,

which version of the ICU is the last ???

BR

Venty

 

Share this post


Link to post
Share on other sites

ICU 63

ICU 4.6 is from 2012

Share this post


Link to post
Share on other sites

Hi,

t

to ask, the warning message of the ICU always appears ...?!?

I'm upgrading to version 62 and re-running ...
And the version I install on the preview is 1.7.5.0

 

BR

Venty

Share this post


Link to post
Share on other sites
On 1/8/2019 at 7:47 PM, venty said:

Hi,

t

to ask, the warning message of the ICU always appears ...?!?

I'm upgrading to version 62 and re-running ...
And the version I install on the preview is 1.7.5.0

 

BR

Venty

brother make sure your php version is 5.6 and php intl is on I solved it!

Share this post


Link to post
Share on other sites

Hi,
I Have the same problem with Prestashop 1.7.5
i've already try to set php 5.6.32 rather than 7.1.11 but i have the same problem, nothing changed...
What's ICU 63 ? How can i install this to Aruba server?

Share this post


Link to post
Share on other sites
On 12/18/2018 at 12:14 PM, Direxus said:

(1/1) UndefinedFunctionException

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

in Mail.php line 872
 
 
 
 
 
 
 
 

 

I got this error, i just configure my SMTP email on prestashop and did TEST MAIL and its working fine... But when i try the final step order  or resend a email frome order come this error (up)

Please delete this it is full of private details!!!!

Edited by Nick57
  • Like 1

Share this post


Link to post
Share on other sites

 

We have found the same problem in a 1.7.5  prestashop after of upgrade, in a server with plesk and ubuntu.

The solution is 

apt-get install php-intl

service apache2 restart

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More