Updating to Mysqli?

General Chat, Comments
Post Reply
User avatar
Kesstryl
Posts: 202
Joined: Sat Sep 22, 2012 5:27 am

Updating to Mysqli?

Post by Kesstryl »

Since the next versions of PHP are depreciating mysql and most people will update their php versions as time goes on, are there any plans to update this engine to use either PDO or mysqli so any games we develop will not get depreciated if our hosting companies upgrade us? I recently saw an online game that I visited have depreciation errors displayed all over and so was unplayable. I'd like that to not happen with any games I develop if I decide to go forward with this engine.
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Updating to Mysqli?

Post by KyleMassacre »

NWE only uses MySQLi so you shouldn't have to worry for quite a while
gedq
Posts: 18
Joined: Sun Apr 05, 2015 9:53 pm

Re: Updating to Mysqli?

Post by gedq »

I'd go straight to PDO, although talking to someone from the Zend team last week, PHP 7 isn't expected to be useable until 7.1 and crap knows when that's coming out; it certainly won't be 2015. There's no guarantee that they will strip the mysql_ functions even in 7 given how much legacy code that would break; they're still there in the car wreck that is 6.0. In the meantime someone needs to learn how to set their error reporting and tighten up their server security - error messages on the production code? Tsk... just.. tsk.
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Updating to Mysqli?

Post by KyleMassacre »

gedq wrote:I'd go straight to PDO, although talking to someone from the Zend team last week, PHP 7 isn't expected to be useable until 7.1 and crap knows when that's coming out; it certainly won't be 2015. There's no guarantee that they will strip the mysql_ functions even in 7 given how much legacy code that would break; they're still there in the car wreck that is 6.0. In the meantime someone needs to learn how to set their error reporting and tighten up their server security - error messages on the production code? Tsk... just.. tsk.
MySQL(I) will work just fine unless you decided to move away from MySQL to SQL or mongo in which NWE uses the MySQL database so I think converting is almost a pointless task. And I'm not sure what your are talking about with error messages going live but those should only be viewable to an admin in the engine. If it is showing error messages to the public, I believe there is a confit file to turn those off for non admin personel. Maybe they are troubleshooting some pages that are non authenticated pages and need to see what the error is in order to proceed.
gedq
Posts: 18
Joined: Sun Apr 05, 2015 9:53 pm

Re: Updating to Mysqli?

Post by gedq »

I didn't notice that this thread was app specific :) however I think the point I was replying to was about general code:

"I recently saw an online game that I visited have depreciation errors displayed all over and so was unplayable."

production code shouldn't be putting error messages out at all - they should be switched off in php.ini or by using error_reporting(). Very amateurish.

mysql_ functions are, as we know, already on the deprecation list and were due to be removed in PHP6. They weren't, and it's looking unlikely that they'll be taken out of 7. To the very best of my knowledge mysqli_ is safe.

KM your code looks interesting - is there a live example out there? The one your site links to http://corruptedrealmz.com/ looks dead?
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Updating to Mysqli?

Post by KyleMassacre »

No I don't have a game up and running currently and that game you mentioned is not mine I do know they had a few of my modules on their game If you are talking about http://nw-engine.com, that would be a_betrand's engine that he created and not mine. It is a very nicely done engine and I would suggest you check it out. He does have a free version available to download
User avatar
gmoore
Posts: 212
Joined: Wed Jun 04, 2014 5:40 pm

Re: Updating to Mysqli?

Post by gmoore »

I think this is a closed discussion. Can we mark it as such?

Greg
Running a game is like riding a bike ... well it should be!

New Worlds Engine / FunMayhem.com
Helping you get your game concept up and running. Now.
Post Reply

Return to “General”