[OpenLayers-Users] Print / Saving Image
youknowho
iansgis at GMAIL.COM
Wed Oct 1 18:21:17 EDT 2008
I'm having trouble getting this working and am new to PHP so that may be part
of it. I get a 404 not found error message "The requested URL
/openLayers/temp/<br />Warning: Invalid argument supplied for foreach() in
/var/www/lib/printMap.php on line 20<br
/>http://www.host.com/cgi-bin/temp/9b4a7f4ef0672726291d3aa75c387802.jpg was
not found on this server."
When I check the host/cgi-bin/temp directory the images are there, albeit as
13KB flat black images without map data. I've defined TEMP_DIR and TEMP_URL
as variables:
<?php
// define temp directories
$TEMP_DIR = "/var/www/cgi-bin/temp";
$TEMP_URL = "http://www.host.com/cgi-bin/temp";
....
$file = sprintf("%s/%s.jpg", $TEMP_DIR, $random );
$url = sprintf("%s/%s.jpg", $TEMP_URL, $random );
....
// fetch the tile into a temp file, and analyze its type; bail if it's
invalid
$tempfile = sprintf("%s/%s.img", $TEMP_DIR, md5(microtime().mt_rand())
);
I'm using TileCache on the same host so I don't think there are any proxy
issues. The TEMP_DIR is wide-open permissions wise. Using RHEL and PHP 5.2.6
with GD support. Thank you for your help.
--
View this message in context: http://www.nabble.com/Print---Saving-Image-tp14264520p19770300.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list