Same image upload and resize script doesn't work for some people

Discussion in 'PHP' started by cathaylist.com, Sep 17, 2009.

  1. #1
    I bulit a form to handle product upload 2 years ago.
    Use imagecopyresampled & imagejpeg to handle resize and save images.

    It works fine to almost every users and me till now (From PHP 4.xx to 5.xx now).
    But I have got two tickets who claimed that they can't upload image and no error showed on browser.

    That's strange. I even asked them to offer the images they can't upload and test to upload them under their account. I can upload the images as usual.

    If the script has problem. Same under IE7 and same image with same login account. I can upload and resize the images as normal but the 2 users can't.
    I have not met this problem before but I got the 2 tickets over the 30 days.

    I have no idea how to debug without error messages and even I can work fine with the script and almost of users work fine as well.
     
    cathaylist.com, Sep 17, 2009 IP
  2. caprichoso

    caprichoso Well-Known Member

    Messages:
    433
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    110
    #2
    A productive PHP server will fail with no visible error message. Most probably it will log them to Apache error log.

    Image processing functions are available only if GD PHP module is active and loaded. Take a look to phpinfo() for that server.

    Another thing which is error prone is file uploading and creating in the server side. Target directory may be not writable for apache user.
     
    caprichoso, Sep 17, 2009 IP
  3. cathaylist.com

    cathaylist.com Well-Known Member

    Messages:
    437
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    125
    #3
    Thanks, Caprichoso.

    As I mentioned, the script work fine to all users except the 2 users.
    I login in as the 2 users and try to upload images. No problem.
    So GD module is fine.
    I have checked the directory are 777 as usual.

    I have not check apache error log...
    hope I can find some clues by this..
     
    cathaylist.com, Sep 18, 2009 IP
  4. caprichoso

    caprichoso Well-Known Member

    Messages:
    433
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    110
    #4
    My fault. I thought that "users" were customers using your script in different servers.

    So the problem can't be the server, nor the PHP. It has to be the client side. Can you ask your users to try with another navigator like Firefox.
     
    caprichoso, Sep 18, 2009 IP