>  기사  >  백엔드 개발  >  Comments starting with # are deprecated in Unknown on line 1

Comments starting with # are deprecated in Unknown on line 1

WBOY
WBOY원래의
2016-06-23 13:14:591207검색

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/

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.