PHP, Zend Framework and Other Crazy Stuff
Out With The Old, In With The New: Original MySQL Extension Heading For Retirement?
When we use the term PHP, we are often silently associating it with the abbreviation LAMP (that’s Linux, Apache, MySQL and PHP just in case you don’t recall). MySQL has been our bread and butter in PHP for over a decade; an old friend, accomplice and partner in crime. This was made possible with the MySQL extension. Indeed, you can scarcely find a basic nuts and bolts PHP tutorial that doesn’t use MySQL. Which is probably why it’s a good idea to give it a huge going away bash (and make sure it finds the exit afterwards and catches a cab to oblivion!). We’ve since seen replacements like the MySQL Improved extension (mysqli) and PHP Data Objects (PDO). These are simply better from the additional features each adds to their integration in higher level libraries such as Doctrine.
But, as with any basic change to a successful formula, there was bound to be some controversy at the mere suggestion of deprecating our old friend (even if preceded by an extended period of educating users on the well established replacements). Manuel Limos and Lucas Darnell have both written blog posts indicating what a bad idea this could be. Their issues are understandable. Once the E_DEPRECATION notices start flying applications that have existed for years (and years) will appear to implode leaving behind a long line of irritated people who may need to hire a PHP programmer to fix stuff. This obviously imposes a cash cost across thousands (probably an underestimation
) of businesses. This may lead to hosting services deferring adoption of the PHP version carrying the deprecation by months if not years. Lucas also raised an interesting point that with so much literature, including books, carrying example after example of (often insecure in my opinion) MySQL extension use, user adoption and education may suffer a great deal.
In a riposte to Manual Lemos, Gregg Thomason perhaps illustrates best why even the feared disadvantages may be worth the cost. MySQL is a historical relic from a past PHP is trying to leave behind. It’s old, doesn’t do a lot to support security and it needs to go. I agree. Gregg says “…this is a forward-thinking business and our job is to invent the future.” Let’s go invent and improve that future – if nothing else it might make Anonymous’ job finding SQL injections at every company they squint at a little harder
.
PHP is not a weirdo stagnant programming language used by amateurs who don’t have sufficient brain cells to learn Java, Ruby or Python. That’s the common misconception based largely on two obvious factors: PHP is so amazingly popular and easy to learn that any innocently ignorant person with half a brain cell can write a fabulously insecure application (the examples just keep coming and coming) and, secondly, PHP is a bit on the ugly side and not a “true object oriented language” because it uses functions instead of methods. PHP is actually used by hardcore professionals who build great secure applications and that community has left the original MySQL extension by the wayside in favour of object oriented solutions where MySQL related functions are buried deep behind a wall of classes in their preferred database interaction solution, such as PDO or Doctrine. It’s about time we brought everyone else up to speed with that reality.
While “deprecation” may attract all the attention, let’s remember that pushing the alternatives by any possible means is a great idea. Philip Olson’s proposal on how to encourage users to move away from the original MySQL extension has a lot of merit and is well worth persuing. We need to let go of the past eventually to keep PHP moving into the future.
Related posts:
| Print article | This entry was posted by padraic on July 16, 2011 at 12:48 pm, and is filed under PHP General, PHP Security, Zend Framework. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
-
http://schlueters.de/openid/ johannes
-
http://chrisyallop.com Chris Yallop
-
http://blog.astrumfutura.com Pádraic Brady
-
http://blog.astrumfutura.com Pádraic Brady
-
Anonymous
-
http://twitter.com/itpastorn Lars Gunther
-
http://blog.astrumfutura.com Pádraic Brady
-
http://www.maleenhancementguide.org/ Janice Smith
-
http://www.facebook.com/drdysdy Andrew Prescott
-
http://twitter.com/jimmykarlo Jimmy Karlo
-
http://%/zztlqnr9 PERRY
-
http://%/zzyuvln6 EDUARDO
-
http://%/zzrxpeo9 BRANDON
-
http://%/zzxxdth9 TERRENCE
-
Anonymous
-
http://%/zzstcsn4 SALVADOR
-
http://%/zzxooli8 PERRY
-
http://%/zzlhkgr6 TRACY
-
http://%/zzcykjd3 RALPH
-
Hussain Jawadwala
-
http://twitter.com/A1CityFlowers neelam sharma
-
Anonymous
-
http://%/zzqjhtz6 KENNY
-
http://%/zzfzhar3 BILLY
-
http://%/zzdclpp6 WILLIAM
-
http://%/zznvxoz1 BOB
-
Anonymous
-
Anonymous
-
Anonymous
-
Anonymous
-
http://seanja.com Sean Sandy
-
Anonymous
-
Anonymous
-
http://%/zzmzirn6 VICTOR
-
http://%/zzmiycm3 DARYL
-
http://%/zzqwxvk7 CLIFTON
-
http://%/zzfnlia2 RAY
-
Anonymous
-
Anonymous
-
Anonymous
-
Anonymous
-
Anonymous
-
Anonymous
-
Anonymous
-
Anonymous
-
Anonymous
-
http://%/zznmuss6 LLOYD
-
http://%/zzfhpbr8 LEWIS
-
http://%/zzzojpb5 BRYAN
-
http://%/zzugbox6 MARION
-
http://%/zzptgdk4 VINCENT
-
http://%/zzhdutd6 RONALD
-
http://profiles.google.com/kdgrier4 Denise Grier
-
http://%/zzfcxvb3 VINCENT
-
http://blog.vsair109.com VSair109
-
Anonymous
-
Anonymous
-
http://%/zzxynpb9 WENDELL
-
Anonymous
-
http://%/zzxpipy4 MICHAEL
-
Anonymous
-
http://pulse.yahoo.com/_MKP4XDRBPUBJCYHCLFSOAOO7CA escavern
-
http://pulse.yahoo.com/_ZFCDDY7IL6T4EDPYFRXMLCV474 Alice Jiang
-
http://pulse.yahoo.com/_ZFCDDY7IL6T4EDPYFRXMLCV474 Alice Jiang
-
Umar Waqas
-
Dr. Salman
-
http://%/zzyzaeh5 JOHNNY
-
http://%/zzuirzh4 MILTON
-
http://%/zzfagca8 LESLIE
-
Damian Henry
-
http://%/zzubtbg6 ALFRED
-
http://%/zzaisut1 PERRY
-
http://%/zzgedtk2 NICHOLAS
-
http://%/zzdlwfc1 GEORGE
-
http://%/zzhzjte6 FERNANDO
-
http://www.webhostings.in/ web hosting companies

