Jump to content

Internal Server error on Checkout prestashop 1.7.4.2


Carlos

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('[email protected]')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'), '[email protected]', '', '[email protected]', '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

Link to comment
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 (see edit history)
Link to comment
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.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

(1/1) UndefinedFunctionException

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

in Mail.php line 872
at MailCore::toPunycode('[email protected]')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 €'), '[email protected]', '=?UTF-8?B?RHXFvHkgSmFzaXU=?=', '[email protected]', '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)

Link to comment
Share on other sites

  • 3 weeks later...

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

 

Предупреждение: использование неопределенная константа 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

Link to comment
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

 

Link to comment
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

Link to comment
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 (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 9 months later...
  • 3 months later...
  • 2 months later...

We had a customer the other day tell us this was happening to them, strangely we had noticed a lot of abandoned carts too, so asked the customer to send us a screenshot and it was pretty much just the standard 500 server error page, and when I asked further at what point was this happening she said she managed to get through the paypal, chose her source of funding and then when paypal were trying to bounce back to our site it just threw the 500 server error.   I changed SMTP back to PHP mail as I read this was one of the reasons this could happen (no idea why) and we've also updated PHP to 7.3 and made sure intl is enabled (another couple of possible reasons) but strange thing is we had other orders that came though OK, some paying by card and others by paypal balance.   Eventually, she tried again and instead of using her PP balance, she used her card and it worked fine.   I also made a test purchase using PP balance and everything went fine, but I'm still annoyingly, seeing some abandoned carts which is making me think something is still going on.   We're using the prestashop checkout on 1.7.6.4 and I noticed a upgrade a few days ago which I applied, the upgrade (I think) was available AFTER noticing the issues, so I'm not entirely sure that between all the bits and pieces I've done, together with the upgrade it may have been fixed, but then as I say, we're still noticing some abandoned carts with people having went to the time and trouble of registering, etc, and then they just vanish!.    We are sending mails to these people manually, using a template for such eventualities, asking them if they have had any issues whilst attempting to make the order to let us know and we'll help them, but again, as yet had nothing back from any of the other ones.   I know I could probably make a test purchase again, and I know it would likely go through again no problem, but I guess my question is simply is anyone else still having these issues or is there some way we can verify for certain that orders are not being lost due to some form of error within the payment process!

Thanks in advance to anyone taking the time to respond.

Cheers

Marko

Link to comment
Share on other sites

2 hours ago, Janett said:

Warning, there are known issues with PrestaShop 1.7.6 and PHP 7.3 https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/#php-requirements

Thanks for the heads up Janett, we did have the issues before putting PHP up to 7.3 and haven't seen anything additional crop up, but to avoid anything else happening I'll revert it back to 7.2 for now :)

Marko

Link to comment
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
×
×
  • Create New...