情难自禁是什么意思| 起什么网名好听| 1r是什么意思| 益是什么意思| 心率变异性是什么意思| 卵巢是什么| 送产妇什么礼物最合适| 嘴角起泡用什么药膏好| 天然气什么味道| 干咳吃什么药止咳效果好| 首鼠两端什么意思| 六尘不染的生肖是什么| 看男性性功能挂什么科| 夸奖的近义词是什么| 爱什么分明| 芒硝是什么东西| 狻猊是什么动物| 子宫破裂有什么危险| 电焊打眼睛用什么眼药水| 927什么星座| 什么是鸡尾酒| 一直倒霉预示着什么| 青少年流鼻血是什么原因引起的| 狗不能吃什么东西| 为什么会长痱子| 手爆皮是什么原因| 7777什么意思| vk是什么| 小叶增生吃什么药好| 决明子和什么搭配最好| 红外线是什么| 烧伤病人吃什么恢复快| 鸡属于什么类动物| 台甫是什么意思| 2002年什么年| 冠脉硬化什么意思| 7.15什么星座| 爸爸的姐姐叫什么| 什么是飞机杯| 医院医务科是干什么的| 老年人吃什么奶粉好| 鼻梁高的男人说明什么| 仔字五行属什么| 唯美是什么意思| 什么的跳舞| 房颤与早搏有什么区别| 东北方向五行属什么| 梦见拉麦子是什么预兆| 什么的娃娃| 属蛇的是什么命| 乳岩是什么病| 这个季节种什么菜合适| ella是什么意思| 甲钴胺片是什么药| 凤是什么意思| 氨咖黄敏胶囊主治什么| 苯佐卡因是什么| 1940年属什么生肖| 眼睛眼屎多是什么原因| 海白菜是什么菜| 今天什么日子| 肛门坠胀吃什么消炎药| 05是什么生肖| 肉什么结构| 出品是什么意思| 淋巴结有什么症状| 马赛克什么意思| 手指甲发白是什么原因| 肉碱是什么| 八是什么生肖| geo是什么意思| 蚂蚁为什么会咬人| 为什么感冒药吃了想睡觉| 迈巴赫是什么车| 灶性肠化是什么意思| 喉咙扁桃体发炎吃什么药| 放风是什么意思| 膝盖内侧疼吃什么药| 跖围是什么意思| 指甲上的白色月牙代表什么| 为什么小便是红色的尿| 双侧乳腺腺病是什么意思| 常态是什么意思| 血管夹层是什么病| 嘴巴里发苦是什么原因| 小孩掉头发是什么原因引起的| 翼龙吃什么食物| 手皮脱皮是什么原因| 老母鸡煲汤放什么食材补气补血| 妇科假丝酵母菌是什么病| 扁桃体炎吃什么消炎药| 糖耐量受损是什么意思| 小孩子眼睛眨得很频繁是什么原因| 丙子日是什么意思| 警告处分有什么影响| 泥淖是什么意思| 灸石门为什么会不孕| 抹茶是什么做的| 七月九号是什么日子| 头上的旋有什么说法| 子欲养而亲不待是什么意思| 戒指戴无名指是什么意思| 淀粉样变性是什么病| 别开生面是什么意思| 锑是什么| 偏头痛有什么症状| alpha是什么意思| 鸳鸯浴是什么意思| 慢性炎伴鳞化是什么意思| 为什么会晒黑| 喉咙有痰吃什么药| 从胃到小腹连着疼是什么原因| 骨髓捐赠对自己有什么影响没有| 胆结石吃什么药可以化掉结石| 梦见自己被抢劫了预示什么| 小猫咪能吃什么| 夏天喝绿茶有什么好处| 七月二十八什么星座| 宫颈多发纳囊什么意思| 肠胃炎是什么引起的| 土豆粉是什么做的| 吃什么缓解孕吐| 肛门瘙痒涂什么药膏| 无名指下面的竖线代表什么| 月寸读什么| 为什么不想上班| 降血压喝什么茶| 小狗什么时候断奶| 定坤丹适合什么人吃| 笑点低是什么意思| 可以是什么意思| bac是什么意思| 世子是什么意思| 后脑勺发麻是什么原因| 维生素d3什么牌子好| 什么东西越剪越大| 吐黄水是什么原因| 2r是什么意思| 女生安全期是什么意思| pca是什么意思| 蛋白粉什么时候喝| 下巴下面是什么部位| 黄金的动物是什么生肖| 脑鸣挂什么科| 在什么什么后面| 吃什么东西可以减肥| 淋巴结核是什么病| 着床成功后有什么症状或感觉| 高是什么意思| 重阳节应该吃什么| 经常胃胀气是什么原因引起的| 2月18号什么星座| 阴道口瘙痒是什么原因| 吃什么有助于骨头愈合| 阴虚吃什么水果| 鸭子炖汤和什么一起炖最有营养| 焦虑症看什么科室| 88年的属什么| 1931年属相是什么| 照猫画虎什么意思| 早上11点是什么时辰| 什么食物富含维生素b| 看乳腺挂什么科| apl医学上是什么意思| 吹面不寒杨柳风什么意思| 饭前吃药和饭后吃药有什么区别| 咖啡加奶有什么坏处和好处| 提手旁的字与什么有关| 胃不舒服可以吃什么水果| 暗是什么生肖| 月经量少吃什么药| 三个龙读什么| 做肠镜要挂什么科| 牙龈炎吃什么药最有效| 急性肠胃炎是什么原因引起的| hairy什么意思| 苦荞有什么作用| 陈皮和橘子皮有什么区别| 皮肤黑穿什么颜色的衣服显白| 2014年是什么年| 大口什么字| 老鼠屎长什么样子| 什么水果补钾| 吃什么食物补钙| 胎儿脉络丛囊肿是什么原因引起的| 做梦梦见掉牙齿是什么意思| 脚心烧是什么原因| 人心惶惶是什么意思| 凌晨三点醒是什么原因| 脑白质病变吃什么药| 花中四君子是什么| 红烧肉配什么菜好吃| 男人喝什么酒壮阳最快| 腹部包块是什么样子的| 胸部正位片检查什么| diy是什么| 舔是什么意思| 流鼻血是什么原因引起的| 药引子是什么意思| 牙齿酸是什么原因| 颈椎病吃什么药效果好| 活检是什么意思| 黄鼠狼最怕什么| 啤酒和什么不能一起吃| 巨人观是什么意思| 水鱼是什么意思| 筋膜炎有什么症状| 血沉高是什么意思| 王八吃什么| 摩托车代表什么生肖| 右耳朵痒是什么预兆| 已佚是什么意思| 盐水洗脸有什么好处| 脱节是什么意思| 电脑什么牌子好| 印度是什么人种| 漂头发是什么意思| 给产妇送什么礼物好| 铁什么时候吃| 吃了头孢不能吃什么| 吃什么药能推迟月经| 白癜风是什么病| 打呼噜是什么原因造成的| 舌苔很白是什么原因| 卵巢囊性暗区是什么意思| 味精的主要成分是什么| 湍急是什么意思| 落魄是什么意思| 雍正姓什么| 蟑螂怕什么| 6月7日是什么星座| 感冒为什么不能吃鸡蛋| 白凉粉是什么| 抹布什么意思| 职称有什么用| 世界上最高的高原是什么| 布洛芬缓释胶囊有什么副作用| 什么沐浴露好用| 旅长是什么军衔| 何曾是什么意思| 儿童咳嗽吃什么消炎药| 两肺纹理增多模糊是什么意思| 牙龈为什么会肿痛| 靶向药有什么副作用| 血沉偏高说明什么| 1941属什么生肖| 蝈蝈吃什么食物| 口干口臭口苦吃什么药| 解落三秋叶的解是什么意思| 介错是什么意思| 85年属什么的| 胃糜烂吃什么药效果好| 脚踝肿挂什么科| 神经性皮炎是什么| 壁虎吃什么| 12年属什么| 来龙去脉是什么生肖| 食管反流用什么药效果好| 什么叫国学| 瞑眩反应是什么意思| 睡眠不好去医院挂什么科| 怀孕初期吃什么蔬菜好| 胎盘内血池是什么| amiri是什么牌子| 百度
rfc:mysql_deprecation

