Opened 13 years ago
Closed 13 years ago
#1887 closed defect (fixed)
QuickPlot + MapGuide 2.3 (SVN)
Reported by: | wrees | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 2.4 |
Component: | AJAX Viewer | Version: | |
Severity: | major | Keywords: | quickplot exceed settings defined by administrator mapguide 2.3 |
Cc: | External ID: | 1415610 |
Description
I've been trying to get the new quickplot feature working in MapGuide 2.3 SVN. I kept running into the dreaded:
The application resources required to generate the plot exceed the settings defined by the administrator
I checked to make sure that PHP was compiled with gd, etc and everything was fine on that end. I'm using the php viewer, and after a bunch of digging I found the culprit.
Line 119 of mapviewerphp/quickplotgeneratepicture.php
$tempImage = sys_get_temp_dir() . uniqid();
this makes $tempImage as "/tmp4ee7858739161" causing it to fail to create the file.
A better solution would be to use tempnam() in conjunction with sys_get_temp_dir.
Line 119 of mapviewerphp/quickplotgeneratepicture.php turns into:
$tempImage = tempnam(sys_get_temp_dir, "mgo");
Can you please add this fix to the SVN trunk.
Thanks!
Warren
Attachments (3)
Change History (9)
comment:1 by , 13 years ago
comment:3 by , 13 years ago
Nice work, can you create and attach a patch for this?
Also, it's best to post a quick message to mapguide-internals after filing a ticket
by , 13 years ago
Attachment: | quickplotgeneratepicture.patch added |
---|
Patch for quickplotgeneratepicture.php
comment:4 by , 13 years ago
From my test, tempnam() doesn't work with PHP 5.3.8 + IIS7. That means we cannot fix the problem by tempnam(). We might simply add the path separator before uniqueid(): $tempImage = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "mgo" . uniqid(); The code would work for both Windows and Linux.
by , 13 years ago
Attachment: | quickplot_tempfile_patch_fusion.patch added |
---|
by , 13 years ago
Attachment: | quickplot_tempfile_patch.patch added |
---|
comment:5 by , 13 years ago
External ID: | → 1415610 |
---|
comment:6 by , 13 years ago
Milestone: | 2.3 → 2.4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
you could also fix it by changing it to:
sorry it should read:
$tempImage = tempnam(sys_get_temp_dir(), "mgo");