Fork me on GitHub

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 adslight Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield billige Bootstrap Captcha cell cent chronolabs CHUNG Clicks content CĂN demo docek download Dresses evden eve facebook Fat floor Food for free Gateway Google Guide herre Honeypot HP Human HỘ IP iPhone jQuery Language Legal List log Loss mobile module modules Monster new newbb news NHÀ online PARK phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon security Sentry site Smartphone Smoking Solution Spam stem Studio tdmcreate template The Theme themes web weight Wishcraft xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137872

ode64de

Welcome to XOOPS!

Archives

News Archives

MySQLi Connectors for Xoops 2.5.6 and 2.6

Posted by redheadedrod on 2013/8/3 16:50:00 (2507 reads) | Posted on XOOPS
MySQLi connectors are now available for 2.5.6 and 2.6. These connectors should be considered as Beta and should not be used on a production server at this time.

These have been designed as a drop in addition to the current MySQL connector.

The current MySQL connector used by Xoops allows Xoops to talk to the MySQL database. This older connector has been around since MySQL version 3 and not only does not support new features of MySQL 4 and 5 but is now officially Depreciated in the latest release of PHP. For now this doesn't mean much to most but means that the current MySQL connector will no longer work in the future.

MySQLi was released to take advantage of the features in the newest versions of MySQL and as such is the direct replacement for the older MySQL connector. I used a script that converts old MySQL code to MySQLi compatible code as my base and went from there. Although I still have some questions for a core developer about some of the code the script created it does run without any known errors.

The use of these connectors is very simple. You download the version of mysqlidatabase.php that you need and copy it to your class/database folder. You then modify the database type in your secure.php file from MySQL to MySQLi and you are on your way.

Both of these connectors can be found in the SVN.

Connector for 2.5.6 MySQLi and for 2.6 MySQLi.

Please direct bug reports to the following thread:
http://xoops.org/modules/newbb/viewtopic.php?post_id=354793


Printer Friendly Page Send this Story to a Friend Create a PDF from the article
Bookmark Me
Bookmark to Google Plus
The comments are owned by the author. We aren't responsible for their content.

ok i did made that on 3 differetn sites, no problems mysql version 5.5.33

1. But in admin panel there is no info about your mysql version anymore ?
Old connector has no that problem

2.Must we do any conversion in mysql ? or is just adding that file and modifying secure.php ok ?
Published: 2013/8/4 11:27 • Updated: 2013/8/4 11:27
Thanks Rodney for your hard work on this! This is awesome!

I hope that after sufficient testing, if everything works correctly, the Core Team will consider including it in future releases.

I am very short on time, but I'll see if I can do some testing.

But this is very exciting - it's time to leave our old "mysql" extension behind us and move to "mysqli"
Published: 2013/8/5 0:07 • Updated: 2013/8/5 0:07
Thank you for testing!. It will be easier to track bugs in the forum link I posted but I will try to answer these here.

1. What version of xoops are you using? And can you point out where you are finding this information? I will look into it and see why it isn't working. Should be an easy fix. I have found some items are returned slightly different under MySQLi than they are under the older MySQL and something may need some tweaking.

2. In theory just adding the file and modifying the secure.php should be all that is required. This will be a good test to see in practice how well this works. As long as there are no bugs in the connector the core and core included modules should work without modification unless they themselves have bugs that don't show with the older MySQL connector.

In reality some modules will need to be updated to make sure they use the database connector fully. When a developer mixes using the xoops based connector and direct PHP code to access the older MySQL connector the module will break. It should be relatively simple however to fix those modules. Hopefully not too many newer modules will have this issue.

Also, as mentioned Prepared Statements, stored procedures and transactions are not included in this connector.

Another item to be aware of:
Transactions can not be used with tables using the MyISAM engine which most if not all xoops tables are. Transactions require the table to be using InnoDB engine. This is a limitation of the MySQL database and can not be over ridden by the connector.

Mamba, other than any bugs that come up I only expect some possible restructuring of some of the code for beautification reasons.
Published: 2013/8/5 4:18 • Updated: 2013/8/5 4:26
I mention this further in the thread but the admin class needs to be modified and a function added to the database connectors. I will work this out in the next couple days and post the results. This should be done before 2.5.7 is released.
Published: 2013/8/5 18:25 • Updated: 2013/8/5 18:25
Required patches to Module Admin Class and MySQL connector have been placed in the SVN. These patches will be required to allow MySQLi and future new connectors to properly display the Version of the server.

Still working on the MySQLi connector updates that are needed from testing done so far. Please watch the above mentioned thread for more details.

Rodney
Published: 2013/8/11 19:01 • Updated: 2013/8/11 19:01