Comments starting with # are deprecated in Unknown on line 1

WBOY
发布: 2016-06-23 13:14:59
原创
1206 人浏览过

ErrorException [ 8192 ]: Comments starting with '#' are deprecated in Unknown on line 1

8192   E_DEPRECATED (integer)   运行时通知。启用后将会对在未来版本中可能无法正常工作的代码给出警告。   since PHP 5.3.0

错误码来自:http://www.jb51.net/article/47793.htm

应该是新版本的PHP出现的一个mysql推荐用mysqlli和pdo提示的问题,把错误关掉,再打开就好了,这块儿可能PHP还是有点问题:

error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);//解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:                                                                                                  

ini_set('display_startup_errors', 0);

ini_set('display_errors', 0);

I setup an Ubuntu system with nginx and php, but i noticed a strange error.

Every time i run something php related in the console i get this strange error:

PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0

I googled for some minutes and found why is that happening and how to fix it. The solution is open the file:

vi /etc/php5/cli/conf.d/ming.ini

and replace the “#” in the first line with “;” and that will fix the “warning”.

使用新立得装的PHP,但是每次我在命令行下执行php脚本时都会出如下的警告信息:

PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0

上网查了一下,原来是新版本的PHP不赞成用'#'号作为注释符号,需要用分号';'。打开这个文件,把里面的#替换成;号,问题解决!

来自:http://blog.163.com/mity_rui@126/blog/static/109813618201522525339369/

http://www.r00t.gr/how-to-fix-php-deprecated-comments-starting-with-are-deprecated-in-etcphp5cliconf-dming-ini-on-line-1-in-unknown-on-line-0/

来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板