• I can’t upload a file using the admin side.

    WordPress Error:
    Couldn’t upload your file to [correct path].

    PHP Error:
    File upload error – unable to create a temporary file in Unknown on line 0, referer: https://zeph.dnsalias.com/wordpress/wp-admin/upload.php

    Options-> Misc has file upload turned on, set to 2000k

    PHP has uploads = on, upload_tmp_dir = “c:\tmp\”, upload_max_filesize = 2M

    The error occurs whether I ask it to make a thumbnail or not.

    Suggestions, anyone?

Viewing 8 replies - 1 through 8 (of 8 total)
  • In Options-> Misc is the correct Destination directory and URI of this directory specified?

    Thread Starter frankmarion

    (@frankmarion)

    Yes, they are both correct. Quintuple checked before posting ??

    First off, this is a PHP issue, not a WP one. So checking desintation directories and stuff in WP won’t help. ??

    Anyway, I assume c:\tmp\ exists?

    If so, double check that temporarily directory. The “unable to create a temporary file in Unknown” leads me to believe that PHP doesn’t have a temp directory correctly set.

    to deal with file uploads
    dont use WP
    use a FTP program
    or your hosting control panel and create any file you want
    then set the necessary permissions.

    Thread Starter frankmarion

    (@frankmarion)

    I appreciate that ftp is the way to go, but I’m a professional web-dev, and strange as it may seem, I’m tired of doing that dance. I was looking to WordPress as a solution to make my own website fun again, and ftp is a pain in the butt (comparatively speaking). I’ll do it if I must resort to it, but I’d rather take a shot at getting the issue fixed, first.

    It would be nice to get it fixed for testing, but it’s possible that when I move it to my linux server that it might work as well.

    I agree, that it seems like a PHP issue, not a wordpress one. c:\tmp exists indeed, and it’s part of my Windows PATH set up.

    I (perhaps incorrectly) assume that Windows doesn’t really have a permissions issue if I’m the sole user. What could cause PHP to choke up on that?

    Setting your temp directory in Windows to C:\tmp\ won’t make PHP use to the best of my knowledge. You must tell it to PHP in your php.ini file.

    I had a similar problem until I set my server /tmp directory to CHMOD 777

    Thread Starter frankmarion

    (@frankmarion)

    Sorry, I was unclear: I do have c:\tmp set up in my .ini AND (just in case, because I don’t really know PHP; it’s my first time installed, and I haven’t developed using it yet) I have additionally set it up in the Windows path as my default tmp directory.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Files won’t upload: unable to create a temporary file’ is closed to new replies.