浮光掠影php的safe
从 http://hipop.aliapp.com迁移 好吧,本博客的开篇作,就从wp的安装说起吧。 本博客安装完成之后,有一个大问题:无法上传文件 报如下错误: Warning: copy() [function.copy]: SAFE MODE Restriction in effect. The script whose uid is 697074 is not a
从 http://hipop.aliapp.com 迁移
好吧,本博客的开篇作,就从wp的安装说起吧。
本博客安装完成之后,有一个大问题:无法上传文件
报如下错误:
Warning: copy() [function.copy]: SAFE MODE Restriction in effect. The script whose uid is 697074 is not allowed to access /wp-content/uploads owned by uid 2001 in /wp-admin/includes/file.php on line 348 Warning: copy(/wp-content/uploads/spring.jpg) [function.copy]: failed to open stream: No such file or directory in/wp-admin/includes/file.php on line 348 Warning: Cannot modify header information - headers already sent by (output started at /wp-admin/includes/file.php:348) in /wp-includes/pluggable.php on line 866
打眼一看,知道是权限问题和php安全模式在作祟。解决问题之前先认识问题,所以先让我们回忆回忆啥是“safe_mode”:
php的官方说明里如下解释:
The PHP safe mode is an attempt to solve the shared-server security problem. It is architecturally incorrect to try to solve this problem at the PHP level, but since the alternatives at the web server and OS levels aren’t very realistic, many people, especially ISP’s, use safe mode for now.
PHP的安全模式是为了试图解决共享服务器的安全问题,它(结构性错误地?)在php层上尝试解决这些问题,但因为在硬件或操作系统层上想解决这些问题不太好办,所以许多人,尤其是ISP,他们仍然在使用安全模式。
你看看,PHP自己都承认safe_mode ”incorrect“!更是在5.4.0以后的php版本中删除了这个模式 (在5.3.0会报告过时)
(ISP到底在担心什么,真的没有很好的解决方案吗,我们是否需要safe_mode?….未完待续)
推荐阅读
-
浮光掠影php的safe
-
php中抽象类在其方法中例化其子类来完成对自己方法的调用
-
PHP懂得之二:include,include_once,require,require_once之间的区别【转】
-
PHP字符串比较函数strcmp()与strcasecmp()的用法介绍
-
php 把数字转换成汉字的代码,php数字汉字代码
-
PHP 文件编程(一)-获取文件信息的二种方式
-
php调用百度百科api实现查询功能的代码实现,该怎么处理
-
php+mysql实现的二级联动菜单效果详解
-
公司接了一个PHP的项目,准备选一套开源的Framework,牛人给推荐一下,该如何解决
-
php使用mysql_query查询超大结果集超内存的解决方法,phpmysql_query_PHP教程