linux下安装ecshop

1.service httpd start
2.service mysqld start
在用PHP5.3以上的PHP版本时,只要是涉及时间的会报一个

"PHP Warning: date() [function.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 'UTC' for '8.0/no DST' instead in"
这样的错。如何解决呢

  

修改php.ini。打开php5.ini查找date.timezone 去掉前面的分号修改成为:date.timezone =PRC

  

进入mysql控制台 (mysql 改密码)
1) use mysql
2) update user set password=password('new password') where user='root';
3) flush privileges
4)登陆 /usr/bin/mysql -uroot -proot


path={ECSHOP_PATH}
cd $path;

chmod 777 cert 
#all the images folders
chmod -R 777 images 

#chmod -R 777 images/upload  
#all the data folders
chmod -R 777 data #data/afficheimg data/brandlogo data/cardimg data/feedbackimg data/packimg data/sqldata 

#all the temp folders need permission
chmod -R  777 temp 

theme=default
chmod -R 777 themes/$theme

修改{ECSHOP_PATH}为ECSHOP安装的根目录,然后运行脚本。


我看到很多人包括某些版主都推荐对temp目录权限设置为 777 ,我觉得有很大安全隐患,值得商榷。

我个人的设置是:
1.对网站所有目录设置为 755,
2.对网站所有php、htm、jpg、lbi、css、dwt文件设置为644 。
3.通过chown命令 把整个网站目录的属主改为启动apache的用户名下,并把常用管理员账户加入apache组。然后限制apache用户的登录属性。这样apache便有权限写入缓存目录,但apache用户又是无法由外部登录的。

经测试:完全正常使用,这样把外部用户的写入可能降到最低。。。看看大家还有无更好更安全的办法
原文地址:https://www.cnblogs.com/fengzhiqiangcaisangzi/p/3423578.html