什么蚂蚁有毒

百度 而今天人类社会正在进入一个新的人工智能时代。

This RFC proposes to generate E_DEPRECATED errors when connecting to a MySQL database with the ext/mysql API.

Voting

Please note that there are two questions below: please vote on both if possible. The first controls the direct result of this RFC, while the second is to provide guidance should the RFC be rejected.

Should ext/mysql generate E_DEPRECATED errors in PHP 5.5?
Real name Yes No
ab (ab)  
aharvey (aharvey)  
alan_k (alan_k)  
arpad (arpad)  
auroraeosrose (auroraeosrose)  
bjori (bjori)  
datibbaw (datibbaw)  
derick (derick)  
dragoonis (dragoonis)  
frozenfire (frozenfire)  
googleguy (googleguy)  
gwynne (gwynne)  
hradtke (hradtke)  
indeyets (indeyets)  
ircmaxell (ircmaxell)  
jpauli (jpauli)  
juliens (juliens)  
kalle (kalle)  
kriscraig (kriscraig)  
levim (levim)  
lstrojny (lstrojny)  
mfonda (mfonda)  
mike (mike)  
nikic (nikic)  
olemarkus (olemarkus)  
pajoye (pajoye)  
patrickallaert (patrickallaert)  
peehaa (peehaa)  
philip (philip)  
rasmus (rasmus)  
rdohms (rdohms)  
remi (remi)  
rmlr (rmlr)  
salathe (salathe)  
tony2001 (tony2001)  
uw (uw)  
willfitch (willfitch)  
Final result: 25 12
This poll has been closed.

