Fatal error in GD.php when displaying map

Alan Bowen
  • Alan Bowen

    Alan Bowen - 2009-12-09

    When trying to display the country map the following error is generated:
       PHP Fatal error:  Allowed memory size of 16777216 bytes exhausted (tried to allocate 7200 bytes) in /usr/local/PEAR/Image/Canvas/GD.php on line 364, referer: http://hope/base/base_graph_main.php
    Allowed memory size of 16777216 bytes exhausted (tried to allocate 1156 bytes)

  • Juergen Leising

    Juergen Leising - 2009-12-10


    you could put a line

    ini_set("memory_limit", "256M");

    into the function GetCountryDataSet() in base_graph_common.php.

    Or maybe 100M are sufficient.

    bye, bye


  • Juergen Leising

    Juergen Leising - 2009-12-10

    Oh dear, they have ruined my comment :-/

    Let's see, whether HTML works:


    I was suggesting a line

    ini_set("memory_limit", "256M");

    being added to the function GetCountryDataSet() in the file base_graph_common.php

    Between ini and set and between memory and limit there have to be underscores.


    Bye, bye


  • Alan Bowen

    Alan Bowen - 2009-12-10

    Thanks a lot Juergen.  I've tried that but it doesn't seem to work.   However, I've entered your suggestion in /usr/local/PEAR/Image/Canvas/GD.php inside function _getFillStyle and that seems to have solved it.

  • Juergen Leising

    Juergen Leising - 2009-12-13

    OK.  In the meantime I have put this command into base&#95;graph&#95;display.php.  This should work in all cases and for any
    kind of graphics, not just the world map related ones.

    You can check this in the upcoming release.

    BTW: php-5.3 seems to have become stricter.  As a consequence some modifications to the PEAR::Image::Graph and Canvas libraries have to be made.  So if you encounter any strange errors, make sure you skim over docs/README.graph&#95;alert&#95;data.

    URL of this file in CVS:

    Bye, bye


      : http://secureideas.cvs.sourceforge.net/viewvc/secureideas/base-php4/docs/README.graph_alert_data?view=markup


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks