• Dear happy clappy people,

    whenever i run the postie script after sending an email with a regular jpg attachment I get the following report:

    Message Id is :
    Email has following attachments:
    text plain
    image jpeg
    primary= multipart, secondary = mixed
    primary= text, secondary = plain
    primary= image, secondary = jpeg
    could not write to temp file: ”

    All that shows up in my post is a missing image icon.
    I have checked that my uploads folder is set to 777 and the tmp folder will only allow 755.

    Any ideas?

    Thanks, Balti

Viewing 15 replies - 1 through 15 (of 16 total)
  • it might be your servers temp folder its trying to write to and not uploads.

    Thread Starter bsieders

    (@bsieders)

    wow thanks for the quick reply! i thought the latest version uploaded to the default wordpress folder? im pretty sure the “tmp” folder in uploads has been created by the plugin, any ideas how i can set it to 777 if it says permission denied?

    You know what I totally missed the fact you wrote postie, anyhow you need to chmod 777, open up your ftp client and find the uploads folder and right click and look for info or setting and select and it should allow you to change to 777 or 0777

    find your tmp folder inside and change to 777 as well. If it doesn’t exist create it and chmod it to 777.

    Thread Starter bsieders

    (@bsieders)

    thanks for your help valendesigns..
    i have tried that before and it said permission denied, i also cannot delete the folder. Any way around this??

    then you need to login to your server and delete it from your account center, cPanel or Plesk (whatever you have) and/or change the permissions. The folder is probably owned by root and your ftp can’t delete it.

    Thread Starter bsieders

    (@bsieders)

    ok i don’t have access to the root so i will submit a ticket i guess, don’t understand why the plugin created a folder it can’t write to. Anyway muchas gracias, have a nice day

    Thread Starter bsieders

    (@bsieders)

    Nooooo…I managed to set the folder to 777 through a super fast technical support team but i still get “could not write to temp file: ””!

    has anybody else out there had a similar problem or know any possible cause??

    Desperate balti

    first possibility (not an expert) but…

    assuming you are on a “shared, hosted” web server… the admins probably have “locked down” a shared php.ini

    this means you don’t have access to write to the “upload_tmp_dir” as set in php.ini

    if they are running segration on a single box, they might have to set a php.ini setting called “user_dir” for you and chmod it to 777.

    ask your tech support peeps if that might be the reason images aren’t getting “moved” with the pop of the email.

    second possibility, the host’s mail service has blocked images in messages unless you explicity “download” them using a message reader. so they are “missing” when WordPress “pops” the message. again ask the tech support peeps.

    if all else fails, ignore this post. :p

    Thread Starter bsieders

    (@bsieders)

    Hi jamesk525..

    Not going to ignore anything at the moment, thanks a lot for your post!

    I am able to upload images no problem in wordpress so I think that rules out possibility numero uno.

    If I check my inbox of the email account i set up i clearly see the image but that might be because i “explicitly download them.” I will try using an email account on another server and see if thats the cause.

    If any other bright ideas pop3 into your head, let me know!

    cheers Balti

    I get the same thing.
    Mine doesn’t even create a temp folder anywhere even with the settings at 777 on uploads.

    this is what I get:

    Email has following attachments:

    image jpeg

    primary= multipart, secondary = mixed
    primary= image, secondary = jpeg
    crap – could not write to temp file: ”

    Is $tmpFile supposed to be blank??

    Hey there,

    I had an extremely frustrating time with the same issue as bsieders and kbanse. After narrowing it down a few lines in the postie-funtion.php I got stuck trying to come up with the solution (sadly I am not really any good at coding). Thankfully a little over a day after I started banging my head against the wall on this I checked the “other versions” section and gave the Development Version a try – low and behold, the issue was taken care of and everything works like a charm!

    My complements to Robert on making a very strong plug-in even stronger (and best of all working the kinks very quickly!) Thanks!

    I figured out my issue with the latest development version and I was close in my previous post.

    on line 1156 of postie-functions.php

    $tmpFile=tempnam(tempnam('TEMP', 'postie');

    change to:

    $tmpFile=tempnam('wp-content/uploads', 'postie');

    and all worked fine. Not sure if there is a better way to fix this though.

    For some reason I needed to use full path to get it working, in my case it looks like:
    $tmpFile=tempnam('/home/users/dshells/ristil/html/wordpress/wp-content/uploads/postie', 'postie');
    If you do not have shell access, you can find the full path of your upload directory with your favourite FTP program as well. I made postie it’s own directory in uploads, although it looks like there will be temp files only…

    Some hosting companies don’t allow you to give 777 file permissions because it leads to server security issues. Do check with them.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: Postie] Error: could not write to temp file: ‘ ‘ and I can’t change ‘tmp’ folder to 777’ is closed to new replies.