php.ini-development 重命名后
问题1:
phpinfo();函数不能正常显示
出现了如下错误:
PHP Warning: phpinfo() [<a href=’function.phpinfo’>function.phpinfo</a>]: 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 ‘UTC’ for ‘8.0/no DST’ instead in F:\yikayphpcms\wwwroot\user\p.php on line 2
查php.ini
行:date.timezone =为空
改成 date.timezone =Asia/Shanghai 就好了。(有些人碰上这问题是因:disable_functions =里面将此函数给禁了)
问题2: 连接mysql的文件页面报错。
Fatal error: Call to undefined function mysql_connect()
extension=php_mysql.dll
extension=php_mysqli.dll 之类的前面的;已经去除。
原因是
; On windows:
extension_dir 处的路径写的有问题,应改为 “ext” 。
问题3:验证码不显示了。
搜索网上均是说打开php.ini文件,搜索“extension=php_gd2.dll”,将其前面的分号“;”去掉,保存文件,然后重启Apache服务器,这样即可打开GD库。
但我的这个是开着的。网址直接访问验证码页 显示如下错误
PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: open(C:\Windows\TEMP\sess_15cnmptris89nkcmnd2uttgkb3, O_RDWR) failed: Permission denied (13) in F:\yikayphpcms\wwwroot\user\checkcode\checkcode.php on line 18 PHP Warning: Unknown: open(C:\Windows\TEMP\sess_15cnmptris89nkcmnd2uttgkb3, O_RDWR) failed: Permission denied (13) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
到
C:\Windows\TEMP\
删此文件后,再访问,好了。