Php Script .. image size changing error

Discussion in 'PHP' started by Nthrax, Sep 28, 2007.

  1. #1
    I have an imagehosting script which has a logo on its top right. Now in the index.php i have successfully changed that logo to a new logo which is larger in size.
    But my upload.php gives an error when i change the image size.

    I changed this:
    to:

    Now when ever you open the upload.php the following warning appear on the page:

    and here are those lines

    Apprently after a certain size of the logo if you increase the size even more these warning appear.
    Please someone help me, the people i got the script from has closed down thier business. I need help x(

    Thanks in advance to everyone that contributes to this thread, helpful answers will be awarded with reputation at the least
     
    Nthrax, Sep 28, 2007 IP
    nabil_kadimi likes this.
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    I highly doubt that the HTML changes in another file affect your PHP code. Are you sure you didn't change anything else? Maybe by accident?

    If you change the HTML back like it was before, does the error disappear?
     
    nico_swd, Sep 28, 2007 IP
  3. Nthrax

    Nthrax Peon

    Messages:
    49
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Maybe you misunderstood what i said, sorry for my bad english.
    I changed the image size of the logo in all the pages example: index.php imageview.php and the logo successfully changed with no problem whatsoever.

    But, when i edited my upload.php file and changed the logo size it did execute and when i visit my upload.php page the logo has become of the size i wanted "but" the page also shows the warnings.
     
    Nthrax, Sep 28, 2007 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    I still doubt that this would cause errors cause I can't think of a way it would affect your PHP code.

    When you change the image back exactly like it was before, does the error disappear? (I'd be surprised if it did)
     
    nico_swd, Sep 28, 2007 IP
  5. undir

    undir Peon

    Messages:
    696
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #5
    whats the edit?
     
    undir, Sep 28, 2007 IP
  6. Nthrax

    Nthrax Peon

    Messages:
    49
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thats exactly what happends..but only with the upload.php file. rest of the pages all work fine when the same change is made to them
     
    Nthrax, Sep 28, 2007 IP
  7. Nthrax

    Nthrax Peon

    Messages:
    49
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7

    I changed this:

    to:
     
    Nthrax, Sep 28, 2007 IP
  8. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #8
    would you please show us the value of
    $img
    PHP:
    I had the same problem 2 days ago; I fixed it by giving the image functions absolute paths instead of relative paths.

    The first error message means that $img have not been opened by the function.
    The 2 other messages will disappear as soon as you fix the first one.
     
    nabil_kadimi, Sep 28, 2007 IP
  9. Nthrax

    Nthrax Peon

    Messages:
    49
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Actually i am not very good with php and i dont understand what you are asking for, i can pm u the upload.php file if ud like though
     
    Nthrax, Sep 28, 2007 IP
  10. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #10
    PM it, i'll try to fix it
     
    nabil_kadimi, Sep 28, 2007 IP
    Nthrax likes this.
  11. Nthrax

    Nthrax Peon

    Messages:
    49
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    pm sent...
     
    Nthrax, Sep 28, 2007 IP
  12. Nthrax

    Nthrax Peon

    Messages:
    49
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #12
    check again...
     
    Nthrax, Sep 28, 2007 IP