4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on July 03, 2005, 07:43:13 PM

Title: [MOD] MySQLi support
Post by: V@no on July 03, 2005, 07:43:13 PM
Some of u might know, that MySQL v4.1 can not be used with PHP v3, v4 and even v5 on Windows systems...I think I just heard someone said "huh? PHP5 supports MySQL v4.1 ! what are u talking about?"
Well, this is almost correct, exept for one detail - it supports through a different extension "MySQLi". But unfortunetly if a script that require mysql backend does not support MySQLi extension it will not work at all...
So, here is a support module that should alow 4images uses MySQLi extension.
Note, that not only Windows based servers can use this extension, its just Windows based servers have no other chose, exept for switching to MySQL v4.0.

(no longer valid, PHP v5 supports both extensions)


----------[ Installation ]---------

Step 1
Download attached db_mysqli.zip package. (see below)
Unpack it and upload to your server preserve the following directory tree:
includes/db_mysqli.php
data/database/default/mysqli_default.sql

(the mysqli_default.sql file is a simple copy of mysql_default.sql


Step 2
Apply this fix:
http://www.4homepages.de/forum/index.php?topic=8458.0


Step 3
If your 4images already installed then edit config.php
Replace
Code: [Select]
$db_servertype = "mysql";With
Code: [Select]
$db_servertype = "mysqli";

If its not installed, then during intallation u should have a chose between "mysql" and "mysqli" database type.


P.S.
Tested on:
Windows XP Pro SP2
Apache v2.0.52
PHP v5.0.2
MySQL v4.1.7


Windows XP Pro SP3
Apache v2.0.59
PHP v5.2.3
MySQL v5.0.41
Title: Re: [MOD] MySQLi support (for MySQL v4.1) (v1 beta)
Post by: deacon on July 06, 2005, 10:42:14 PM
Hi V@no, after following your steps, I get this error

Code: [Select]
Fatal error: Call to undefined function mysqli_connect() in E:\projects\4images\includes\db_mysqli.php on line 42

Can you help advise me?

Thanxs
Title: Re: [MOD] MySQLi support (for MySQL v4.1) (v1 beta)
Post by: V@no on July 06, 2005, 11:53:11 PM
that means your server does not support mysqli extension. check your phpinfo()