Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-28-2009, 04:45 PM   #1
LQ Newbie
Registered: Apr 2007
Posts: 2

Rep: Reputation: 0
Uploaded files from PHP app are dissapearing on new ubuntu server

Does any one know which log to look at on a ubuntu server of this type of problem. I edited the PHP.ini to allow files larger than 2M.

upload_max_filesize = 1024MB
upload_tmp_dir = no value
user_dir = no value
post_max_size = 1024MB

Before I made changes to php.ini I was getting a file not found errors. Now the PHP app seems to send the file but I cant find it any were on the server. I have set the /var/www/vault/vwdmo directory to 777
with chmod 777 vwdmo.

drwxrwxrwx 2 synchro synchro 4096 2009-03-27 14:30 vwdmo

I use PHPrunner4.2 to generate the code it work on Red Hat 4 but I need to get it to work on Ubuntu 5.2.6

Thanks for any help.
Old 03-29-2009, 02:55 AM   #2
LQ Newbie
Registered: Jan 2007
Distribution: Redhat, Debian, "Custom"
Posts: 27

Rep: Reputation: 15
  • Explicitly set the upload temp directory (you can do this in php.ini or apache)
  • If you use open_basedir, make sure the upload temp directory is included.
  • Use PHP to echo information from the $_FILES array about the temporary path of the file -- confirm it is what you expect.
Old 03-29-2009, 07:39 AM   #3
Registered: Jan 2002
Location: Labrador, Canada
Distribution: CentOS, Debian
Posts: 182

Rep: Reputation: 35
- And check Apache's error & access logs, and any PHP log that might be configured in php.ini.
Old 03-30-2009, 11:53 PM   #4
LQ Newbie
Registered: Apr 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Need more info

I made the chnge to php.ini. I set the temp dir to /var/tmp. I still have the same problem. The php application generate a "Record was added" message but never moves the file to any directory. It supose to go to the /var/www/valut/vwdmo directory. I am realy unclear on how to the system to generate an error I look. I could not find a log for php or apache. where are these log files?

// move files
foreach ($files_move as $file)
$message="<div class=message><<< "."Record was added"." >>></div>";
$message = $usermessage;
Old 04-01-2009, 02:47 AM   #5
LQ Newbie
Registered: Jan 2007
Distribution: Redhat, Debian, "Custom"
Posts: 27

Rep: Reputation: 15

Read the first four links at

Especially important is the second link,

To debug your code, you need to use the information from the $_FILES array

Until your code includes comparisons with at least the UPLOAD_ERR_OK constant, you're probably not dealing with the PHP file upload status.

When uploads fail in PHP, they won't necessarily generate warnings or errors, but do read about those file upload errors (examples are provided). Doing this should help provide more information about your problem.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Automatically Scan Uploaded Files For Viruses With php-clamavlib LXer Syndicated Linux News 0 01-14-2007 10:54 AM
Space Keeps Dissapearing on my server DJOtaku Linux - General 1 04-22-2006 10:17 PM
Files dissapearing!!!!! stormrider_may Linux - Security 10 03-31-2006 11:55 AM
Dissapearing Files Diminished7th Slackware 6 12-26-2005 04:15 PM
How to keep the original time of files uploaded to FTP server wondial Linux - Software 1 10-26-2004 10:12 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration