Opened 5 years ago

Closed 5 years ago

#425 closed New feature (fixed)

Provide Mysqli support

Reported by: pebosi Owned by: vipsoft
Priority: normal Milestone: Piwik 0.4.4
Component: Core Keywords:
Cc: es@… Sensitive: no

Description

Hi got the following error when trying to change to mysqli using latest rev.

Fatal error: Call to undefined method mysqli::setAttribute() in /var/www/public/piwik/core/Piwik.php on line 917

regards

Attachments (1)

Db.php (7.5 KB) - added by matt 5 years ago.
DB.php hack to work with mysqli

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by matt (mattab)

DB.php hack to work with mysqli

comment:1 Changed 5 years ago by matt (mattab)

  • Cc es@… added
  • Milestone set to Future features

I received the Db.php from Emile Schenk es at donauweb dot at

Please contact him for more information on how Piwik works with MySQLi.
We would be happy to support mysqli but the provided hack is not a suitable solution. We would need a different DB class for mysqli and PDO, with a factory, etc.

Please use this ticket to submit patches. Cheers

comment:2 Changed 5 years ago by vipsoft (robocoder)

  • Summary changed from Changing to MYSQLI in config.ini.php fails to MYSQLI support
  • Type changed from Bug to New feature

comment:3 Changed 5 years ago by matt (mattab)

  • Summary changed from MYSQLI support to Provide Mysqli support

comment:4 Changed 5 years ago by vipsoft (robocoder)

  • Milestone changed from Features requests - after Piwik 1.0 to 2- DigitalVibes
  • Priority changed from major to normal
  • Sensitive unset

Reprioritizing given leaks in PdoMysql.

comment:5 Changed 5 years ago by domtop

comment:6 Changed 5 years ago by vipsoft (robocoder)

I'm speculating that this will require a newer version of PHP without the Suhosin patch and the ZF update.

PHP 5.2.6-3ubuntu4.2 with Suhosin-Patch 0.9.6.2

ALERT - canary mismatch on efree() - heap overflow detected (attacker '127.0.0.1', file '/path/core/PluginsFunctions/Sql.php', line 44)

PHP 5.2.10 (XAMPP build)

Warning: Wrong parameter count for mysqli_stmt::bind_param() in /path/libs/Zend/Db/Statement/Mysqli.php on line 227

comment:7 Changed 5 years ago by vipsoft (robocoder)

  • Milestone changed from 2- DigitalVibes to 1 - Piwik 0.4.4

comment:8 Changed 5 years ago by vipsoft (robocoder)

  • Owner set to vipsoft

comment:9 Changed 5 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

In [1456], fixes #425 - provide MySQLi support; added a factory method and refactored Tracker/Db.php into separate adapters (Tracker/Db/MySqli.php and Tracker/Db/PdoMySql.php).

Note: See TracTickets for help on using tickets.