DISCUSSION
 
Emails are being sent, but attachments fail to upload.  An error message is displayed something along the following:
 
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpecCMMT' to 'http://your.website.com/joomla/images/pics/001.jpg' in /path/to/joomla/modules/mod_simpleemailform/helper.php on line XXX.
 
SOLUTION:
 
Check and make sure you have the FULL path to the directory specified in the module configuration
Make sure that your application has permissions to write to this directory
Make sure there are no hidden spaces in the directory path in the module configuration
 
 
EMAIL THREAD:

 On March 28, 2013 at 4:01 PM Kar wrote:
>
>
> This is an enquiry e-mail via http://joomla.unlikelysource.com/ from:
> Karl
>
> Hello Doug. Thanks so much for this fantastic module (Simple Email Form). I'm having some trouble with attaching a file though. After choosing a file and filling in the rest of the form (not required), and click on Submit, I get the following message: Unable to upload file (filename.xxx). (No limits on file extensions)
>
> I'm running Joomla 3.03
> It's live here: <removed>
> I've checked and double checked my attachment folder url (which has 777 permissions).
> I've read through the troubleshooting list with no luck.
> Emails send fine (even when the attachment fails to upload)
> Also, when the attachment fails, I still get the "Form Successfully Submitted!" Message.
>
> Any help?
>
> Thanks much, Karl
>

On 3/28/2013 5:29 PM, Doug Bierer wrote:
Karl --
 
This message occurs when the module is unable to move the uploaded file from the temporary area (set up by the web server) to the directory you specify.
 
You need to make sure that the FULL PATH to the folder is specified.  Please bear in mind that web folders often appear to originate with your web document root.  The module, however, requires the absolute path to the folder. 
 
The  best advice is to contact your web hosting provider and find out what is the full path to this folder.
 
Cheers,
 
db

On March 28, 2013 at 8:15 PM Karl wrote:

Doug,

THANK YOU SOOOOO MUCH!!!  You saved my tookus!  It's working like a charm now!!!

Blessings to you!!!

Karl

On March 29, 2013 at 7:25 AM Karl wrote:

Doug,

I just ran another test this morning and it failed.  After doing some digging, I realized that the attachment file had changed it's permission level to 755 from 777 (which I had set it to last night).  I re-set it to 777, and now it's working fine again.  Do you happen to know if it is normal for Apache servers to automatically reset permission levels for security purposes?  It seemed a little odd to me that it changed.

Again, thank you SOOO much for this module!!

Karl

On 3/29/2013 7:19 AM, Doug Bierer wrote:
Karl --
 
Excellent!!!  Thanks for keeping me posted.
 
Cheers,
 
db

On 3/29/2013 7:30 AM, Doug Bierer wrote:
Karl --
 
This could be from your web hosting provider.  Normally 777 is not recommended as it opens the server to an attacker being able to download viruses to the server.  Maybe try 775 instead?  Otherwise contact your provider and ask them what you need to do to allow file uploads from users.  Another alternative would be to have the file uploads be a folder under /path/to/joomla/media which is provided by Joomla for images, etc.
 
Cheers,
 
db

On April 5, 2013 at 12:37 PM Karl wrote:

Doug,

Thank you, it's now uploading, but the file is not attached to the email that is sent.  Am I missing a setting somewhere?

Thanks again,

Karl

 On April 5, 2013 at 12:09 PM Karl wrote:

Doug,

I had this working fine on my Apache based hosting service.  Now I've moved it to my customer's hosting service (which is a .net environment).  And the upload problem is back.  Here are the errors:

Warning : move_uploaded_file(/www/images/attachments\bio.pdf): failed to open stream: Permission denied in \\XXX\YYY\10\0\3\6\1234567\user\sites\592118.site\www\modules\mod_simpleemailform\helper.php on line  303

Warning : move_uploaded_file(): Unable to move 'C:\Windows\Temp\phpE96E.tmp' to '/www/images/attachments\bio.pdf' in \\XXX\YYY\10\0\3\6\1234567\user\sites\592118.site\www\modules\mod_simpleemailform\helper.php on line  303

Here is the link to the site: <removed>

I spoke with the hosting service ( <removed>) and they reset something with the file permissions (I didn't understand it)  I waited 15 minutes like they said, and have been playing with it for an hour since trying to get it to work.

Any assistance you can offer would be greatly appreciated.

Thanks again,

Karl

On 4/5/2013 12:18 PM, Doug Bierer wrote:
Karl --
 
Based on the error message you sent to me, I constructed the appropriate path and would proceed as follows:
 
1. Create an upload directory:
\\XXX\YYY\10\0\3\6\1234567\user\sites\592118.site\www\uploads
 
2. Make sure joomla has permission to write to this folder
 
3. In the simple emailform configuration, in the "Directory to Save Attachments" field,enter this path:
\\XXX\YYY\10\0\3\6\1234567\user\sites\592118.site\www\uploads
 
That should do it.
 
Cheers,
 
db
 

On April 8, 2013 at 10:01 AM Karl wrote:

Doug,

I finally found the problem.  I had a space at the end of the upload folder path name.  This allowed the file to be uploaded, but when it came to emailing the attachment, the file path had a space in it. 

Problem solved.

Thanks again for all your help!!

Karl