Page 1 of 1
Updating to Mysqli?
Posted: Fri Apr 24, 2015 8:51 pm
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.
Re: Updating to Mysqli?
Posted: Sat Apr 25, 2015 3:50 am
by KyleMassacre
NWE only uses MySQLi so you shouldn't have to worry for quite a while
Re: Updating to Mysqli?
Posted: Sun Apr 26, 2015 11:54 am
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.
Re: Updating to Mysqli?
Posted: Sun Apr 26, 2015 12:15 pm
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.
Re: Updating to Mysqli?
Posted: Sun Apr 26, 2015 3:49 pm
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?
Re: Updating to Mysqli?
Posted: Sun Apr 26, 2015 5:06 pm
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
Re: Updating to Mysqli?
Posted: Fri May 22, 2015 12:11 am
by gmoore
I think this is a closed discussion. Can we mark it as such?
Greg