Author Topic: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug  (Read 7080 times)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4680
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« 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

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4680
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save
« Reply #1 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

welrachid

  • Jr. Member
  • **
  • Posts: 265
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #2 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?
Best regards,
Wel

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4680
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #3 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.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10545
  • VM4.0.7 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #4 on: January 04, 2016, 13:06:39 pm »
The question is, why it is not PDO complaint?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4680
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #5 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 ;)

radosc

  • Beginner
  • *
  • Posts: 14
  • A beginner
  • Skype Name: radoslaw.rychel
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #6 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

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4680
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #7 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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10545
  • VM4.0.7 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #8 on: August 23, 2017, 10:09:32 am »
Uhm, I cannot find anything that mysqli is deprecated in php7.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 588
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #9 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.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3513
  • VirtueMart Version: 4.0.12.10777
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #10 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

To me it looks like MYSQL extension is being deprecated

Regards
A

Joomla 3.10.11
php 8.0

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 588
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #11 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
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4680
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #12 on: August 23, 2017, 10:28:49 am »
 :-\ Sorry i inverted mysql and mysqli.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10545
  • VM4.0.7 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #13 on: August 23, 2017, 11:30:40 am »
shit happens ;-)

VM works only with mysqlI
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

radosc

  • Beginner
  • *
  • Posts: 14
  • A beginner
  • Skype Name: radoslaw.rychel
Re: VM 3.0.12 : config error 0 SQL: 00000 on Save : mysql PDO Bug
« Reply #14 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.