Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,739 members, 7,802,250 topics. Date: Friday, 19 April 2024 at 11:35 AM

The Plot To Kill Php Mysql Extension - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / The Plot To Kill Php Mysql Extension (1386 Views)

Facebook Is Trying To Kill Facekobo.com - A Nigerian Website / Google To Kill Google Reader / Php/mysql Pin And Serial Number Generation Script (2) (3) (4)

(1) (Reply) (Go Down)

The Plot To Kill Php Mysql Extension by Nobody: 11:38am On Jul 16, 2011
PHP core developers are planning to kill the PHP original MySQL extension.

If you are using MySQL in your PHP applications for a long time, this may seriously affect you.



The Plot

Yes, you read it right. Recently, Phillip Olson sent to the PHP internals mailing list a proposal to kill the original PHP MySQL extension in future PHP versions.

Well, as you may have read, the idea is not to kill this very popular PHP extension right now in the upcoming PHP 5.4.

The idea is to first mark its functions as deprecated in the PHP documentation. The intention is to educate PHP developers to migrate their code to use the mysqli or the PDO extensions instead, or the mysqlnd, why not?

In future versions, say PHP 5.5 or 5.6 common calls to functions like mysql_pconnect, mysql_query, etc, will throw ugly E_DEPRECATED notices. And eventually in PHP 6 or later, if it will ever happen, code that uses those functions will be removed from the main PHP distribution permanently.

The PHP 5 adoption fiasco all over again?

Well, you know, despite PHP 5.0 was released in 2004, it was not until 2008 when PHP 4 was officially considered discontinued, that it started gaining serious adoption. Despite PHP 5 contained a plethora of new features, many, many PHP developers refused to upgrade from PHP 4 to PHP 5 until they were forced to do it.

PHP 5 was mostly backwards compatible with PHP 4. So what was wrong with PHP 5? Many details, but I think I can sum it up to not being 100.0% compatible with PHP 4. Nobody wants to change code that just works.

In many cases, code that was running well in PHP 4, would still run well on PHP 5, except that it would probably throw many deprecated syntax notices that only seems to make it look like the code was wrong, despite there was nothing wrong about it.

One of the most famous cases of those misleading notices was the use of the var declarations. PHP core developers wanted everybody to replace var class variable declarations with public declarations.

You may ask: what was the point of that? In my opinion, none. So why it was imposed? Because PHP 5 is a so called "more object-oriented" version of PHP. It introduced the private and protected declarations, so the old var declarations should be replaced with public to be more consistent. Be more consistent with what? Java, I suppose. But PHP is not Java.

Anyway, since the idea was really pointless and it was doing more harm than good to the PHP 5 adoption, those notices ended up being dropped.

So, is this PHP mysql extension deprecation really necessary. I don't think so, but that is just my opinion. At most it will avoid the need to maintain the documentation of multiple extensions to access MySQL databases.

So, for the PHP developers that have old code to access MySQL databases this idea will not be beneficial at all. Once the deprecation becomes official, it will start annoying PHP developers that do not want to waste time rewriting code that always worked for many years.

So I am afraid the first PHP version that introduces this deprecation will suffer from the same adoption delay problems as PHP 5.

You may argue that the ereg extension is now being deprecated in favor of the preg extension for performing operations with regular expressions. Except that it was for a good reason: the preg extension is much faster because it compiles the regular expressions and caches the compiled results, so subsequent requests that use the same regular expressions do not have to waste time parsing and compiling them again.

http://marc.info/?l=php-internals&m=131031747409271&w=2
Re: The Plot To Kill Php Mysql Extension by yawatide(f): 12:32pm On Jul 16, 2011
Whatever happened to good old fashioned freedom of choice? And to think I actually thought that African leaders were the tyrannical ones.
Re: The Plot To Kill Php Mysql Extension by Nobody: 2:10pm On Jul 16, 2011
Well, this is a very great shocker. Especially when they force everyone to upgrade.
I remember then, the old way of uploading files in php4 does not work like that
in php5. Immagine having to relearn how to do simple uploads all over again.
Re: The Plot To Kill Php Mysql Extension by yawatide(f): 2:48pm On Jul 16, 2011
Na so o, my broda. My concern is that I have been basically reusing the same code for the past 6 years. It cuts down my coding time by at least 60-70% sad
Re: The Plot To Kill Php Mysql Extension by Nobody: 3:07pm On Jul 16, 2011
Those of us that stick to wrappers have more luck because it is the wrappers that need to change.

db_query(); rather than mysql_query();