There are four options available for the next question:

If the vote to make ext/mysql generate E_DEPRECATED errors is unsuccessful, what course of action do you think we should take?

  • (a) Enhance the manual text to make the soft deprecation clearer, and generate E_DEPRECATED notices in PHP 5.6.
  • (b) Enhance the manual text to make the soft deprecation clearer, but take no further action in terms of E_DEPRECATED for the forseeable future.
  • (c) Remove the warnings from the manual and undeprecate ext/mysql entirely.
  • (d) Do nothing.
If the vote to make ext/mysql generate E_DEPRECATED errors is unsuccessful, what course of action do you think we should take?
Real name (a) (b) (c) (d)
ab (ab)    
aharvey (aharvey)    
alan_k (alan_k)    
arpad (arpad)    
auroraeosrose (auroraeosrose)    
bjori (bjori)    
datibbaw (datibbaw)    
derick (derick)    
dragoonis (dragoonis)    
frozenfire (frozenfire)    
googleguy (googleguy)    
gwynne (gwynne)    
hradtke (hradtke)    
indeyets (indeyets)    
ircmaxell (ircmaxell)    
jpauli (jpauli)    
juliens (juliens)    
kalle (kalle)    
kriscraig (kriscraig)    
levim (levim)    
lstrojny (lstrojny)    
mfonda (mfonda)    
mike (mike)    
olemarkus (olemarkus)    
pajoye (pajoye)    
patrickallaert (patrickallaert)    
peehaa (peehaa)    
philip (philip)    
rasmus (rasmus)    
rdohms (rdohms)    
remi (remi)    
rmlr (rmlr)    
salathe (salathe)    
sebastian (sebastian)    
stas (stas)    
tony2001 (tony2001)    
uw (uw)    
willfitch (willfitch)    
Final result: 26 12 0 0
This poll has been closed.

Background

In July 2011, Philip started a discussion on the Internals mailing list around the path forward for deprecating ext/mysql, as had been discussed informally for many years. It was agreed at the time that the first step would be to add warnings to the manual, which was done in June.

At the time, it was suggested that we revisit not adding deprecation errors to php-src until 5.5/6.0. Ergo, this RFC.

Proposed Action

