AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: Ollie on January 26, 2017, 09:54:42 AM

Title: AbanteCart not working fully with PHP 7
Post by: Ollie 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?
Title: Re: AbanteCart not working fully with PHP 7
Post by: Rey 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.
Title: Re: AbanteCart not working fully with PHP 7
Post by: Ollie 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.
Title: Re: AbanteCart not working fully with PHP 7
Post by: Rey 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?
Title: Re: AbanteCart not working fully with PHP 7
Post by: abolabo 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.
Title: Re: AbanteCart not working fully with PHP 7
Post by: Ollie 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.
Title: Re: AbanteCart not working fully with PHP 7
Post by: abolabo 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()
Title: Re: AbanteCart not working fully with PHP 7
Post by: Ollie 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.
Title: Re: AbanteCart not working fully with PHP 7
Post by: llegrand on January 27, 2017, 11:26:56 PM
see screenshot for where to look
Title: Re: AbanteCart not working fully with PHP 7
Post by: Ollie 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.