4images Modifications / Modifikationen > Mods & Plugins (Releases & Support)

[MOD] MySQLi support

(1/1)

V@no:
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: ---$db_servertype = "mysql";
--- End code ---
With
--- Code: ---$db_servertype = "mysqli";
--- End code ---


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

deacon:
Hi V@no, after following your steps, I get this error


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

--- End code ---

Can you help advise me?

Thanxs

V@no:
that means your server does not support mysqli extension. check your phpinfo()

Navigation

[0] Message Index

Go to full version