Hi,
I created a template and a form (with a file field), and its working fine, the problem is with the attachment, in the administrator section, File Uploads TAB, I enabled the file upload and in "Fields names & allowed extensions for each" entered *.
I receive the email but without attachment. Please let me know what did I miss?
Regards
Rajeev
Hi Rajeev,
Is the file uploading at all? Check the components/com_chronocontact/upload folder to see if it's there.
If not then you probably need to add enctype='multipart/form-data' in the Form Tag Attachment box on the General tab.
Bob
Hello Bob,
I added enctype='multipart/form-data' in the Form Tag Attachment box on the General tab. Unfortunately it didn't work 😟
I Checked the components/com_chronocontact/upload folder, it Is not uploading the file.
Hi Rajeev,
I'm not sure where to go from here - maybe Max has a suggestion. If I understand correctly Joomla/PHP uploads the file to a temporary folder, then ChronoForms checks it, renames it and moves it to the upload folder.
Both the temp folder and the upload folder need to exist and be writable by the appropriate system user.
Your form needs to have good code (as we saw in another example recently where the problem was a faulty <input> tag code); and there must be at least one non-file field - a submit button with a value will do - as ChronoForms will not accept an empty $_POST array.
I don't think that there is any real substitute for taking a very simple form and tracking through step by step with debug code.
Bob
Hi Bob,
the /tmp and the upload folder have 777. The HTML form is attached as a txt file and I hope its correct.
Please help.
Regards
Rajeev
Hi Rajeev,
Nothing wrong with the form html as far as I can see. Please take a Form Backup from the icon in the ChronoForms Form Manager and post it here or email it to me so I can see all the settings (you'll need to zip it to post it here).
Bob
Hi Bob,
Please find the form backup as attachment.
Regards
Hi Rajeev,
On the File Uploads tab you must have entries in all four fields - including Min & Max size. And * is no longer allowable as a file type (it opens too many security holes) so you must specify the allowable filetypes.
Bob
Thank you so much for your help Bob, after specifying values in the file uploads tab (latest form backup is attached), it started working but an error occurs:
Warning: move_uploaded_file(/home/ilng/public_html/eheek/components/com_chronocontact/upload/20080729095252_encryptionkey.doc) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/ilng/public_html/eheek/components/com_chronocontact/chronocontact.php on line 607
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpabAMmN' to '/home/ilng/public_html/eheek/components/com_chronocontact/upload/20080729095252_encryptionkey.doc' in /home/ilng/public_html/eheek/components/com_chronocontact/chronocontact.php on line 607
Permission of /tmp, /eheek/tmp and upload folder in com_chronocontact is 777.
Now what is missing? please help.
Regards
Hi Rajoo,
Try 755 instead - another poster said this yesterday. I think there may be a problem with some ISP security setups if you give world write access.
Bob
Hi Bob,
The site is running from a subfolder (eheek) of public_html (or www).
I reset the permissions to 755 on the following directories:
/tmp
/www/tmp/
/www/eheek/tmp/
/www/eheek/components/com_chronocontact/upload
but it is still given the same error:
Warning: move_uploaded_file(/home/ilng/public_html/eheek/components/com_chronocontact/upload/20080729113512_encryptionkey.doc) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/ilng/public_html/eheek/components/com_chronocontact/chronocontact.php on line 607
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpbFOpu4' to '/home/ilng/public_html/eheek/components/com_chronocontact/upload/20080729113512_encryptionkey.doc' in /home/ilng/public_html/eheek/components/com_chronocontact/chronocontact.php on line 607
Regards
Hi Rajeev,
Line 607 is copying the file from the temp folder into /components/com_chronocontact/upload/ so there is still some permissions problem there. Sorry, I can't be more helpful than that. Maybe your ISP has some suggestions?
Bob
Thank you so much Bob, you have been a great help, I'll speak to my ISP, I'll update you when it is fixed.
Thanks and Regards
Rajeev
Hi Bob,
My stupid mistake, I set 777 on the following:
/public_html/eheek/components/com_chronocontact/
instead of on:
/public_html/eheek/components/com_chronocontact/upload/
its working now.
Thank you so much, I could run this with your help only.
Best Regards
Rajeev