Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

SS3 and MySQLi - any workaround?


6 Posts   819 Views


16 October 2012 at 4:25pm Community Member, 121 Posts

It's been a while since I've done work on Silverstripe but I just found out that new installations require the PHP extension mysqli to be enabled. And with all the luck in the world, my hosting provider doesn't have it enabled for re-seller accounts, I was advised to get a VPS account.

Any workaround so I won't need MySQLi enabled? Any downsides as well?



17 October 2012 at 8:33am Administrator, 25 Posts


One way would be to use a different kind of DB (PostGRESQL) or alternatively, have your MySQL database hosted on another server. Although, if you were going to do that, you would probably just host everything there?

Sorry I can't be more help. This happened to me once, about 5 years ago and I demanded the host support what I need. It turned out that I wasn't the first person to ask, and they actually did it.

If you can't use MySQLi, and you need's not really a 'reseller' account. They should support your requirements.

Sorry I can't be much more help.


17 October 2012 at 8:38am (Last edited: 18 October 2012 11:40am), Administrator, 25 Posts

Actually, it would also be possible to modify the framework. Maybe framework/model/MySQLDatabase.php. However MySQLi and MySQL are quite different, with MySQLi having more features, which may end up breaking things in SilverStripe.


17 October 2012 at 7:28pm Community Member, 121 Posts

Really appreciate your reply Van.

Has MySQLi always been a requirement? I used to host silverstripe apps on the same host and never had any problems. I only encountered the issue when I tried to install 3.0.2. I might try other versions though, like 3.0.1 or 2.x to see if this is an isolated case.

If anyone else encountered the issue and found a work-around, please share! Thanks :)


18 October 2012 at 10:07am (Last edited: 18 October 2012 10:10am), Forum Moderator, 921 Posts

mysqli was introduced about a year ago, before 3.0 was released:

2.4.x still uses the old mysql functions, it was upgraded during the course of 3.0 development because the majority of shared hosts we found had enabled mysqli by default. PHP have also suggested that everyone switches to mysqli or PDO MySQL instead of the old functions because they are not actively maintained any longer.

Excerpt about the old mysql API taken from

"This extension is not recommended for writing new code. Instead, either the mysqli or PDO_MySQL extension should be used. See also the MySQL API Overview for further help while choosing a MySQL API."

I would suggest to your host that they enable mysqli, especially considering PHP themselves recommend everyone use it over the old driver. For the most part, I don't see that being a problem for them, because mysqli will run happily alongside the old mysql drivers.



18 October 2012 at 5:48pm Community Member, 121 Posts

Thanks for the clarity Sean. I guess the best move would be to persuade my host to have the extension enabled.

Appreciate all the help!