Forums

File upload error msg – but files are uploaded

johk 25 Nov, 2012
Hi,
I have a problem that I think is related to my host and their setup but I am not sure. The host is Webcentral and they run IIS7.5 and php 5.3.6

The problem I have is that when I try to upload and attach a file to the email I get “Warning: Failed to change file permissions!” .
The files are actually uploaded to components/com_chronoforms/uploads/[formname] but I still get the above message and the processing of the form stops ie no email is sent etc.


If I understand this correctly the host has setup a folder for where all uploads are temporarily stored. The files are then moved into the correct folder specified in the joomla extensions – in this case Chronoforms.
If we don’t have the correct permissions to the folder php is using then joomla can’t move the files and the file upload process stops?

Are there any way to ‘bypass’ this error code as the files are uploaded?

I hope the above make sense 

Any suggestions would be much appreciated

Cheers,

johk
johk 25 Nov, 2012
Hi,
With debug turned on I get the below error msg - but the file is uploaded.

Core Captcha

Passed the core captcha check!

Upload routine started for file upload by : file1
[root]\files\20121125184242_test1.pdf could not be uploaded!!

johk
GreyHead 25 Nov, 2012
Hi johk,

This is a Joomla! error message (not created by ChronoForms) and it appears to be used when Joomla! is unable to set the permissions on the uploaded file. I'm not sure what you can do to suppress it though :-(

Here's the code snippet from libraries\joomla\filesystem\file.php around line 499
				if (is_writeable($baseDir) && move_uploaded_file($src, $dest))
				{
					// Short circuit to prevent file permission errors
					if (JPath::setPermissions($dest))
					{
						$ret = true;
					}
					else
					{
						JError::raiseWarning(21, JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR01'));
					}
				}
				else . . .

Bob
This topic is locked and no more replies can be posted.