Jump to content


Photo

Problems uploading files after moving to production server.


  • Please log in to reply
6 replies to this topic

#1 elmr

elmr

    Jr. Member

  • Members
  • PipPip
  • 10 posts
  • 0

Posted 29 November 2011 - 01:16 PM

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

#2 Nico Knoll

Nico Knoll

    The Boss.

  • Members
  • PipPipPipPipPip
  • 644 posts
  • 235

  • LocationBerlin, Germany

Posted 29 November 2011 - 03:36 PM

I had the same problem. http://processwire.c...opic,673.0.html

Could you post the path to a phpinfo() file?

#3 Nico Knoll

Nico Knoll

    The Boss.

  • Members
  • PipPipPipPipPip
  • 644 posts
  • 235

  • LocationBerlin, Germany

Posted 29 November 2011 - 03:37 PM

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));


#4 elmr

elmr

    Jr. Member

  • Members
  • PipPip
  • 10 posts
  • 0

Posted 29 November 2011 - 06:08 PM

Thank you Nico! This one did the trick :-)

#5 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,526 posts
  • 854

  • LocationVihti, Finland

Posted 30 November 2011 - 01:04 AM

Not sure, but isn't this already fixed in latest versions? Should be no need for editing core files for this.

#6 elmr

elmr

    Jr. Member

  • Members
  • PipPip
  • 10 posts
  • 0

Posted 30 November 2011 - 02:54 AM

apeisa you're right. My version was about 2 months old, that's why it didn't work...

#7 Nico Knoll

Nico Knoll

    The Boss.

  • Members
  • PipPipPipPipPip
  • 644 posts
  • 235

  • LocationBerlin, Germany

Posted 30 November 2011 - 01:40 PM

Was changed after we found a solution as I had this problem ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users