getAttributeKeyID() problem
Permalink
I have an old site running on 5.6.3.3. When the shopping cart is in checkout, an error is returned.
From error log:
[13-Mar-2020 16:28:42 UTC] PHP Fatal error: Call to a member function getAttributeKeyID() on null in /home/lifereso/public_html/packages/core_commerce/models/order/model.php on line 523
the site is running on Php 5.6
eCommerce - ver 2.8.13
Not sure when this happened or what happened before. Client pretty much edits and changes without my help until I need to fix something.
The first time this error shows up is 28 Feb. The errors just before that are:
[07-Feb-2020 05:05:02 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/drivers/adodb-mysql.inc.php:442
Stack trace:
#0 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb.inc.php(557): ADODB_mysql->_connect('localhost', 'lifereso_ptest', 'eXpect2B', 'lifereso_C5New')
#1 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb.inc.php(4358): ADOConnection->Connect('localhost', 'lifereso_ptest', 'eXpect2B', 'lifereso_C5New')
#2 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb.inc.php(4194): ADONewConnection('mysqlt')
#3 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/core/libraries/loader.php(251): NewADOConnection('mysqlt://lifere...')
#4 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/startup/exceptions.php(6): Concrete5_Library_Loader::db()
#5 [internal function]: Concrete5_Exception_Handler(Objec in /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/drivers/adodb-mysql.inc.php on line 442
I'm thinking from when the site was migrated to a different server and Php was sent to 7. When I changed it back to 6.6 everything seemed fine.
Thankfully, with Concrete5 I don't have to do a lot of code because I suck at it. Can someone please point me in the right direction.
blupaula
From error log:
[13-Mar-2020 16:28:42 UTC] PHP Fatal error: Call to a member function getAttributeKeyID() on null in /home/lifereso/public_html/packages/core_commerce/models/order/model.php on line 523
the site is running on Php 5.6
eCommerce - ver 2.8.13
Not sure when this happened or what happened before. Client pretty much edits and changes without my help until I need to fix something.
The first time this error shows up is 28 Feb. The errors just before that are:
[07-Feb-2020 05:05:02 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/drivers/adodb-mysql.inc.php:442
Stack trace:
#0 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb.inc.php(557): ADODB_mysql->_connect('localhost', 'lifereso_ptest', 'eXpect2B', 'lifereso_C5New')
#1 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb.inc.php(4358): ADOConnection->Connect('localhost', 'lifereso_ptest', 'eXpect2B', 'lifereso_C5New')
#2 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb.inc.php(4194): ADONewConnection('mysqlt')
#3 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/core/libraries/loader.php(251): NewADOConnection('mysqlt://lifere...')
#4 /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/startup/exceptions.php(6): Concrete5_Library_Loader::db()
#5 [internal function]: Concrete5_Exception_Handler(Objec in /home/lifereso/public_html/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/drivers/adodb-mysql.inc.php on line 442
I'm thinking from when the site was migrated to a different server and Php was sent to 7. When I changed it back to 6.6 everything seemed fine.
Thankfully, with Concrete5 I don't have to do a lot of code because I suck at it. Can someone please point me in the right direction.
blupaula
Thanks for the input
I think you will need to restore database/files to a server with PHP < 7
Then upgrade to 5.6.4 (supports PHP7), then upgrade to PHP7
Keep us posted...
Then upgrade to 5.6.4 (supports PHP7), then upgrade to PHP7
Keep us posted...
I restored database & files to Php 5.6
Then I updated to Concrete 5.6.4.0
Then I changed Php tp 7.0 and got a 500 server error.
Changed back to Php 5.6 and the site works ... except for core_commerce. When I select a product, it doesn't go anywhere.
Error log states:
PHP Fatal error: Call to a member function rescanOrderProductPricePaid() on null in .../packages/core_commerce/models/order/product.php on line 94
Running
eCommerce - 2.8.12
Then I updated to Concrete 5.6.4.0
Then I changed Php tp 7.0 and got a 500 server error.
Changed back to Php 5.6 and the site works ... except for core_commerce. When I select a product, it doesn't go anywhere.
Error log states:
PHP Fatal error: Call to a member function rescanOrderProductPricePaid() on null in .../packages/core_commerce/models/order/product.php on line 94
Running
eCommerce - 2.8.12
If you would like me to take this on as a job ... PM me
Your core is now php7 compatible, but the old eCommerce addon is not. You can find details of the changes needed to make eCommerce php7 (and php7.2) compatible on my legacy support site at:
http://www.legacy.c5magic.co.uk/add-ons/zone-based-shipping/php7/...
http://www.legacy.c5magic.co.uk/add-ons/zone-based-shipping/php7/...
mysql was deprecated in PHP7 instead it uses mysgli.
I guess there could have been something changed in the database at the same time that is now causing the new error...