牛骨文教育服务平台(让学习变的简单)
博文笔记

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

创建时间:2012-11-08 投稿人: 浏览次数:2737

今天安装了一个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即可

声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。