Author Topic: [MOD] MySQLi support  (Read 11816 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] MySQLi support
« 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
« Last Edit: October 05, 2008, 09:06:08 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline deacon

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [MOD] MySQLi support (for MySQL v4.1) (v1 beta)
« Reply #1 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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] MySQLi support (for MySQL v4.1) (v1 beta)
« Reply #2 on: July 06, 2005, 11:53:11 PM »
that means your server does not support mysqli extension. check your phpinfo()
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)