News:

AbanteCart v1.4.2 is released.

Main Menu
support

AbanteCart not working fully with PHP 7

Started by Ollie, January 26, 2017, 09:54:42 AM

Previous topic - Next topic

Ollie

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/

Rey

Check your php.ini file and add these lines or un-comment them if they don't exist or are commented out:

extension=php_openssl.dll
allow_url_fopen = On


Tell us the results.

Ollie

Quote from: 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:

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/

Rey

Quote from: Ollie on January 26, 2017, 12:54:01 PM
Quote from: 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:

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?

abolabo

Quote from: 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?

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

Ollie

Quote from: abolabo on January 27, 2017, 05:11:35 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/

abolabo

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

Ollie

Quote from: 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()

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/

llegrand


Ollie

#9
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.
Assistive technologies for people with special needs:
https://assistech.com/store/

Forum Rules Code of conduct
AbanteCart.com 2010 -