My framework too uses a similar pattern.
Re: The Plot To Kill Php Mysql Extension by DualCore1: 6:04pm On Jul 16, 2011
I may have to start looking at other languages to make my "home" lang, that allow some more consistency and open decision making. angry
Most of us don't like change, most of us just include files we wrote ages ago. It works, why fix what isn't broken. This is like RIPE stripping of all IPV4 IPs cuz we will soon run out of them to replace them with IPV6, they wont do that cuz its stupid.
Re: The Plot To Kill Php Mysql Extension by lojik(m): 11:16pm On Jul 16, 2011
Well, thank God i created my own wrappers with foresight. Even if they remove mysql and impose postgre, most OOP apps may just need a little tweak,
I use $myobject->dbquery() instead of mysql_query().

Won't have much effect on me, just gotta make modifications to my db object. But this is gonna bring a whole lot of trouble with lot of solutions already posted on forums and blogs.
Re: The Plot To Kill Php Mysql Extension by Nobody: 12:48am On Jul 17, 2011
This is one great advantage of coding in OOP again with moi moi wrappers and stuffs. Just patch the wrappers and you are like done.
Re: The Plot To Kill Php Mysql Extension by DualCore1: 6:53am On Jul 17, 2011
Tomorrow one madman will wake up and say they are changing OOP to POOP angry
Re: The Plot To Kill Php Mysql Extension by Nobody: 8:47am On Jul 17, 2011
well, i think its the right move,but why bother anyway since mysql has always been old,it should be deprecated after all Mysqli is the better version or users can use the pdo_mysql,if you are using CakePHP,Zend and Igniter, i don't think you have any reason to fear cuz i know Zend uses mysqli which is far better,its the curse of being a developer you have to upgrade.
Re: The Plot To Kill Php Mysql Extension by Nobody: 9:16am On Jul 17, 2011
Dual Core:

Tomorrow one madman will wake up and say they are changing OOP to POOP angry
or to PDP

Well, @pc guru, most of us did not start POOP programming overnite you know. Some of my
very old projects still use the direct scripting thingggy.
Re: The Plot To Kill Php Mysql Extension by Nobody: 9:21am On Jul 17, 2011
grin besides i don't think any server will make the quick jump to php 5.4 most still run 5.2
Re: The Plot To Kill Php Mysql Extension by Nobody: 9:25am On Jul 17, 2011
Eventually they will move. When i moved from ASP to PHP then, PHP5 was already out. I downloaded the PHP5 manual and mastered it.

Then i made my first php website and had lots of problems. Once of the problems then being that - i used stripos - and some other codes
which do not downgrade to PHP4 which most servers were using then.

Funny, i still never downloaded and PHP4 manual since then, i just lookup the code and make sure it is compatible with PHP4 before use.
I just had to wait patiently for PHP5 to come into full support. I noticed that those that learnt the php4 method of uploading files had
problems when they got to PHP5.
Re: The Plot To Kill Php Mysql Extension by Nobody: 9:34am On Jul 17, 2011
its quite true,that will be depressing,imagine rewriting the whole codes again,but i think the only diff is you'll just put "i" after every "mysql" function because they are basically the same codes.
Re: The Plot To Kill Php Mysql Extension by Nobody: 9:39am On Jul 17, 2011
The thinggy is that, immagine people that have built like so many websites - like those that ehm build like 1,000 websites in one year.
Even if na framework or anything, so far as you are not loading all your resources from a central server, you have to make those changes
on so many websites - it will be quite time and resource consuming.
Re: The Plot To Kill Php Mysql Extension by Nobody: 9:47am On Jul 17, 2011
Quite true,mehn am at work bored,thinking of what to write on for my blog.any ideas? besides the framework u dey try,most frameworks are written by a team,but in nigeria trust is another issue.
Re: The Plot To Kill Php Mysql Extension by Nobody: 10:00am On Jul 17, 2011
Yeah, i know that. In fact, in PHP they said that every single line of code was written by the cakephp team.
But this is Nigeria mehn, i gotta do most of it myself anyway. I am almost done with the core.
It is done in such a way that developers can write their plugins and stuffs.

The way templates are written is 95% like drupal. The modules in this framework in fact can do everything
a drupal module can do - generate content, generate blocks, act is plugin with the hooks and stuffs.

The structure of the modules is ehm 95% like drupal modules as well.

The only thing is that, i have not yet defined all the events of the framework - as development progresses.

