VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: Studio 42 on December 23, 2015, 23:59:04 pm

Title: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: Studio 42 on December 23, 2015, 23:59:04 pm
Hi all,
First time i see this,
  when i try to save vm config, a have
Quote
ERROR  0 SQL: 00000, ,
.
All are updated for 2 days from VM 2.6 + Joomla 2.5 to Vm 3.0.12 + Joomla 3.4.7

All other components work, without any problem and other VM edit and save too !

Some had already this?

Thanks,
Patrick
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save
Post by: Studio 42 on December 25, 2015, 16:06:03 pm
HI,
I reply to myself and this can help other having same problem.
THe query used by Virtuemart to save the config is not compatible with mysql PDO.
Solution, change db type from mysql PDO > mysql in Joomla config.

Linux with PHP   5.3.29, mySql 5.6.26,Joomla! 3.4.8, VM 3.0.12
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: welrachid on December 27, 2015, 18:52:53 pm
Can you change from mysql to PDO afterwards? or will it fail on every VM config save with PDO?
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: Studio 42 on December 28, 2015, 03:14:41 am
You can change from PDO to mysql after, this don't break the shop, but the config sql query (and perhaps another queries) is not mysql PDO compliant.
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: Milbo on January 04, 2016, 13:06:39 pm
The question is, why it is not PDO complaint?
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: Studio 42 on January 04, 2016, 22:09:46 pm
The question is, why it is not PDO complaint?
perhaps : VirtueMartModelConfig function getCreateConfigTableQuery query or language table creation query ?
I know that the only i have do, is switching from mysql PDO to mysql and all work correctly since.
This need test, to check and i don't have lust to play with my customer server ;)
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: radosc on August 22, 2017, 20:14:40 pm
Hello
I would like to brush up this topic.

I get many warnings on my server (libraries/joomla/database/driver/mysqli.php on line 219\nPHP message: PHP Warning:  mysqli_close(): Couldn't fetch mysqli)
so to solve this problem I switched to MySql (PDO). Everything works well but Virtuemart in menu "Tax & Calculation Rule". When I want to save a rule then I get error 0000 and server slowes down dramaticly (dedicated very powerfull).

Is any solution of this issue?

Joomla! 3.7.5
VM 3.22
PHP    7.0.22
MySql 5.5.36

thank you
Radek
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: Studio 42 on August 23, 2017, 00:11:57 am
do not use mysqli but mysql, mysqli  is deprecated in PHP7 and perhaps it solve your problem too
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: Milbo on August 23, 2017, 10:09:32 am
Uhm, I cannot find anything that mysqli is deprecated in php7.
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: StefanSTS on August 23, 2017, 10:13:31 am
http://php.net/manual/en/mysql.php

Depending on the version of PHP, there are either two or three PHP APIs for accessing the MySQL database. PHP 5 users can choose between the deprecated mysql extension, mysqli, or PDO_MySQL. PHP 7 removes the mysql extension, leaving only the latter two options.
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: AH on August 23, 2017, 10:15:14 am
Not sure what studio42 is meaning by his statement.

Quote
If you are using MySQL versions 4.1.3 or later it is strongly recommended that you use the mysqli extension instead.

http://php.net/manual/en/mysqli.overview.php (http://php.net/manual/en/mysqli.overview.php)

To me it looks like MYSQL extension is being deprecated

Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: StefanSTS on August 23, 2017, 10:20:20 am
I get many warnings on my server (libraries/joomla/database/driver/mysqli.php on line 219\nPHP message: PHP Warning:  mysqli_close(): Couldn't fetch mysqli)
(dedicated very powerfull).

Is any solution of this issue?

What happens on a not so powerful XAMPP or another providers server?
Sounds like your server is having some issues.

Stefan
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: Studio 42 on August 23, 2017, 10:28:49 am
 :-\ Sorry i inverted mysql and mysqli.
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: Milbo on August 23, 2017, 11:30:40 am
shit happens ;-)

VM works only with mysqlI
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: radosc on August 23, 2017, 13:34:49 pm
I get many warnings on my server (libraries/joomla/database/driver/mysqli.php on line 219\nPHP message: PHP Warning:  mysqli_close(): Couldn't fetch mysqli)
(dedicated very powerfull).

Is any solution of this issue?

What happens on a not so powerful XAMPP or another providers server?
Sounds like your server is having some issues.

Stefan

I think server is OK. many administrators and hours they spent to optimalize my server which is working OK. It might be a problem with any plugin but I can't find it. The problem is only with driver MySqli. On Mysql (PDO) it works perfectly. Only when I edit a rule in (taxes & rules) after saving it there is MySql error appears.
Title: Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
Post by: radosc on August 23, 2017, 13:37:58 pm
shit happens ;-)

VM works only with mysqlI

I think this is a minor problem and will be solved in next VM version. Now VM has been working on MySql (PDO) for 3 days and it seems to be OK. Many orders where put.