As a subsequent step, I propose that we generate E_DEPRECATED errors when users connect to MySQL: whether through mysql_connect(), mysql_pconnect() or the implicit connection functionality built into ext/mysql.

An extremely trivial patch to do this is available.

The proposed wording of the deprecation message is:

The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

Why?

I'll quote from last year's discussion, rather than writing a long screed myself.

Philip wrote:

The documentation team is discussing the database security situation, and educating users to move away from the commonly used ext/mysql extension is part of this.

Later, Johannes wrote:

Moving away from ext/mysql is not only about security but also about having access to all features of the MySQL database.

ext/mysql was built for MySQL 3.23 and only got very few additions since then while mostly keeping compatibility with this old version which makes the code a bit harder to maintain. From top of my head missing features not support be ext/mysql include:
  * Stored Procedures (can't handle multiple result sets)
  * Prepared Statements
  * Encryption (SSL)
  * Compression
  * Full Charset support
  * ... 


So moving away from ext/mysql is a good thing.

None of those reasons have gone away.

Ulf Wendel has also written a terrific blog post explaining why upgrading from ext/mysql is a good idea. For eaxmple: both MySQLi and PDO include support for prepared statements, and MySQLi also includes support for asynchronous queries.

Furthermore, Johannes Schlüter, in response to a question about whether the extension was really broken, said:

ext/mysql is hard to maintain code. It is not not getting new features. Keeping it up to date for working with new versions of libmysql or mysqlnd versions is work, we probably could spend that time better.

Why Not? (Other Options)

Arguments against raised on Internals include the following:

Documentation

The current warning in the manual is very weakly worded once you get past the red warning box. That could be beefed up considerably to achieve the same effect in terms of migration without annoying users with notices.

Large Existing Codebase (Too Soon)

There is also a huge amount of code out there that relies on ext/mysql. At the very least, a compatibility library will need to be developed if ext/mysql is to ever be unbundled.

As Anthony Ferrara said on why he believes it's too soon:

My standpoint would be not to add E_DEPRECATED notices in 5.5... It's simply used too much to start loudly complaining about it. Instead, what I would suggest is the following:

1. Officially deprecate it now. Right now, on the docs it says “discouraged”, but I would suggest changing that to officially deprecated.
2. The next release (5.6 or 6) would add deprecation errors to the code.
3. The next release (5.7 or 6 or 6.1, etc) would then remove the extension entirely.

That way there's a significant roadmap towards deprecation, and people can migrate their code in tune. Sure, there are people who won't do anything and will break on that major release, but there's not much we can do about that anyway...

Additionally, a concern is that every deprecation action increases the difficulty for users of upgrading PHP versions with their existing codebases.

Frameworks

Related to the above, some frameworks and commonly used products still require ext/mysql without any option to use MySQLi or PDO: notable examples include WordPress and Plesk.

Tutorials

There are thousands of tutorials out there that teach users PHP using ext/mysql. Many of these tutorials also teach other outdated practices, such as magic quotes, improper (or no) escaping of user input and use of register globals, but undoubtedly some are also still of value. Removing ext/mysql in future will make these tutorials at best useless, and at worst, impediments to PHP takeup.

We Could Move It To PECL Now

Another argument is that ext/mysql could be unbundled in PHP 5.5 and moved straight to PECL.

E_DEPRECATED Is Inappropriate

Concerns were raised that the normal deprecation process isn't appropriate for such a widely used extension. Again, quoting Anthony Ferrara:

There's one important thing that I think you all are missing here. You keep bringing up that we should just use the normal “deprecation” process. The problem is that the deprecation process was never designed for a feature like this.

Look at what was deprecated and removed so far. We deprecated register globals and magic quotes. The process worked there. But was it because of the process? Or was it because those features were already dead by that point. Think of this: when 5.3 shipped (introducing E_DEPRECATED for those features), how many current versions of open source tools relied on those features? None.

Now, you could point to call-time-pass-by-reference as well. E_DEPRECATED was added in 5.3 for it. But most of the projects that used it only used it in a few minor places. The majority of usages were relatively isolated.

Now, look at ext/mysql. The landscape is completely different. Major projects still rely on it in their most recent versions. Wordpress's latest trunk uses ext/mysql. And as was said here, it's not a trivial change to switch from mysql to mysqli or PDO. ext/mysql is still very heavily relied upon.

What I would suggest, is not adding E_DEPRECATED for 5.5. Instead, officially deprecate it in the docs. Then start a PR campaign to get projects like WP to switch away from it. Get the word out there as much as possible. Then in 1 to 2 years when 5.6/6 is released, add E_DEPRECATED.

It's Not Broken

Quoting ángel González:

The extension is not broken. The problem is the bad usage. It can be used safely, and good developers have been doing so for ages, by creating php wrappers. In magic quotes, the work has been the opposite. The developers had been detecting the feature in php and *disabling* it.

Hosting Providers Don't Provide Alternatives

No numbers were provided for this, but an additional concern is that hosting providers almost universally provide ext/mysql, but the deployment state of MySQLi and PDO is less certain.

Possible Future Action

Some future release of PHP will presumably unbundle ext/mysql, at which point it can be moved out to PECL to slowly bitrot. That future release is not part of this RFC, however.

Workarounds

Converting to MySQLi or PDO

Suppressing deprecation warnings

While code is being converted to MySQLi, E_DEPRECATED errors can be suppressed by setting error_reporting in php.ini to exclude E_DEPRECATED:

  error_reporting = E_ALL ^ E_DEPRECATED

Note that this will also hide other deprecation warnings, however, which may be for things other than MySQL.

Changelog

  • 1.2.1 (2025-08-07): Update status to Implemented.
  • 1.2 (2025-08-07): Close voting; attempt to summarise the arguments on Internals into a few paragraphs; add links to the discussions for avid readers.
  • 1.1.2 (2025-08-07): Replace the Oracle Wiki link with a link to Ulf's new blog post; moved to voting phase.
  • 1.1.1 (2025-08-07): Added the wording of the deprecation message that was already in the patch.
  • 1.1 (2025-08-07): Added workarounds; fixed formatting on the quote of Johannes' e-mail.
  • 1.0 (2025-08-07): Initial version.
rfc/mysql_deprecation.txt · Last modified: by 127.0.0.1

?
舌下含服是什么意思 惊蛰后是什么节气 韭菜什么时候种最好 再接再厉后面接什么好 什么人容易得布病
来来来喝完这杯还有三杯是什么歌 亏电是什么意思 阿司匹林什么时候吃最好 冠状沟是什么位置 鱿鱼炒什么好吃
三眼花翎是什么意思 姜太公钓鱼愿者上钩是什么意思 ccu是什么病房 验血脂挂什么科 神经衰弱吃什么好
黄河水为什么是黄的 头疼一般是什么原因引起的 rt什么意思 松子是什么树的果实 什么的雪人
四月18号是什么星座的hcv8jop3ns1r.cn 敌是什么生肖bjhyzcsm.com 木甚念什么hcv9jop3ns1r.cn 鱼上浮的原因是什么hcv7jop9ns7r.cn 什么不安hcv8jop9ns5r.cn
想要什么样的爱baiqunet.com 小孩夜里哭闹是什么原因beikeqingting.com 74年大溪水命缺什么hcv9jop2ns1r.cn pettm和pe有什么区别hcv9jop6ns5r.cn 臻字五行属什么的hcv7jop5ns4r.cn
牙龈经常出血是什么原因hcv8jop8ns6r.cn 吃什么降糖最快hcv9jop2ns3r.cn 甲午五行属什么jasonfriends.com 吃什么东西会长胖hcv9jop1ns5r.cn 经常吃土豆有什么好处hcv7jop9ns9r.cn
内分泌失调吃什么药好hcv9jop8ns0r.cn 朝拜的意思是什么hcv8jop2ns8r.cn 经期喝什么汤hcv7jop6ns5r.cn 艾特是什么意思hcv8jop1ns7r.cn 窦炎症是什么病hcv8jop3ns1r.cn
百度