Page 1 of 1
Undefined variable: version in /home/sites/xx/public_html/xx/install/rpc.php on line 52
Posted: Fri Nov 05, 2021 5:21 pm
by Nigel
Hi all.
Just adding a clean install for testing and get this.
Undefined variable: version in /home/sites/xx/public_html/xx/install/rpc.php on line 52
Thanks.
(edited some wrong info)
Re: Undefined variable: version in /home/sites/xx/public_html/xx/install/rpc.php on line 52
Posted: Fri Nov 05, 2021 6:00 pm
by heatherbell
Nigel wrote: ↑Fri Nov 05, 2021 5:21 pm
Just adding a clean install for testing and get this.
Just did a new install from here
https://github.com/CE-PhoenixCart/Phoen ... master.zip
Installed no problem - sorry I don't know what issue you have had.
Re: Undefined variable: version in /home/sites/xx/public_html/xx/install/rpc.php on line 52
Posted: Fri Nov 05, 2021 10:12 pm
by ecartz
1. Line 52 is only reached when you are using a MariaDB version between 10.0.0 and 10.2.1 (inclusive). So that's what the problem is. It needs a more up-to-date MariaDB. See
Requirements. If you want to ignore this, you could of course comment out the version check code. Or move line 49 to line 35. So it looks like
Code: Select all
$db->select_db(trim($_GET['name']));
if ($db->errno) {
exit("[[0|{$db->error}]]");
}
exit('[[1]]');
If you do this, you should expect other things to be broken afterward, because that's why we have minimum versions for MySQL and MariaDB.
2. The last time I fixed something in that file, I broke the error messages. Fixed
here.
3. I have now added more error logging, which might be easier to find than the RPC messages.
Here.
And of course, the simple solution would be to use a version of MySQL or MariaDB that is still supported. That's at least MySQL 5.7.7 and MariaDB 10.2.2 from our perspective. MySQL would tell you 5.7.34 and MariaDB would say 10.2.40.
Re: Undefined variable: version in /home/sites/xx/public_html/xx/install/rpc.php on line 52
Posted: Sat Nov 06, 2021 12:09 am
by Nigel
Interesting.
I updated an existing cart to the latest version and that seemed to have worked.
There is an issue with that update which I mentioned elsewhere and your suggestion was a vanilla site to test and recreate the error. Hence this new install.
Could checkout_shipping.php be affected by too lower spec db etc. after the update ?
Thanks.