SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2002
    Location
    London
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP File uploads get corrupted

    I'm building a Flash/PHP/Java application for a client. It works fine locally and yesterday I deployed the files to the client's dev web server.

    However, php file uploads now don't upload correctly to their server. I think they made a couple of changes recently to the server which I assume are the root of this problem. If anyone has a suggestion for what I should check for I'd appreciate it.

    Basically, when you upload a file via either Flash > PHP or HTML Form > PHP the file uploads to the /tmp directory and I can get a reading for it's tmp_name (no error value). However I used to be able to run GetImageSize on the tmp jpg file at that point to get it's width and height. Now GetImageSize returns no results.

    I can use copy() or move_uploaded_file() functions to copy the image to another directory, however the copied image is corrupt.

    permissions on /tmp folder are 777 but the tmp images automatically get assigned 600. I can chmod the copied image to 777 or whatever once it's copied but it's still corrupt.

    Thanks for any advice.

    Nick

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    This seems unlikely but you could check it. Are they very big (k) images and did the max upload file size directive get changed in the php.ini file?

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2002
    Location
    London
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The upload_max_filesize setting is 20M and the images I've been testing with are about 500K


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •