Author Topic: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!  (Read 833 times)

carsten888

  • Jr. Member
  • **
  • Posts: 225
    • pages-and-items.com
I'm trying to update my live site from 3.2.12 to 3.2.14.
I get this warning:
Quote
To ensure seemless working with Virtuemart please use MySQLi as database type in Joomla configuration
Extension Update: Custom install routine failure.
But in the joomla config the database IS using mysqli.

How to proceed?

I got an exact copy of the site on localhost and had no problem doing the update.   :o

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27345
  • Always on vacation
    • Jenkin Hill Internet
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #1 on: December 31, 2018, 11:59:57 am »
PHP version?
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.4.3.10045 on Joomla 3.9.5 PHP 7.0.33
Testing VM 3.4.5.10045 on Joomla 3.9.5

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8834
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #2 on: December 31, 2018, 12:36:09 pm »
and why 3.2.14?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

carsten888

  • Jr. Member
  • **
  • Posts: 225
    • pages-and-items.com
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #3 on: December 31, 2018, 14:19:41 pm »
php 7.1.25-1
J 3.8.12
Quote
and why 3.2.14?
because that is the latest version according to Joomla update.
So I emptied the cache and tried again, now its version 3.4.2. But when trying to update I get the same error.


jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27345
  • Always on vacation
    • Jenkin Hill Internet
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #4 on: December 31, 2018, 17:06:23 pm »
ISTR Milbo mentioned that the latest VM version is for Joomla 3.9  (now at 3.9.1)
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.4.3.10045 on Joomla 3.9.5 PHP 7.0.33
Testing VM 3.4.5.10045 on Joomla 3.9.5

carsten888

  • Jr. Member
  • **
  • Posts: 225
    • pages-and-items.com
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #5 on: January 01, 2019, 16:43:24 pm »
I updated to 3.9.1 and tried again. Same issue.  :-[

carsten888

  • Jr. Member
  • **
  • Posts: 225
    • pages-and-items.com
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #6 on: January 18, 2019, 09:04:20 am »
solved! Bug in Joomla core.

How wierd. In the Joomla config at 'database type' 'mysqli' was selected. But in the configuration.php
Code: [Select]
public $dbtype = 'mysql';I changed that to
Code: [Select]
public $dbtype = 'mysqli';and had no problem updating vm.

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8834
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #7 on: January 18, 2019, 09:11:28 am »
oddly I had exactly this problem yesterday with a site upgrade...
and this is the weird part...

In Joomla admin config it clearly showed mysqli  in the dropdown but VM still said mysql on install.
The installer takes this directly from the configuration.php

      $config = JFactory::getConfig();
      $type = $config->get( 'dbtype' );
      if ($type != 'mysqli' and $type!= 'Jdiction_mysqli') {
         JFactory::getApplication()->enqueueMessage('To ensure seemless working with Virtuemart please use MySQLi as database type in Joomla configuration', 'warning');
         return false;
      }

when I checked the configuration.php by ftp it did say public $dbtype = 'mysql';

I have no idea how this can be possible but manually changing this to public $dbtype = 'mysqli'; and the upgrade worked fine

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

carsten888

  • Jr. Member
  • **
  • Posts: 225
    • pages-and-items.com
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #8 on: January 18, 2019, 12:15:07 pm »
good to know I'm not the only one with this crazy issue.  :)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8834
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #9 on: January 18, 2019, 12:56:59 pm »
almost as if Joomla doesn't read the states directly from configuration.php but stores them elsewhere .. can't find anything like this though (DB or xmls etc)

but the problem is repeatable

just changed and saved the config but it doesn't change in JAdmin -- no caches etc configged..

hmmmm

debugging directly in administrator\components\com_config\model\application.php the correct state is shown but the select still doesn't update

and directly at the form template still shows wrong even though $this is correct  [dbtype] => mysql

administrator\components\com_config\view\application\tmpl\default_database.php

ah....  there is no mysql value

<select id="jform_dbtype" name="jform[dbtype]" style="display: none; font-family: Arial;">
   <option value="mysqli" style="font-family: Arial;">MySQLi</option>
   <option value="pgsql" style="font-family: Arial;">PostgreSQL (PDO)</option>
   <option value="pdomysql" selected="selected" style="font-family: Arial;">MySQL (PDO)</option>
   <option value="postgresql" style="font-family: Arial;">PostgreSQL</option>
</select>

so if config is set to mysql it just defaults to the 1st one which is mysqli
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

carsten888

  • Jr. Member
  • **
  • Posts: 225
    • pages-and-items.com
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #10 on: January 18, 2019, 16:07:48 pm »
Good debugging!  :)

You might want report that bug. If only for all the VM users.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9800
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #11 on: February 11, 2019, 20:46:20 pm »
I think for all joomla users also. Sounds really like a joomla bug.
I should 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: 3714
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: update 3.2.12 to 3.2.14 fails "use MySQLi" but site is using MySQLi ?!
« Reply #12 on: February 11, 2019, 22:50:48 pm »
The problem is perhaps because mysql is already saved before upgrade
mysql was and continue to be a valid choice on Joomla 4, if i read correctly.
In latest built : https://github.com/joomla/joomla-cms/blob/ad2c673ac27c2fd19bbdf6003aee0451d068de16/installation/forms/setup.xml
<field
         name="db_type"
         type="databaseconnection"
         label="INSTL_DATABASE_TYPE_DESC"
         id="db_type"
         class="custom-select form-control"
         supported="mysql,mysqli,pgsql,postgresql"
         required="true"
         default="mysqli"
         filter="string"
      />