elmr Posted November 29, 2011 Share Posted November 29, 2011 Hi, I'm having problems with uploading files after moving PW to another server. Everything works well on one server, but on the other when I try to upload any file (image/text file etc.) the progress bar goes to 100% and nothing happens (no thumbnail is being created, no description field shows up). I'm sure that all permissions are ok also $config->debug = true and logs/error.txt doesn't show any errors. Safe mode is off. Also was trying with code from another topic : <?php error_reporting(E_ALL); ini_set("display_errors", 1); $target = "./site/assets/files/1/test.php"; copy("./test.php", $target); if(is_file($target)) { echo "\nfile was copied"; unlink($target); } else { echo "\nfile was not copied -- what error message did you get?"; } and it was successfull ("file was copied"). Do you have any other idea how could I debug the problem ? Thanks, Elmr Link to comment Share on other sites More sharing options...
Nico Knoll Posted November 29, 2011 Share Posted November 29, 2011 I had the same problem. http://processwire.com/talk/index.php/topic,673.0.html Could you post the path to a phpinfo() file? Link to comment Share on other sites More sharing options...
Nico Knoll Posted November 29, 2011 Share Posted November 29, 2011 Try this: Change line 122 in "wire/core/Upload.php" from: $tmpName = tempnam(sys_get_temp_dir(), get_class($this)); to: $tmpName = tempnam(ini_get('upload_tmp_dir'), get_class($this)); Link to comment Share on other sites More sharing options...
elmr Posted November 29, 2011 Author Share Posted November 29, 2011 Thank you Nico! This one did the trick Link to comment Share on other sites More sharing options...
apeisa Posted November 30, 2011 Share Posted November 30, 2011 Not sure, but isn't this already fixed in latest versions? Should be no need for editing core files for this. Link to comment Share on other sites More sharing options...
elmr Posted November 30, 2011 Author Share Posted November 30, 2011 apeisa you're right. My version was about 2 months old, that's why it didn't work... Link to comment Share on other sites More sharing options...
Nico Knoll Posted November 30, 2011 Share Posted November 30, 2011 Was changed after we found a solution as I had this problem Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now