Deprecated:function eregi() is deprecated in /usr/local/apache/libraries/lib_lang.php on line 8

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:

 

Deprecated:function eregi() is deprecated in /usr/local/apache/libraries/lib_lang.php on line 8

Deprecated :意思是“不推荐”
php 5.3 从一方面来讲,可以说在07年计划PHP6的中的一个pre版本,增加了很多功能,统一了很多语法,使

PHP变得更加强大与简洁。
说到统计架构规划,PHP当然会对一些别名,重复功能function进行归类整理,并把一些不用的正式在php 5.3

以后删除掉.故不建议在新项目继续使用.
PHP 5.3 有两个deprecated,
E_DEPRECATED and E_USER_DEPRECATED
以下是在旧的项目中会在php 5.3以后碰到的问题
? define_syslog_variables
? register_globals
? register_long_arrays
? safe_mode
? magic_quotes_gpc
? magic_quotes_runtime
? magic_quotes_sybase
? 在PHP.ini 注释用#已经不再建议使用.
Deprecated functions:
? call_user_method() 可以用 call_user_func() 替代
? call_user_method_array() 可以用 call_user_func_array() 替代define_syslog_variables()
? dl() 反对在使用DL加载扩展,php5.3 以后应用php.ini配制
? ereg() 可以用 preg_match() 替代
? ereg_replace() 可以用 preg_replace() 替代
? eregi() 用 preg_match() i 参数替代
? eregi_replace() 用 preg_replace() i 参数替代
? set_magic_quotes_runtime() 用 magic_quotes_runtime() 替代
? session_register() session_unregister() session_is_registered()
? 以上三个统一用 $_SESSION 替代
? set_socket_blocking() 用 stream_set_blocking() 替代
? split() 用 preg_split() 替代
? spliti() 用 preg_split() 模式 ‘i’ 替代
? sql_regcase()
? mysql_db_query() 用 mysql_select_db() mysql_query() 替代mysql_escape_string() 用 use

mysql_real_escape_string() 替代
? 关于时区处理,统一用Timezone对像
Deprecated features:
?直接返加new 实例不再建议使用. PHP 6 将不再支持
?Call-time pass-by-reference 参数现在不再建议使用 PHP 6 将不再支持
?用 {} 访问字符串顺序不再建议使用. 统一用 [] 代替. PHP 6 将不再支持

当然如果项目紧急,又要在php 5.3 使用以上方法,可以用下面的方法去做
在php.ini 增加
cd /home/jiania/lnamp/php530/etc/php.ini
php_flag allow_call_time_pass_reference On
php_value error_reporting “E_ALL & ~E_NOTICE & ~E_DEPRECATED”

本文转自linux博客51CTO博客,原文链接http://blog.51cto.com/yangzhiming/840289如需转载请自行联系原作者


yangzhimingg

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
SQL Java HIVE
【解决方案】Hive启动时报错 Logging initialized using configuration in jar:file:/usr/local/apache-hive-1.1.0-bin
【解决方案】Hive启动时报错 Logging initialized using configuration in jar:file:/usr/local/apache-hive-1.1.0-bin
800 0
【解决方案】Hive启动时报错 Logging initialized using configuration in jar:file:/usr/local/apache-hive-1.1.0-bin
|
PHP Windows
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
125 0
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
|
消息中间件 PHP
laravel6 使用rabbitmq报错:Call to a member function make() on null at Queue\\Jobs\\Job.php:215
laravel6 使用rabbitmq报错:Call to a member function make() on null at Queue\\Jobs\\Job.php:215
132 0
|
存储 PHP
PHP 零基础入门笔记(9):函数 function
PHP 零基础入门笔记(9):函数 function

热门文章

最新文章

推荐镜像

更多