durangod Posted January 21, 2013 Share Posted January 21, 2013 As some of you may or may not know as of PHP 5.5, the MySQL library has been officially deprecated. I knew they were deprecating items like crazy for a while but i guess i have not been paying attention as i should, understandable as it is with my medical condition (which took me out of the game for awhile) it still is a huge blow to me and my sites which are for the most part unprepared for this. My smaller scripts are fine, the way i did them it is not so bad to convert them over to the MySQLi library. But my larger social sites are going to be madening to say the least, they were originally written for php 4x and it will in essense be rewriting the sites which i cant handle, its just too much so im not sure what i will do with those. Thankfully my host has agreed to hold on on 5.5 for awhile to give us both time to get this taken care of. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. Here is a link if you need help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php How is everyone else coping with this? 0 Quote Link to comment Share on other sites More sharing options...
aegisdesign Posted January 25, 2013 Share Posted January 25, 2013 I'll be using PHPSelector from CloudLinux and letting my customers choose PHP 5.2/3/4/5 http://docs.cloudlinux.com/index.html?php_selector.html 0 Quote Link to comment Share on other sites More sharing options...
dumidu Posted January 31, 2013 Share Posted January 31, 2013 hmm quiet interesting. but i think we all gotta adjust to it 0 Quote Link to comment Share on other sites More sharing options...
durangod Posted January 31, 2013 Author Share Posted January 31, 2013 I just got done converting my smaller script to MySQLi so that i could get a handle on things on a smaller scale to get warmed up. Overall its not that bad it us just what i call "mindless work" repeating the same thing over and over and over and over lol.. One of the biggest things i noticed is that most everything now needs a (connection) meaning if you do a query, or a num rows, or escape (yes even escapes inside functions), or mysqli_error, it all must have the connection variable in the parameter now so two parameters now are min for most things. And we got used to putting querys in this format ($query,$link) well mysqli is reverse ($link,$query) lol... There are several ways now to do the query its up to you if you want to use mysqli_stmt_num_rows or the standard mysqli_num_rows the main difference for me on this small script is that i didnt want to have to manage the stmt open, process, and close for such a minor task as i am doing. So i decided it was better for me in this case to keep it object oriented and just change my query format. Meaning you have to load the query into an object result first on every query then you can perform other tasks. Hope that helps someone. 0 Quote Link to comment Share on other sites More sharing options...
Business-Web.co.uk Posted February 4, 2013 Share Posted February 4, 2013 My biggest question on this, is what's going to happen to WordPress, will it be affected by this? Maybe 3.6 will just deal with it. 0 Quote Link to comment Share on other sites More sharing options...
durangod Posted February 5, 2013 Author Share Posted February 5, 2013 Yes every script out there public or private that uses the mysql library will need to convert to MySQLi or PDO as of php 5.5 there is no isolation for popular scripts, this is for everyone. Im sure the coders for the most popular scripts such as WP, phpBB, and other popular forum and scripts are already on the ball converting to be ready for the switch. The issue with those is that you will prob just have to install and update, but if you have done any mods and have written code outside of the basic install code you will need to edit those statements yourself and convert those to MySQLi or PDO whichever they decide to use for the package involved. But if you just have the basic install then you should be fine just do the update when it comes out. Remember this is only of you will be running php 5.5 or above. Just a guess, they may have two versions, one for php 5.5 and above and one for php 5.4 and below for older installs that dont update the php on a reg basis. But i do not recommend that you put this off, it will bite you one day if you dont stay with the flow. Leaving your installs for your customers below 5.5 just to avoid the change will bite you eventually and it is not a long term answer. 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted February 5, 2013 Share Posted February 5, 2013 You do realise that PHP 5.5 is only just in Alpha so a loooooong way before any sane host would even begin consider upgrading their platforms? 0 Quote Link to comment Share on other sites More sharing options...
durangod Posted February 5, 2013 Author Share Posted February 5, 2013 You do realise that PHP 5.5 is only just in Alpha so a loooooong way before any sane host would even begin consider upgrading their platforms? Yes, I am thinking possibly inside of 2 years and def inside of 3. And as you know 2-3 years (depending on the size of your staff) goes by quick in this business. By the time you update your scripts (especially if you have numerious scripts), then update all your websites and forums about the new versions, and work out any bugs. All of this while still working on other main paid projects that bring in the normal income, 2-3 years is nothing and will on us quickly. That is why i have started doing this now. 0 Quote Link to comment Share on other sites More sharing options...
durangod Posted February 6, 2013 Author Share Posted February 6, 2013 So i decided it was better for me in this case to keep it object oriented and just change my query format. Meaning you have to load the query into an object result first on every query then you can perform other tasks. I wanted to correct this statement, what i am doing is actually called procedural style NOT object oriented style and i apologize for the misinformation. My thoughts about objects come way before the internet in many of the old languages and i still have that mindset. So the actuall technical term for how i did mine was procedural style. Even though in my mind it is object oriented. Sorry about that.. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.