linux - Php cant write files in tmp -


i'am sorry english skills, stack , need help. have old developers server , new, got php code -

<?php  // error reporting error_reporting(e_all); ini_set("display_errors", 1);  print '<pre>'; var_dump($_files); print '</pre>';  ?> <form action="/test.php" method="post" enctype="multipart/form-data">     <input type="file" name="preview" class="text" size="80" />     <input type="submit" value="send" /> </form> 

on old server create files ok, on new server did not work.i grateful advice.

i assuming new server *nix system.

when browser sends uploaded file server placed tmp folder.

when test.php move_uploaded_file() moves tmp folder correct place site.

check php.ini parameter upload_tmp_dir , check whatever folder points has correct access rights apache web server account write it.

after comment

from manual

upload_tmp_dir string  temporary directory used storing files when doing file upload.  must writable whatever user php running as.  if not specified php use system's default.  if directory specified here not writable, php falls  system default temporary directory. if open_basedir on,  system default directory must allowed upload succeed. 

so if have no setting upload_tmp_dir using system default temporary folder. probably not have correct settings allow web server account access.

also not see file uploaded in tmp folder because php destroys when script supposed processsing onto correct place tmp folder finishes. obvious security reasons! or in fact in case cannot write directory never there because basic problem.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -