Forums

File upload problem

vashanka 09 Aug, 2010
I have a simple ChronoForm with a file upload field. The form is writing to the database and the email is coming through, but the file is not uploading to the directory, nor is it attached in the email. Please note I run my own server and have a _very_ different configuration than most users with hosting.

My first question: does the upload directory have to be owned by the same user as Joomla's FTP layer? That is not the case in my setup.

For testing I'm only allowing .doc files. My syntax for file upload is: file:doc{5000-0}

Debug output (I saw the 'NOT been uploaded!!' message:

   1. Form passed first SPAM check OK
   2. Form passed the submissions limit (if enabled) OK
   3. Form passed the Image verification (if enabled) OK
   4. Form passed the server side validation (if enabled) OK
   5. $_POST Array: Array ( [name] => Stephan Ross 7 [title] => Test 7 [email] => stephan.ross@dri.edu [institution] => DRI 7 [abstract] => Abstract test 7 on 8/9 [chrono_verification] => MJYXQ [ba513fdcda51ffa90b7707ee3108cadf] => 1 [1cf1] => d743094bc07a31895933fd91b96d456f [chronoformname] => icmg_abstract )
   6. $_FILES Array: Array ( [file] => Array ( [name] => Test abstract from Stephan.doc [type] => application/msword [tmp_name] => /tmp/php0TaG6J [error] => 0 [size] => 9944 ) )
   7. Upload routine started for file upload by : file
   8. /www/CMS/DRI/components/com_chronocontact/uploads/icmg_abstract/20100809135417_Test abstract from Stephan.doc has NOT been uploaded!!
   9. Form passed the plugins step (if enabled) OK
  10. An email has been SENT successfully from (Stephan Ross 7)stephan.ross@dri.edu to icmg@dri.edu
  11. An email has been SENT successfully from (Stephan Ross 7)stephan.ross@dri.edu to stephan.ross@dri.edu
  12. Debug End


Thank you very much for your help!
GreyHead 09 Aug, 2010
Hi vashanka ,

I think that it's the Joomla user that needs write permission for the folder. (Unless you have FTP enabled in the Site Global Configuration in which case it may be the FTP user - but we've seen some problems with that.)

Bob
vashanka 09 Aug, 2010
Thanks- in this case the form is open to the public so no Joomla user will be logged in before they submit. I do have FTP enabled in Global config and did set the ownership of the directory to the same as the Joomla FTP user. Also temporarily opened up the permissions. Still no luck. Any suggestions?
GreyHead 10 Aug, 2010
Hi vashanka,

Sorry, I mean the Joomla user from the server point of view - like the FTP user (nothing to do with the site registered users).

A few things to try:
[list]
  • Set your site error reporting to Maximum in site global configuration to see if you get an error message.
  • Check your server logs to see if there are any messages there.
  • Disable FTP in the site Global configuration.
  • [/list]

    Bob
    vashanka 10 Aug, 2010
    Thanks Bob-

    Well I did what I should have done in the first place and built the form on my development server. 🙄 File upload and email with attachemtn works perfectly, no error messages in the logs. I left Joomla's FTP layer enabled as other things I do on the site require it.

    I think the problem on my production box has to do with some stuff I'm doing with rsync and security settings. I'll let you know if I get it working, but I think I'm close.

    Thanks again for your help,
    Vashanka
    vashanka 10 Aug, 2010
    This turned out to not be a problem with Chronoforms, but rather a problem with FTP settings on my production server. Specifically we had a filter in place blocking files with spaces in the names. Configured things the way we want and all is working perfectly.

    Thanks again for your help and a great product!
    This topic is locked and no more replies can be posted.