php提示 Warning: touch() [function.touch]: Utime failed: Permission denied in错误

使用timthumb.php出现Warning: touch() [function.touch]: Utime failed: Permission denied in错误

我们先来看一下touch()函数例子

touch() 函数设置指定文件的访问和修改时间。

touch(filename,time,atime)

例子

 代码如下 复制代码

<?php
touch("test.jpg");
?>

应用例子时出现错误

用timthumb.php来做缩略图,本地测试很OK,但是放到vps上面就出现下面的错误错误提示:

Warning: touch() [function.touch]: Utime failed: Permission denied in /home/wordpress/wp-content/themes/zkeyword/library/timthumb.php on line 199
A TimThumb error has occured

The following error(s) occured:
Could note create the index.html file - to fix this create an empty file named index.html file in the cache directory.

从字面上理解,是创建缓存的cache文件没有权限,我就直接将cache的权限设为0777,但是还是不行,还是提示权限不足,进入cache目录后还有一个index.html文件,将其设为0777,问题就解决了。

时间: 2024-10-25 22:21:58

php提示 Warning: touch() [function.touch]: Utime failed: Permission denied in错误的相关文章

php include提示failed to open stream: Permission denied in错误

  出现failed to open stream: Permission denied in是apache运行用户没用权限去访问指定的文件了,所以导致目录文件打不开了. 在打开浏览器时提示 Warning: include (/global.php) [function.include]: failed to open stream: Permission denied in index.php on line 21 Warning: include() [function.include]:

Warning: session_start() [function.session-start]

我的电脑中的错误提示 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:APMServ-v5.2.6APMServ5.2.6wwwhtdocsKingNerOAuserUserKqManage.php:1) in D:APMServ-v5.2.6APMServ5.2.6wwwhtdocsKi

Warning: mssql_query() [function.mssql-query]:

Warning: mssql_query() [function.mssql-query]: message: 不能用 DB-Library(如 ISQL)或 ODBC 3.7 或更早版本将 ntext 数据或仅使用 Unicode 排序规则的 Unicode 数据发送到客户端. (severity 16) in F:\myweb\lzlj\cn.php on line 21 Warning: mssql_query() [function.mssql-query]: Query failed

PHP错误WARNING: SESSION_START() [FUNCTION.SESSION-START]解决方法_php技巧

做开发的时候,操作session有时候会遇到这个问题:Warning: session_start() [function.session-start]-- 系统环境:WIN2003+IIS6+PHP5.2.12 PHP出现类似如下错误: Warning: session_start()[function.session-start]: ...... failed: No such file or directory......等情况, 可以偿试修改一下php.ini文件中的session.au

Warning: mssql_connect() [function.mssql-connect]:

我是这样做的,确定mssql是正常的用户名密码也可以,但下面就是不行. <?php教程  $con=mssql_connect( "localhost", "sa ", "123456 ") or die ('error');    ?>  错误提示  warning: mssql_connect() [function.mssql-connect]: unable to connect to server: $sa in d:php

Warning: session_start() [function.session-start]: open_basedir restriction in effect. File解决方法

Warning: session_start() [function.session-start]: open_basedir restriction in effect. File解决方法 Warning: include() [function.include]: open_basedir restriction in effect. File(/www/webpublic_html/admin/inc/inc.php教程) is not within the allowed path(s)

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 今天文件上传出现Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move   <form action="" enctype="multipart/form-data" method="post"&

php Warning:strstr()[function.strstr]:Empty delimiter

Warning: strstr() [function.strstr]: Empty delimiter 非常奇怪,难道php函数strstr的某个参数出问题了? 于是写了个测试的例子  代码如下 复制代码 <?php $text="asdfghjklqwertyuiopzxcvbnm"; //$key="g"; //根据php错误提示Empty delimiter,判断应该不会是$text的值出问题,所以故意注释了key值 if(strstr($text,

Warning: session_start() [function.session-start]: Cannot send session cookie解决办法

在很多时间使用了session就会出来如下提示了, Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/u114264/include/db_mysql教程.class.php教程:1) in /home/u114264/login1.php on line 3 Warning: sessio