Fatal error in GD.php when displaying map

BASE-user
Alan Bowen
2009-12-09
2013-06-03
  • 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

    Hi,

    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

     
  • Juergen Leising

    Juergen Leising - 2009-12-10

    Oh dear, they have ruined my comment :-/

    Let's see, whether HTML works:

    <pre>

    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.

    </pre>

    Bye, bye

    Juergen

     
  • 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

    Juergen

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

     

Log in to post a comment.