One issue that cited this error, along with another, was marked as duplicate and closed. The issue it was supposedly a duplicate of was marked as fixed back in february, and doesn't actually seem to address this particular error. Seemed best to open a new issue devoted specifically to this issue, but if not, I can reopen one of the others.

On bulk upload, I'm getting the following error. Anywhere from 2 to perhaps a dozen files will upload before the error stops. The uploader ticks through all the uploading files before closing as if successful, at which point the PHP error becomes visible.

The specified file temporary://p161t0h1ok1aujt5q1o9n14b64iab.tmp could not be copied, because no file by that name exists. Please check that you supplied the correct filename.

• PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array ( [:db_insert_placeholder_0] => 39 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => application/octet-stream [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1307717626 ) in drupal_write_record() (line 6851 of/var/www/vhosts/test.d7.local/httpdocs/includes/common.inc).

I am using:

- 7.x-1.0-beta3 (appears to have the patches discussed in the closed issues)
- plupload 1.4.3.2

Anyone else experienced this issue? Found a workaround or fix?

Comments

Hm. I am not experiencing this error when performing the same upload in two different server environments. Difference is PHP 5.3.x on the working servers, PHP 5.2.x on the non-working server. I'll see if I can get the admin on the dev server to upgrade PHP and find out if that makes the difference.

OK, I've managed to rule out the PHP version; was able to duplicate the error on PHP 5.3.

So, interestingly enough, eliminating Plesk from the test environment makes this problem go away. I have no idea how or why, but if anybody else is experiencing it, and can do without Plesk, it may solve your problem.

If by any chance this is a server setup with multiple web nodes (unlikely but possible), the 'plupload_temporary_uri' variable needs to be set to a location that is shared between the servers (the default /tmp won't work)...

I think another possible cause here is something like #1230632: hard-coded file size limits.

Status:Active» Postponed (maintainer needs more info)

Was this fixed?

Version:7.x-1.0-beta3» 7.x-1.0

+

I'm experiencing the same problem as was originally described, above, on a client website using the latest Plupload on the latest Drupal 7, with Media and Media Gallery. The site is hosted on Rackspace Cloud, which recently upgraded from PHP 5.2.x to PHP 5.3.14. I'm convinced that the problem started with the PHP upgrade.

Basically, I can drag-and-drop only one file into the upload window and successfully upload. Any more than one file generates the exact error described in the original post. Any idea if the problem is with the module, with Plupload itself, or both? Is a fix in sight?

Status:Postponed (maintainer needs more info)» Active

Currently I have no idea whether it is Plupload module, library or any other module you mentioned. Will try to reproduce it, but any other useful info would be more that welcome.

Have you checked solution proposals in #4?

We have prod with 5.3 not working and dev 5.2 working.

Version:7.x-1.0» 7.x-1.1

I am having similar problems. Lots of "The specified file ... could not be copied" errors. I'm using plupload with File Field Sources to populate a custom gallery node type. PHP version is 5.3.25.

One observation: the first upload seems to work fine for each new gallery. Later uploads usually fail. Either the new images are not added, or they appear later, or the upload hangs after reaching 100%.

I've watched my tmp directory and noticed that, for my latest gallery, the files from my first upload where there for a period of time afterwards. Is the problem some interaction with image caching?

I'd love a solution. I'm not looking forward to uploading a few hundred images one at a time.

Thanks.

#4 resolved this issue for me. It was working fine locally but not on the prod site, which uses multiple web heads.

Could someone specify #4?
Does it mean that plupload needs a tmp-folder outside the root?

ps identical installation works on php 5.3.25 but does not on php 5.4.17. Both with plupload library 1.5.7.

I'm getting this same error, I upgraded my Plesk panel which also upgraded php to 5.3.3. It was working prior to that and it also works on my local machine which is using php 5.4.7.

I have all the current releases of:

Drupal
FileField Sources
FileField Sources Plupload
Plupload integration

plupload is version 1.5.7

What will work:

  • Any sized single file using the standard upload, e.g it can be 200MB and it doesn't fail becsue I have some really high limits set in the php.ini
  • A single file less than 1MB when using plupload .

What won't work:

  • Any file more than 1MB using plupload.
  • Multiple files using plupload.

If I upload a single file using plupload that is larger than 1MB the uploaded file is only 1MB and the image is truncated.

Multiple small files are hit and miss, a few might be successful.

Referring to #4
"If by any chance this is a server setup with multiple web nodes (unlikely but possible), the 'plupload_temporary_uri' variable needs to be set to a location that is shared between the servers (the default /tmp won't work)..."
I am experiencing this issue with my host Pantheon. Where do you set the location for plupload_temporary_uri variable?

plupload_temporary_uri is set to "temporary://" by default. You most likely want to leave it this way and configure core's configuration for temporary:// scheme to point on some place, which is shared between all webheads.

Sorry to take so long to check in: I have not experienced this problem since we set up shared storage for the temporary upload directory on our cluster.

Hi

I have also this problem, but i dont understand the solution.

What do i have to change and where ?

Thanks for listening.
Anjaro

Status:Active» Fixed

@Anjaro: you should configure central file storage and configure all webheads to use it for temporary storage. This problem appears when you have more webservers and every of them using local temporary storage.