PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<form enctype = 'multipart/form-data'>
<input type = 'file' name = 'upload'>
<input type = 'submit' value = 'Upload'>
</form>
And if I print_r the FILES superglobal it shows all the details, including the temp directory of where the file is on the server, in this case /var/tmp. Now if I try to edit the file that has been uploaded it's not there, and if I try to send it as an e-mail attachment, it's not there either. My latest example shows that the file is at '/var/tmp/phpYT4k4u', but it's not correct. If I do 'ls -l' in the /var/tmp directory there are only 2 files that are prefixed with 'php' and they were created months ago.
I'm not sure if this is a coding problem, or a server problem. Has anyone experienced this before?
Last edited by impulse() on Fri Mar 09, 2007 10:56 am, edited 1 time in total.
I'm editing the files using ViM, I'm attempting to e-mail them using phpmailer. Even listing the directory contents for every file prefixed with 'php' in the /var/tmp directory seconds after uploading the file doesn't show any newly created files.
If I specify the path to a file that I know exists in phpmailer, that file is sent fine. THe problem seems to be with the files not being stored in /var/tmp
All of these conditions pass and filesize returns its filesize. But if I try to move or rename the file before PHP destroys it I get:
"*WARNING*: rename(/var/tmp/phpO40N3b,/usr/local/www/data/cpp/email/crm/ste.php): No such file or directory in /usr/local/www/data/cpp/crm/email/email_new1.php on line 27
"