However, this is a framework and not a CMS. But still, all the cms and frameworks have some basic functionalities
which is what i am trying to achieve here first - before what makes it dhtmlframework comes into play.
Re: The Plot To Kill Php Mysql Extension by Nobody: 10:05am On Jul 17, 2011
i understand,that's quite awesome, because its rare for Nigerian developers to go deep into PHP like this,as for the Events no p,am sure something will come to you,you can look at Wordpress and Joomla Events Callback system.
Re: The Plot To Kill Php Mysql Extension by Nobody: 10:07am On Jul 17, 2011
Being Nigeria, some people will naturally be pessimistic that it will not work. I remember the other guy then on webmasters that started one framework like
that - which some of us like me downloaded for testing. I was going to give him a lot of ideas about stuffs i feel he should add to the framework,
but he just left the project to die (or so i presumed).


pc guru:

i understand,that's quite awesome, because its rare for Nigerian developers to go deep into PHP like this,as for the Events no p,am sure something will come to you,you can look at Wordpress and Joomla Events Callback system.
I already know all the necessary events, i am just saying that as objects are introduced, events will come into play.

For instance, i am still building the form api. Rather like file:///E:/wamp/www/dhtmlframework.com/workspace/formapi/drupal%20form%20api%206.htm

Once the form api is complete and integrated, then form api events can come in. The framework already support events.
Then when user api is integrated, user-generated events come into place.
Re: The Plot To Kill Php Mysql Extension by Nobody: 10:10am On Jul 17, 2011
But of course, i am opened to suggestions. I have done a lot of research, and i have studied the documentation and functionalities of
so many frameworks and cmses over the years. This was not a project i started this year - i have been starting and stopping over time.
Re: The Plot To Kill Php Mysql Extension by binkabir(m): 9:19am On Jul 18, 2011
*dhtml:

But of course, i am opened to suggestions. I have done a lot of research, and i have studied the documentation and functionalities of
so many frameworks and cmses over the years. This was not a project i started this year - i have been starting and stopping over time.
very interested i think you should open in new dhtmlframework, i will be willing to be a contributor in writing API's
Re: The Plot To Kill Php Mysql Extension by binkabir(m): 9:22am On Jul 18, 2011
by the way the plot is to kill mysql extension in the core php and move it to PECL repository.
to me is not too too bad idea because using PDO is much more better concept of advanced programming and memory utilization than mysql extension.
Re: The Plot To Kill Php Mysql Extension by Nobody: 1:06pm On Jul 18, 2011
binkabir:

very interested i think you should open in new dhtmlframework, i will be willing to be a contributor in writing API's
I have almost finished writing the forms api. It works like the drupal form api where everything is in arrays. . . . . .
I have opened the website - www.dhtmlframework.com for it - i will load it by tomorow evening - the site is
still empty though.
Re: The Plot To Kill Php Mysql Extension by binkabir(m): 1:57pm On Jul 18, 2011
*dhtml:

I have almost finished writing the forms api. It works like the drupal form api where everything is in arrays. . . . . .
I have opened the website - www.dhtmlframework.com for it - i will load it by tomorow evening - the site is
still empty though.

because it's still in development stage i think you host it in SVN or CSV or gitHub so that contributor can do something meanful, putting in a website i not a good idea. wink wink wink
Re: The Plot To Kill Php Mysql Extension by Nobody: 4:43pm On Jul 18, 2011
I will do the SVN thinggy later. But it is ok to have a website for your product. We can link the git, svn and stuffs from them.
It is past developmental stage, it is now in testing stage actually.

I have finished with the form api, works really fine. It is similar to the drupal form api, but there are some bugs that drupal
have refused to fix (maybe they fixed it in drupal 7 sha) - but i got them working fine here.

All the extension types are working fine: templates, content modules, block modules, plugin modules.


I am working on the users API now. Once i am done with the users API, i am ready for people to start downloading and
testing them out.
Re: The Plot To Kill Php Mysql Extension by lojik(m): 1:28am On Jul 19, 2011
@dhtml
I like you because of the things you attempt. I remember when you coded a c++ thingy for xampp to simulate mail sending for php mail function.
I wish i had much more time, i have a lot of things i'd like to perfect and then open-source before i quit programming soon but i have my hands dipped into so many projects already.

Keep it up dhtml, we need gurus like you in Nigeria. You've been an inspiration to so many.
Re: The Plot To Kill Php Mysql Extension by Nobody: 10:44am On Jul 19, 2011
Gracias amigo. You have been a source of encouragement to me too. The said framework page should be out later today.

(1) (Reply)

My Official Website / Help Me With Payoneer / Chrome Browser Will Start Blocking Ads On February 15

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 45
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.