WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Attachment not sent but in the upload folder (19 posts)

  1. Oriman
    Member
    Posted 3 years ago #

    Hello,

    I am using this contact form for a form with an attachment,
    It worked pretty well locally,

    however, my form is not sending anymore the attachement,

    I get my email, with the attachement name, it's uploaded in the CF7 folder but there is no attachement in the mail ...
    there is the [file-#] in the left attachment space...

    Do you have any idea about what could be wrong ?

  2. Mike
    Member
    Posted 3 years ago #

    i'm looking for the same answer right now. went through the author's tutorial (http://contactform7.com/blog/2009/11/24/file-uploading-and-attachment/) but still not getting attachments

  3. Nickolabs
    Member
    Posted 3 years ago #

    I have the exact same issue... It appears my attachment are in the upload folder, but they do not appear in the email I receive.

    From what I could see, the FTP settings WordPress is using is different then what the plugin uses: the users are not the same if I check it in the FTP.

    Perhaps that is the cause... I'm currently testing out something: creating the folder manually under the "user" from the FTP, and configuring the plugin to dump stuff in this folder...

  4. Nickolabs
    Member
    Posted 3 years ago #

    From what I could see, the folder I created successfully receive the files, and those files have the following CHMOD: 400, under a user group different from the one that the FTP uses (I guess that's the way the server is setup).

    So I have the same issue, my uploaded file don't find their way to the email itself and are not sent.

  5. Oriman
    Member
    Posted 3 years ago #

    Yep, I have seen that.
    I tried to build this folder manualy too before I asked ...

    Does someone have an answer for this, I guess, small bug ?

    @Nikolabs, If you find a way, keep me posted please.

    Thanks !

  6. Nickolabs
    Member
    Posted 3 years ago #

    Nope... I'm stuck like you guys.

    The problem is that I'm using this plugin for Jobs offerings, and people can't upload their CV... I'll have to manually get those from the folder and forward the email to the client, along with the CV...

    Weird thing is that I'm using the plugin on another website infrastructure with uploads and all just fine.

    I'm guessing that the plugin simply ignores the "FTP_HOST", "FTP_USER", "FTP_PASS" settings in the wp-config.php file.

    I hope this get fixed quickly.

  7. Oriman
    Member
    Posted 3 years ago #

    The same...
    I am using it on some other websites without any problem,

    Do you think we can do something to fix it ?

    I hope it will be fixed soon too ...

  8. Mike
    Member
    Posted 3 years ago #

    i have seen the author of this plugin (Takayuki Miyoshi) responding to some other threads so with any luck he will jump in here and have some advice for us

    one thing that you guys are saying that i am confused about though. you're saying that the files are being stored in the upload folder where you can retrieve. mine are not being stored, and according to the tutorial in the URL i posted above, it says ..

    "Contact Form 7 moves the uploaded file to a temporary folder. At this point, Contact Form 7 attaches the file to the mail and sends it. After these procedures, Contact Form 7 then removes the file from the temporary folder."

    in my folder the files are not present, which i thought is normal according to the above. wondering how come you all are able to retrieve the files from the upload folder

  9. Oriman
    Member
    Posted 3 years ago #

    Hi mike,

    I don't know for your folder if the file are coming in then beeing deleted or not coming in ?

    I guess they are not coming or it's not the same trouble as mine, if so, check again if you correctly enter [file-#] inside the "attachment" field bellow the code of the form.

    PS : # should be the same number as you get on your mail form and on your contact form

  10. Nickolabs
    Member
    Posted 3 years ago #

    Indeed, the plugin normally delete the files in the temporary folder (default "wpcf7_uploads").

    Thos problems are related: CF7 cannot delete the files, since they are under another ftp owner/group, hence it cannot place them as email attachment either.

    The thing is, I don't know why CF7 wouldn't uploads those files under the same owner/group as WordPress itself, or using the FTP_USER in wp-config.php...

  11. Nickolabs
    Member
    Posted 3 years ago #

    I tried the following:

    I disabled the deletion of the file (see modules/file.php ~ line 340);
    I also changed the CHMOD call so it sets the file permission to 0775 instead of 0400 (see modules/file.php ~ line 188);
    I even added a @chown call under it to hardcode my owner directly...

    I did another test, to check if the chmod was working: I created a temp php file simply calling the following:

    ini_set('display_errors',1);
    error_reporting(E_ALL);
    
    $filename = '/ABSOLUTE/SERVER/PATH/public_html/wp-content/uploads/wpcf7_uploads/MyTARGETFILE.pdf';
    
    chown($filename, 'MyUSER');
    chmod($filename, 0775);

    No success, file uploaded are still under the owner/group "nobody" in my FTP and I cannot download them or delete them and chmod/chown do not have any effect (I'll contact the webhost about that).

    My issue here is that the PHP running WordPress as a CMS doesn't have root access, since the client's website is in a shared environment.

    Any ideas? I'm stuck with a bug on a live website and it's tiring on my nerve...

  12. Oriman
    Member
    Posted 3 years ago #

    You tried hard !
    I didn't find a way to fix it too...
    I hope to have time this week to look at it carefully.
    Where is the developper ?!
    I hope this form will be fixed soon ...

  13. Nickolabs
    Member
    Posted 3 years ago #

    haha, not much choice... The thing is live and I need that fixed asap.

    It does seems to me the webhost is the cause behind this, but I assume I'm not the only person with a client under a strict shared environment, so the bug might occurs for others... others who won't post here to tell about it and simply delete the whole plugin instead and go for another solution (Gravity Forms and Wufoo comes to mind).

  14. Nickolabs
    Member
    Posted 3 years ago #

    I'm in the process of upgrading the server to PHP 5 (at least, I made the resquest, the server was still in PHP 4.4.2), and that may be the issue here... hopefully.

    I'll keep you guys posted... If anyone comes up with a fix, reply here too, I'll be notified by email.

  15. ggandg
    Member
    Posted 3 years ago #

    I must concur that Contact Form 7 seems hopelessly broken when it comes to attachments. My setup includes WP 3.1, CF7, and 1and1.com linux hosting (have tested it with both PHP 4 and 5). Despite hours of testing, I have never once received an email with a file attachment. All I have been able to do is affect the way that uploaded files are stored. Depending on the permissions I set for the upload folder CF7 either:

    1. Wipes the upload directory clean before each set of attachments is uploaded.
    2. Accumulates uploaded files in the upload directory (adding "1", "2", to duplicate filemanes)

    CF7 needs a serious fix- attachment files should be both reliably emailed and permanently stored in automatically generated subfolders.

  16. ggandg
    Member
    Posted 3 years ago #

    Just for your information this plugin seems to have fixed all my issues with CF7 uploads/attachments.

    http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

    After activating this plug I started receiving email attachments for the very first time.

  17. Oriman
    Member
    Posted 3 years ago #

    ____ Out of the subject bu still important ____
    Hi guys,

    trying to install this other plug to fix the contact form bug.
    I needed to upgrade to php5 ! what a nice thing !
    SO I added to my .htacces the line to upgrade,

    but, I was using askapache password plugin on my multisite wordpress instalation, and I don't know why, but until that line, I have a nice blank page instead of my webiste.

    So I tried to delete askappache pass, I fixed my two .htaccess with the original ones, and disable the plugin.

    Still nothing more than the blank page ...

    I tried to add again the php5 line...

    nothing !

    all this to fix this bug in the contact form !

    so please guys, I'm in a hurry,

    could you help me to get back my website ?

    and to uppgrade to php5 in order to fix contact form7 with this apparently nice pluing just above ?

    the website is :
    http://www.pharmaciesaintberthevin.com

    PS : I have acces to the back office, only the front doesn't work anymore !!!!

  18. Oriman
    Member
    Posted 3 years ago #

    Okay guys, forget my last post, I had it right, I just forget to erase firefox cache... f**** cache...

    So my website is back online...

    I will try to upgrade the php right now ... in order to put this hopefully really good plug to fix the form!

  19. Oriman
    Member
    Posted 3 years ago #

    HI !

    It's Working !!!!!

    Yeah !
    I don't know if it's from the php5 or from the other plug you gave us ggdang but thanks !

    It is now working and legen....dary :-)

    see you around guys !

    NB :
    What I have done :
    - rebuilded my htaccess file.
    - I added this line at the top of it to force php5
    SetEnv PHP_VER 5
    - I installed the plugin ggdang gave us the link

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic