Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 PHP fatal Error and site wont load
Author « Topic »  

bpike
Advanced Member

USA
347 Posts

Pre-sales questions only
(More Details...)

Posted - 04/11/2023 :  16:09:18  
The website that I am maintaining was not loading. I traced it back to a PHP error with my cart files so I applied the updater to 7.5.7 PHP version from 7.0. After running the installer and adding the necessary files I cam still not able to get the site to load. www.mettlerelectronics.com

PHP Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /home/[user]/public_html/vsadmin/inc/incfunctions.php:1747

Any thoughts on how to fix this?

bpike
Advanced Member

USA
347 Posts

Pre-sales questions only
(More Details...)

Posted - 04/11/2023 :  16:25:16  
More error code:

Stack trace:
#0 /home/[user]/public_html/vsadmin/inc/incfunctions.php(61): ect_fetch_assoc(false)
#1 /home/[user]/public_html/vsadmin/inc/incloginfunctions.php(22): getadminsettings()
#2 /home/[user]/public_html/vsadmin/admin.php(15): include('/home/mettelec1...')
#3 {main}
thrown in /home/[user]/public_html/vsadmin/inc/incfunctions.php on line 1747

dbdave
ECT Moderator

USA
10495 Posts

Posted - 04/11/2023 :  20:43:48  
Hi, did you remember to run the updatestore.php script in your browser?

Thanks,
David

bpike
Advanced Member

USA
347 Posts

Pre-sales questions only
(More Details...)

Posted - 04/11/2023 :  20:58:41  
Hi David,

Yes I did run the update. Ran it a second time just in case it didn’t take on the first run.
When I login to the backend it shows the updated version. Still getting php errors when looking at the logs.

Vince
Administrator

42944 Posts

Posted - 04/12/2023 :  01:57:22  
Hi bpike
If the fetch_assoc function isn't available it's likely that the mySQLi extension has not been enabled in PHP. Can you check that with your host? Quite possibly the PHP version on the server was changed but that essential extension was not enabled.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

bpike
Advanced Member

USA
347 Posts

Pre-sales questions only
(More Details...)

Posted - 04/12/2023 :  09:56:40  
Thanks Vince. It appears to be working this morning. I'll run a test order. Not sure if a reboot of the server overnight did it or not. I did not do anything.

bpike
Advanced Member

USA
347 Posts

Pre-sales questions only
(More Details...)

Posted - 04/12/2023 :  15:19:54  
Turns out we modified a function in the incfunctions.php file to check if the value was not bool before passing it to the fetch_assoc function.

[code]function ect_fetch_assoc($ectres)
{
return (!is_bool($ectres) && @$GLOBALS['ectdatabase'] ? $ectres->fetch_assoc() : mysql_fetch_assoc($ectres));
}[/code]

Will this affect anything else?

Edited by - bpike on 04/12/2023 17:56:41

Vince
Administrator

42944 Posts

Posted - 04/13/2023 :  01:30:31  
I don't think any boolean values would be sent to that function so I'm not sure it would have any effect anyway.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

bpike
Advanced Member

USA
347 Posts

Pre-sales questions only
(More Details...)

Posted - 04/14/2023 :  12:42:19  
Hi Vince,

My host responded with this:

"Please be advised that Mysqli Support is enabled according to the phpinfo page. You can verify that yourself at https://www.mettlerelectronics.com/phpinfo.php."

Thoughts?

dbdave
ECT Moderator

USA
10495 Posts

Posted - 04/14/2023 :  13:09:44  
Hi bpike, I thought the site was working... Is that not the case?

quote:
It appears to be working this morning. I'll run a test order. Not sure if a reboot of the server overnight did it or not. I did not do anything.


David


Edited by - dbdave on 04/14/2023 13:10:04

bpike
Advanced Member

USA
347 Posts

Pre-sales questions only
(More Details...)

Posted - 04/14/2023 :  13:30:11  
It is. I wanted to let Vince know the MySQLi was enabled. Not sure if it was a server reboot or the custom code we added.

ITZAP
Ecommerce Template Guru

Australia
1019 Posts

Posted - 04/15/2023 :  23:02:41  
Brian, you may wish to check out this Forum Topic: Which PHP Extensions should you have enabled?

When you upgrade the PHP Version in cPanel, the catch is that the default set of PHP Extensions enabled are not always adequate to run Ecommerce Templates.
When I updated to PHP VERSION 8.2, I needed to activate nd_mysqli

Gary

bpike
Advanced Member

USA
347 Posts

Pre-sales questions only
(More Details...)

Posted - 04/17/2023 :  11:05:21  
Thanks Gary. I'll take a look.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.06 seconds. Snitz Forums 2000