Geotag / Poll Fatal error: Allowed memory size

Found a bug? Tell us!!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

No, the geotag plugin shouldn't use that much memory!

Maybe you could edit the serendipity_event_geotag.php file, go to around line 255 and you should see this:

Code: Select all

 case 'entry_display':
                         $i = 0;
         foreach($eventData AS $event) {
             // Check if geo_lat and geo_long are both set
             $props = &$eventData[$i]['properties'];
                                 $geotagged = true;
             foreach($this->supported_properties AS $prop_key) {
                 if (!isset($props[$prop_key])) {
                     $geotagged = false;
                 }
             }

change that to:

Code: Select all

 case 'entry_display':
echo 'Current memory usage is: ' . memory_get_usage() . '<br />';
                         $i = 0;
         foreach($eventData AS $event) {
echo 'New memory usage is: ' . memory_get_usage() . '<br />';
             // Check if geo_lat and geo_long are both set
             $props = &$eventData[$i]['properties'];
                                 $geotagged = true;
             foreach($this->supported_properties AS $prop_key) {
                 if (!isset($props[$prop_key])) {
                     $geotagged = false;
                 }
             }

And then reload your page - you should see the memory usage before the geotag plugin is actually executed, and that should tell us how much memory it really needs at that place?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ane
Regular
Posts: 12
Joined: Sun Jan 07, 2007 12:27 pm

Post by ane »

I'll try to find a way to do this...
This particular Installation is on a shared hosting and won't let me touch the plugin permissions via ftp. :roll:

Anyone having a prefered php-shell?
Post Reply