nginx php File not found错误

6,074浏览
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

真是很奇怪,在一台机子上装好了nginx-1.7.0、php-5.5.12,然后修改了nginx.conf,配了一个php文件存放的目录,如:/home/wwwroot,在该目录下新建了一个index.php文件,内容如下:

<?php

phpinfo();

?>

启动php-fpm和nginx服务,通过浏览器访问该php文件,发现返回的是:File Not Found. 继续阅读“nginx php File not found错误”

Message: date(): It is not safe to rely on the system’s timezone settings.

3,379浏览
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

突然碰到PHP报的一个很奇怪的错误:

A PHP Error was encountered

Severity: Warning

Message: date(): 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 the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.

Filename: models/utilities_model.php

Line Number: 52

继续阅读“Message: date(): It is not safe to rely on the system’s timezone settings.”

Windows下Apache和PHP的安装配置

6,785浏览
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

在本机的Windows环境下,有时过段时间得重新安装Apache和PHP,当然,这里安装其实是非常简单的,主要是Apache和PHP的配置比较麻烦,特别是配置对MySQL的支持,所以这里记录一下这个安装过程方便以后查看。

1、  Apache的安装

继续阅读“Windows下Apache和PHP的安装配置”

Fatal error: Call to undefined function mysql_connect()

8,998浏览
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

运行PHP数据库连接测试代码:

<?php

$connect=mysql_connect("localhost","root","root");
if(!$connect) echo "数据库连接错误!";
else echo "数据库连接成功!";
mysql_close();

?>

的时候报错:

Fatal error: Call to undefined function mysql_connect()

继续阅读“Fatal error: Call to undefined function mysql_connect()”