Post by korisnik » Sun Dec 09, 2018 9:51 am

My opencart 2.3.0.2 site work fine on PHP 5.6, but when try to use PHP 7 on server i have error.
On checkout page if i try registration, i have this error:

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
OK

What can be problem on PHP 7?

New member

Posts

Joined
Sun Aug 07, 2016 1:21 am

Post by IP_CAM » Sun Dec 09, 2018 2:33 pm

Did you already change the
system/library/encryption.php file ?
Ernie
viewtopic.php?f=199&t=208476#p740744
viewtopic.php?f=202&t=206794&p=733801#p733629

For Sale: Top URL's, including an OpenCart V-Pro Shop!
A wide range of matching Designs can be seen here: http://www.opencart.li
For Information on URL's offered, please contact me at: jti@jacob.ch
Hundreds of Mods in 380+ Repositories for OC v.1.5.x - v.2.3.x
to be found on my Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by korisnik » Sun Dec 09, 2018 11:28 pm

After sugestion, i tryed plenty encryption.php files, but problem persist.
What is right encryption.php file for opencart 2.3.0.2?

New member

Posts

Joined
Sun Aug 07, 2016 1:21 am

Post by IP_CAM » Mon Dec 10, 2018 11:16 am

Well, you probably use some Custom Checkout Routine, otherwise, a
lot of people would already have complaind about this. But, if so, you'll
have to get the Fellow in charge, to make such an extension to work with
PHP-7, which is not the case with some Extensions.
Good Luck!
Ernie

For Sale: Top URL's, including an OpenCart V-Pro Shop!
A wide range of matching Designs can be seen here: http://www.opencart.li
For Information on URL's offered, please contact me at: jti@jacob.ch
Hundreds of Mods in 380+ Repositories for OC v.1.5.x - v.2.3.x
to be found on my Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by thekrotek » Mon Dec 10, 2018 5:30 pm

This is a generic JS error, which means, that bad data is returned, wrong format or something like that. There's no generic solution for this.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by korisnik » Mon Dec 10, 2018 11:29 pm

I really using custom checkout component(my first suspicion), but it is not problem.
For testing i turned off this component - and i have same error on default opencart checkout page.

New member

Posts

Joined
Sun Aug 07, 2016 1:21 am

Post by ADD Creative » Tue Dec 11, 2018 12:55 am

Check your error logs for any errors that may be related. Both the one in OpenCart and also your servers PHP error_log.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by korisnik » Tue Dec 11, 2018 8:37 am

I have this error in opencart error logs:
PHP Warning: mail() has been disabled for security reasons in /*/*/public_html/system/library/mail.php on line 158

Can it be reason, php mail enabled for PHP 5.6 but disabled for PHP 7?

New member

Posts

Joined
Sun Aug 07, 2016 1:21 am

Post by ADD Creative » Tue Dec 11, 2018 7:21 pm

It's something you would have to ask your host about. Or switch to using SMTP.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by thekrotek » Wed Dec 12, 2018 8:54 pm

korisnik wrote:
Tue Dec 11, 2018 8:37 am
Can it be reason, php mail enabled for PHP 5.6 but disabled for PHP 7?
Yes, most likely. Like said above, contact your hosting provider or switch to SMTP.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by korisnik » Wed Dec 12, 2018 10:48 pm

I contacted my hosting, and he ask me to use SMTP.
From begining SMTP not working for me, i have "PHP Warning: fsockopen(): unable to connect to..." error.
I tryed every solution from forum, but SMTP for gmail can't working.

New member

Posts

Joined
Sun Aug 07, 2016 1:21 am

Post by ADD Creative » Thu Dec 13, 2018 12:35 am

Unless you can work out why SMTP isn't working (could be down to your host) or you can get your host the allow mail() on PHP 7, you might have to change host.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 94 guests