sinopia Posted February 23, 2018 Share Posted February 23, 2018 Hello, I've upgrade a website to compatibility with PHP 7, follow other posts here in the forum.. Basically change the name function name into __construct.. (also have confirmed here -> https://github.com/BrockleyJohn/Responsive-osCommerce/tree/php7_compatibility_01). But now I've a problem in product_info.php (it works fine - SEO Friendly) but the old links like product_info.php?products_id=2525 I get this errors: Warning: Cannot modify header information - headers already sent by (output started at /home/fx/public_html/mega/product_info.php:1) in /home/fx/public_html/mega/includes/functions/general.php on line 1333 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/fx/public_html/mega/product_info.php:1) in /home/fx/public_html/mega/includes/functions/sessions.php on line 98 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/fx/public_html/mega/product_info.php:1) in /home/fx/public_html/mega/includes/functions/sessions.php on line 98 Warning: Cannot modify header information - headers already sent by (output started at /home/fx/public_html/mega/product_info.php:1) in /home/fx/public_html/mega/includes/classes/seo_friendly_urls.php on line 1505 Warning: Cannot modify header information - headers already sent by (output started at /home/fx/public_html/mega/product_info.php:1) in /home/fx/public_html/mega/includes/classes/seo_friendly_urls.php on line 1537 Also in application_top.php I've commented this line, since it was also giving me a error: // Disabled due PHP 7 compatibility //header('Content-type: text/html; charset=utf-8'); About general.php and sessions.php they are equals to the osCommerce with PHP 7 compatibility, am I missing something? Link to comment Share on other sites More sharing options...
♥raiwa Posted February 23, 2018 Share Posted February 23, 2018 You need also update your add-ons and you should tell us which is your exact oscommerce version, standard or BS responsive. For the last 2 errors you need to update your SEO URLs add-on. I guess it's this one you need: https://apps.oscommerce.com/36rDo&ultimate-seo-urls The other 2 errors can be related, not sure. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
sinopia Posted February 23, 2018 Author Share Posted February 23, 2018 Hi @raiwa I've updated addons/classes compared one file per file, the version is 2.3.4. My URL addon is http://www.johnbarounis.com/coding/oscommerce/seo-friendly-urls-addon -> which worked perfectly and I think the SEO urls are much more pretty. Before updating to PHP 7 everything worked fine. But now old urls with product_info.php?products_id=2525 doesn't redirect, the the product_info.php works fine when entering the website. Link to comment Share on other sites More sharing options...
♥raiwa Posted February 23, 2018 Share Posted February 23, 2018 Then you may contact John to provide you a PHP7 compatible update of his add-on. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
sinopia Posted February 23, 2018 Author Share Posted February 23, 2018 I already contact and got a answer from him. He's investigating what's going one. But I don't understand why I get errors from general.php and sessions.php. Session Directory -> /home/fx/publick_html/mega/work Force Cookie Use -> True Recreate Session -> True If I disabled this I don't get errors from session.php at least. Also I think it's not working, because the folder is empty doesn't exist any sess_random... My configure.php: define('HTTP_SERVER', 'https://www.aminhatshirt.com'); define('HTTPS_SERVER', 'https://www.aminhatshirt.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', 'aminhatshirt.com'); define('HTTPS_COOKIE_DOMAIN', 'aminhatshirt.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/mega/'); define('DIR_WS_HTTPS_CATALOG', '/mega/'); Link to comment Share on other sites More sharing options...
sinopia Posted February 23, 2018 Author Share Posted February 23, 2018 @raiwa just noticed now that with the addon SEO Friendly url disabled the old url works but get this: <br /> <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/aminhatshirt/public_html/mega/product_info.php:1) in <b>/home/aminhatshirt/public_html/mega/includes/functions/general.php</b> on line <b>1334</b><br /> <br /> <b>Warning</b>: session_start(): Cannot send session cookie - headers already sent by (output started at /home/aminhatshirt/public_html/mega/product_info.php:1) in <b>/home/aminhatshirt/public_html/mega/includes/functions/sessions.php</b> on line <b>98</b><br /> <br /> <b>Warning</b>: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/aminhatshirt/public_html/mega/product_info.php:1) in <b>/home/aminhatshirt/public_html/mega/includes/functions/sessions.php</b> on line <b>98</b><br /> Link to comment Share on other sites More sharing options...
♥raiwa Posted February 23, 2018 Share Posted February 23, 2018 17 minutes ago, sinopia said: Force Cookie Use -> True Recreate Session -> True If I disabled this I don't get errors from session.php at least. Also I think it's not working, because the folder is empty doesn't exist any sess_random... I just checked and found that in the latest PHP7 compatible 2.3.4.1 BS responsive version both parameters are set to "false" by default. I have it like this set in my live store and everything works fine. I remember also in some other thread that it is recommended like this. Sessions anyway are stored in the database. Try to find some resource here, there were more reports about. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
sinopia Posted February 23, 2018 Author Share Posted February 23, 2018 I've disabled those two but getting: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/aminhatshirt/public_html/mega/product_info.php:1) in <b>/home/aminhatshirt/public_html/mega/includes/functions/sessions.php Even replacing replacing this -> https://github.com/BrockleyJohn/Responsive-osCommerce/tree/php7_compatibility_01/includes/functions Link to comment Share on other sites More sharing options...
sinopia Posted February 23, 2018 Author Share Posted February 23, 2018 @raiwa even with both enabled and SEO Friendly also, with PHP 5.6 works fine but chaning into 7.0 get those errors.. Link to comment Share on other sites More sharing options...
♥raiwa Posted February 23, 2018 Share Posted February 23, 2018 @sinopia, - try to delete your browsers cache - try with another browser - check if your cache directory has the correct permissions - switch off any caching (admin=>configure=>cache) - recheck that you applied all php7 updates Sorry, I have no more advice About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
sinopia Posted February 23, 2018 Author Share Posted February 23, 2018 @raiwa misconfiguration at PHP: Checked PHP options and in cPanel I've just found this: session.save_path /var/cpanel/php/sessions/ea-php70 It was using /var/cpanel/php/sessions/ea-php56 but version was PHP 7 Link to comment Share on other sites More sharing options...
sinopia Posted February 23, 2018 Author Share Posted February 23, 2018 I think it's solved now, I'll test if everything is working correctly. Thank your for you help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.