1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Buying Help with Fatal Error Solution (PHP)

Discussion in 'Programming' started by mcmuney, Feb 13, 2012.

  1. #1
    I'm getting the following error and need a solution:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10368 bytes) in /home/html/cropper/class.cropcanvas.php on line 425

    I have a script that crops images, but whenever the original file size is large, I get the above error and unable to crop the image, unless I manually resize the original image. I'm looking for a solution to this problem. I tried creating a php.ini file and adding the code below, but it didn't solve the problem:

    
    memory_limit=64M
    
    Code (markup):
    I'm using shared hosting with godaddy. Let me know what your fee would be to take care of this issue.
     
    mcmuney, Feb 13, 2012 IP
  2. cPAce

    cPAce Peon

    Messages:
    446
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    There is no way to correct the issue. This is a setting on the server's default php.ini file. You will need a VPS or Dedicated Server to continue without the errors. If you want to get a dedicated server or vps, let me know and I can work out a good deal with you.
     
    cPAce, Feb 13, 2012 IP
  3. abmathur

    abmathur Member

    Messages:
    211
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    30
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    It ain't too likely that you will find solution staying with GoDaddy but I think there are few things that you might try, message me if you want to give it a shot.
     
    abmathur, Feb 13, 2012 IP
  4. animedbsellersz

    animedbsellersz Member

    Messages:
    277
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    hey, godaddy sucks for shared hosting better learn that,

    and on the topic, try increasing your memory limit to 128 to 256

    your script is dying becaused your php wont allowed to exceed to 64M
     
    animedbsellersz, Feb 13, 2012 IP
  5. cPAce

    cPAce Peon

    Messages:
    446
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    He cannot change it as its a server side setting which requires root access to change.
     
    cPAce, Feb 13, 2012 IP
  6. mcmuney

    mcmuney Active Member

    Messages:
    792
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    As Seller:
    100% - 0
    As Buyer:
    100% - 3
    #6
    Thanks for the suggestions peeps.

    I think I'm going to go a different route on this one and install a resizer script to resize the large images, which should fix my issue. Btw, why so many Godaddy haters? Outside of them being strict about what you do with their servers, I haven't had any issues with them.. had them for years.
     
    mcmuney, Feb 13, 2012 IP
  7. zappak

    zappak Active Member

    Messages:
    364
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    80
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    ini_set("memory_limit","512M");

    put that.. may be it will works
     
    zappak, Feb 14, 2012 IP
  8. edduvs

    edduvs Active Member

    Messages:
    377
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    85
    As Seller:
    100% - 2
    As Buyer:
    100% - 0
    #8
    I could help you with a resizing class, with support for transparent images, I made it to allow big avatar uploads in my game.
     
    edduvs, Feb 14, 2012 IP