Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Uploaded files (images, attachments, etc) get deleted after some time or become inaccessible

Author: Edward Hardin Reference Number: AA-00522 Views: 10678 Last Updated: 03/26/2013 02:40 PM 0 Rating/ Voters

The reason for this is, the uploaded file will inherit the permissions of the directory specified in the directive "upload_tmp_dir" of php.ini. (if this directive isn't set, the default of C:\Windows\Temp is used on Windows).

You can resolve this by granting the "Users" user group full access (including read, write, and modify permissions) to your temporary upload directory on Windows, or set 755 or 777 permissions on Linux/Unix.

First of all, let's open phpinfo page via browser to see current settings for the "upload_tmp_dir" directive.


How to view phpinfo?

If you do not have a phpinfo page like shown on the screenshot above, you can easily create it.

  1. Open the web root folder (e.g. C:\inetpub\wwwroot\).
  2. Create a text file named info.php.
  3. Edit this file in any plain-text editor (e.g. notepad).
  4. Put the following text to it:
    <?php phpinfo(); ?>
  5. Open this file via your browser (e.g. http://localhost/info.php).

Open this directory permissions (in our case it is C:\PHP\upload\) and add full permissions to the "Users" user group (on a Windows server) or 777 or 755 permissions (on a Linux/Unix server).


Custom Fields
Applicable to these operation systems:Linux/Unix, Windows