Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: AbanteCart not working fully with PHP 7  (Read 6593 times)

Offline Ollie

  • Sr. Member
  • ****
  • Posts: 253
  • Karma: +27/-1
    • View Profile
    • Assistech
AbanteCart not working fully with PHP 7
« on: January 26, 2017, 09:54:42 AM »
Recently, I upgraded to PHP 7 for PCI compliance. I tested my store and all the PHP functionalities seem to be working fine, except for one thing. For some reason, the store (version 1.2.9) stopped printing this line of code after the upgrade:
<?php print(file_get_contents(HTTPS_SERVER."index.php?rt=r/content/content/loadInfo&amp;content_id=3")); ?>

How can I fix this?
Assistive technologies for people with special needs:
https://assistech.com/store/

Offline Rey

  • Newbie
  • *
  • Posts: 40
  • Karma: +7/-0
    • View Profile
Re: AbanteCart not working fully with PHP 7
« Reply #1 on: January 26, 2017, 10:54:01 AM »
Check your php.ini file and add these lines or un-comment them if they don't exist or are commented out:
Code: [Select]
extension=php_openssl.dll
allow_url_fopen = On

Tell us the results.

Offline Ollie

  • Sr. Member
  • ****
  • Posts: 253
  • Karma: +27/-1
    • View Profile
    • Assistech
Re: AbanteCart not working fully with PHP 7
« Reply #2 on: January 26, 2017, 12:54:01 PM »
Check your php.ini file and add these lines or un-comment them if they don't exist or are commented out:
Code: [Select]
extension=php_openssl.dll
allow_url_fopen = On
Tell us the results.

Your code snippet did not work.
Assistive technologies for people with special needs:
https://assistech.com/store/

Offline Rey

  • Newbie
  • *
  • Posts: 40
  • Karma: +7/-0
    • View Profile
Re: AbanteCart not working fully with PHP 7
« Reply #3 on: January 26, 2017, 01:05:22 PM »
Check your php.ini file and add these lines or un-comment them if they don't exist or are commented out:
Code: [Select]
extension=php_openssl.dll
allow_url_fopen = On
Tell us the results.

Your code snippet did not work.

Those lines exist in your php.ini?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: AbanteCart not working fully with PHP 7
« Reply #4 on: January 27, 2017, 05:11:35 AM »
Recently, I upgraded to PHP 7 for PCI compliance. I tested my store and all the PHP functionalities seem to be working fine, except for one thing. For some reason, the store (version 1.2.9) stopped printing this line of code after the upgrade:
<?php print(file_get_contents(HTTPS_SERVER."index.php?rt=r/content/content/loadInfo&amp;content_id=3")); ?>

How can I fix this?

it's not related to php7
Just add exit(); after print(). You have enabled output buffering and compressing for pages. It flushes your custom code output.
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline Ollie

  • Sr. Member
  • ****
  • Posts: 253
  • Karma: +27/-1
    • View Profile
    • Assistech
Re: AbanteCart not working fully with PHP 7
« Reply #5 on: January 27, 2017, 08:08:24 AM »
it's not related to php7
Just add exit(); after print(). You have enabled output buffering and compressing for pages. It flushes your custom code output.

I tried exit(); It didn't work, either. It only detached the module from the main page, but it didn't show the content, as expected.
Assistive technologies for people with special needs:
https://assistech.com/store/

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: AbanteCart not working fully with PHP 7
« Reply #6 on: January 27, 2017, 09:37:36 AM »
also you should to check directive allow_url_fopen = On via admin-side. Be sure that it is ON.
i mean admin->system->settings->system -> button phpinfo()
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline Ollie

  • Sr. Member
  • ****
  • Posts: 253
  • Karma: +27/-1
    • View Profile
    • Assistech
Re: AbanteCart not working fully with PHP 7
« Reply #7 on: January 27, 2017, 11:19:53 PM »
also you should to check directive allow_url_fopen = On via admin-side. Be sure that it is ON.
i mean admin->system->settings->system -> button phpinfo()

I don't see this option under System > Settings > System. Please doublecheck. I'm using version 1.2.9.
Assistive technologies for people with special needs:
https://assistech.com/store/

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1798
  • Karma: +520/-7
    • View Profile
Re: AbanteCart not working fully with PHP 7
« Reply #8 on: January 27, 2017, 11:26:56 PM »
see screenshot for where to look

Offline Ollie

  • Sr. Member
  • ****
  • Posts: 253
  • Karma: +27/-1
    • View Profile
    • Assistech
Re: AbanteCart not working fully with PHP 7
« Reply #9 on: January 28, 2017, 12:37:50 PM »
Thank you, guys. Issue resolved. There was no need to make any changes to the php.ini file, only turn on the "allow_url_fopen" directive in PHP.
« Last Edit: January 28, 2017, 12:40:41 PM by Ollie »
Assistive technologies for people with special needs:
https://assistech.com/store/

 

Powered by SMFPacks Social Login Mod