tomlankhorst / comments

utterances 🔮
0 stars 0 forks source link

mysqli-database-driver-for-kohana-3-3/ #4

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

MySQLi Database Driver for Kohana 3.3 | Tom Lankhorst

A couple of months ago I published my Kohana MySQLi database driver on GitHub. As the development of the framework came to a halt for the last few months the PHP team deprecated the support for the PHP MySQL extension on which Kohana’s default Database driver relies. This module is based on Kohana’s native implementation but uses the MySQLi extension. A composer description is available in the repository so it can be easily installed using the package manager.

https://tomlankhorst.nl/mysqli-database-driver-for-kohana-3-3/

tomlankhorst commented 3 years ago

Original author: Vinsent Chitekwe @vinsentchitekwe
Original date: 2016-09-07T15:17:57Z

Hi Tom. I am getting:

ErrorException [ Fatal Error ]: Call to undefined function mysqli_connect()

database.php:
'default' => array
(
'type' => 'MySQLi',
'connection' => array(

bootstrap.php
'mysqli' => MODPATH.'mysqli',

tomlankhorst commented 3 years ago

Original date: 2016-09-07T17:36:31Z

Hi Vinsent,

mysqli_connect() is an alias of the MySQLi constructor that is part of the PHP MySQLi database extension. This extension is installed on most hosting solutions. If you are running PHP yourself (development environment, VPS) ensure that the MySQLi extension is installed.

For example, on Ubuntu:
sudo apt-get install php5-mysql

tomlankhorst commented 3 years ago

Original author: Vinsent Chitekwe @vinsentchitekwe
Original date: 2016-09-08T07:58:31Z

Hi Tom
Thanks. I am now getting:

php5-mysql : Depends: phpapi-20121212
Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.19) but 5.4.9-4ubuntu2.4 is to be installed

tomlankhorst commented 3 years ago

Original date: 2016-09-08T08:15:57Z

You could try to reinstall the php-common package and see if you are able to install the php-mysql package then. You could try the following on a non critical environment at your own risk:

apt-get install --reinstall php5-common

tomlankhorst commented 3 years ago

Original author: Vinsent Chitekwe @vinsentchitekwe
Original date: 2016-09-08T15:53:43Z

Thanks man

tomlankhorst commented 3 years ago

Original author: Brian Stanback @brianstanback
Original date: 2017-05-12T22:23:31Z

Thank you, came in handy updating a legacy app to work with PHP 7.x.