Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
dannychambers  
#1 Posted : Tuesday, July 27, 2010 9:10:51 PM(UTC)
dannychambers

Rank: Newbie

Groups: Member
Joined: 7/21/2010(UTC)
Posts: 9

We're getting this error which doesn't match the actual error. "Source file is not uploaded. In order to upload source file you should pass true value to ImageUploader.setUploadSourceFile method."

However, we have set the upload the Source File to "true"? The problem appears to be more closely linked to the amount of pictures we're uploading. If we're putting up 4 pictures, it's fine. If we increase the number of files to 15, then the error occurs.

Clues?

Notes..
PHP5
Apache

upload.php
Code:
	

ini_set('memory_limit', '100000M');
set_time_limit(0);

while(($file = UploadedFiles::fetchNext()) !== null) 
	{
		// ORIGINAL
			$fileName = $file->getSourceFile()->getSafeFileName($dir_full); // <<<<< ERRORS HERE
			$file->getSourceFile()->save($dir_full . '/original/' . $fileName);	

}


index.php
Code:
$iu->setUploadSourceFile(true);


Error log.
Code:
[28-Jul-2010 07:01:24] PHP Fatal error:  Uncaught exception 'Exception' with message 'Source file is not uploaded. In order to upload source file you should pass true value to ImageUploader.setUploadSourceFile method.' in production/_php/classes/ImageUploaderPHP/UploadedFiles.php:41
Stack trace:
#0 production/_php/classes/ImageUploaderPHP/UploadedFiles.php(366): UploadedFiles::_throwException('Source file is ...')
#1 production/_php/classes/ImageUploaderPHP/UploadedFiles.php(502): BaseFileInfo->_checkWhetherUploaded()
#2 production/upload/upload.php(84): BaseFileInfo->getSafeFileName('../_uploads/201...')
#3 production/upload/upload.php(168): saveUploadedFiles()
#4 {main} in production/_php/classes/ImageUploaderPHP/UploadedFiles.php on line 41
Dmitry.Obukhov  
#2 Posted : Wednesday, July 28, 2010 7:28:14 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Danny,

Thanks for contacting us.

It is a known problem with using PHP Library. You experience it because the value of max_file_uploads variable is set to 20 by default. It means that you cannot upload more than 20 items during one upload. If you want to check the value of this variable add to your code:
Code:

<?php
  echo (phpinfo());
?>

Update your page and find max_file_uploads.

To resolve the problem please add max_file_uploads variable to your php.ini file and set the value of it to 1000:
Code:

...
max_file_uploads = 1000
...

Then restart your apache server and run your application.

If you have any other problems please feel free to let me know.

Edited by user Wednesday, July 28, 2010 7:46:58 PM(UTC)  | Reason: Not specified

Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
dannychambers  
#3 Posted : Tuesday, August 3, 2010 7:42:23 PM(UTC)
dannychambers

Rank: Newbie

Groups: Member
Joined: 7/21/2010(UTC)
Posts: 9

Thanks for the reply. We're going to try that, however we're definitely only uploading 15 images.
Dmitry.Obukhov  
#4 Posted : Wednesday, August 4, 2010 12:00:39 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Danny,

Max_file_uploads variable can be set to another value. It depends on your settings of PHP in .ini file. More detailed information you can find in PRB: Cannot upload more than N files in PHP post.

Please try to change it how I advise in my previous post and let me know about the results.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.