Php prompts the following error: Warning: touch () [function. touch]: Utime failed: Permission denied in:

Source: Internet
Author: User
Tags touch

When timthumb. php is used, the following error occurs: Warning: touch () [function. touch]: Utime failed: Permission denied in.

Let's take a look at the touch () function example.

The touch () function sets the access and modification time of the specified file.

Touch (filename, time, atime)

Example

The code is as follows:

<? Php
Touch ("test.jpg ");
?>

An error occurred in the application example.

Use timthumb. php for thumbnails. The local test is OK, but the following error message is displayed when you put it on the 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:
Cocould note create the index.html file-to fix this create an empty file named index.html file in the cache directory.

The hosts file is set to 0777, and the problem is solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.