As we know PHP7 is much faster than previous versions of PHP.
But there are couple of compatibility issues with magento 1.x as listed below
1. Admin login not working
Error:
Recoverable Error: session_regenerate_id(): Failed to create(read) session ID: user (path: /var/lib/php/sessions) in app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 492
Solution: There is a issue with sessions.
This only happens when you set "session_save" in "local.xml" to "db".
If you try with the option "files" there are no problems.
2. Product Image not uploading
Error:
Solution: Due to uniform variable syntax the code is now interpreted strictly from left to right.
The line
$params['object']->$params['method']($this->_file['tmp_name']);
should be
$params['object']->{$params['method']}($this->_file['tmp_name']);
But there are couple of compatibility issues with magento 1.x as listed below
1. Admin login not working
Error:
Recoverable Error: session_regenerate_id(): Failed to create(read) session ID: user (path: /var/lib/php/sessions) in app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 492
This only happens when you set "session_save" in "local.xml" to "db".
If you try with the option "files" there are no problems.
2. Product Image not uploading
Error:
Fatal error</b>: Uncaught Error: Function name must be a string in /home/admin/domains/store.com/public_html/dev/lib/Varien/File/Uploader.php:259
Stack trace:
#0 /home/admin/domains/store.com/public_html/dev/lib/Varien/File/Uploader.php(180): Varien_File_Uploader->_validateFile()
#1 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php(46): Varien_File_Uploader->save('/home/admin/dom...')
#2 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_Product_GalleryController->uploadAction()
#3 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('upload')
#4 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller in /home/admin/domains/store.com/public_html/dev/lib/Varien/File/Uploader.php
Solution: Due to uniform variable syntax the code is now interpreted strictly from left to right.
The line
$params['object']->$params['method']($this->_file['tmp_name']);
should be
$params['object']->{$params['method']}($this->_file['tmp_name']);
Comments