您的位置:首页 > 编程语言 > PHP开发

php找不到php.ini的解决办法

2012-11-08 10:54 274 查看
今天安装了一个php,用源码安装的,安装后发现没有php.ini文件,导致运行php的时候会出现一段错误

Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning,
you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home/autotest/software/php/lib/php/Smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 169

这个是时区的问题,解决方法是修改php.ini文件的date.timezone = PRC

后来发现没有php.ini文件,所以从安装目录下copy了php.ini-development或者php.ini-production到/etc/或者/usr/local/lib下,重命名为php.ini即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  PHP timezone