<div dir="ltr">Dear all <br>I have setup Mod python with Apache 2.2 (Python 2.5) . from the test page, I am sure mod python it works<br>then I try to setup TileCache 2.04<br>after download setuptools-0.6c8-py2.5.egg<br clear="all">
At first, I copy Tilecache 2.04 to /Apache2.2/cgi-bin/, use terminal run setup.py, seem like nothing works, then I copy all the file to /Apache2.2/htdocs/tilecache , run setup.py again. <br><br>according to some tutorials online, I have configured my Apache like this:<br>
<br>1. Add<br><Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/tilecache"><br> AddHandler python-program .py<br> PythonHandler TileCache.Service<br> PythonOption TileCacheConfig "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/tilecache/tilecache.cfg"<br>
PythonPath "['c:\Program Files\Apache Software Foundation\Apache2.2\htdocs\tilecache'] + sys.path"<br> PythonDebug On<br></Directory><br><br>to Apache httpd.conf, restart apache, no error<br>
beside that tilecache.cfg modified like this <br><br>[cache]<br>type=DiskCache<br>base= c:\tilecache2<br><br>2. Change some python script header to #!C:/Python25/python.exe -u<br><br>3. I changed tilecache.cgi into tilecache.py (under /Apache2.2/htdocs/tilecache/)index.html openlayers script like this<br>
var map, layer;<br><br> function init(){<br> map = new OpenLayers.Map( $('map'), {'maxResolution': 360/512});<br> layer = new OpenLayers.Layer.WMS( "VMap0", <br>
"/tilecache/tilecache.py?", {layers: 'basic', format: 'image/png' } );<br> map.addLayer(layer);<br> map.addControl(new OpenLayers.Control.Permalink());<br>
if (!map.getCenter()) map.zoomToMaxExtent();<br> }<br><br>4. when I open <a href="http://127.0.0.1/tilecache/tilecache.py">http://127.0.0.1/tilecache/tilecache.py</a> without error message, but follow xml codes<br>
<style>BODY{font:x-small 'Verdana';margin-right:1.5em}
.c{cursor:hand}
.b{color:red;font-family:'Courier New';font-weight:bold;text-decoration:none}
.e{margin-left:1em;text-indent:-1em;margin-right:1em}
.k{margin-left:1em;text-indent:-1em;margin-right:1em}
.t{color:#990000}
.xt{color:#990099}
.ns{color:red}
.dt{color:green}
.m{color:blue}
.tx{font-weight:bold}
.db{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;border-left:1px solid #CCCCCC;font:small Courier}
.di{font:small Courier}
.d{color:blue}
.pi{color:blue}
.cb{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;font:small Courier;color:#888888}
.ci{font:small Courier;color:#888888}
PRE{margin:0px;display:inline}</style><div class="e"><span class="b"> </span> <span class="m"><?</span><span class="pi">xml
version="1.0" encoding="UTF-8" </span><span class="m">?></span> </div>
<div class="e">
<div class="c" style="margin-left: 1em; text-indent: -2em;"><a class="b" onfocus="h()" onclick="return false" href="#">-</a> <span class="m"><</span><span class="t">Services</span><span class="m">></span></div>
<div>
<div class="e">
<div style="margin-left: 1em; text-indent: -2em;"><span class="b"> </span> <span class="m"><</span><span class="t">TileMapService</span> <span class="t">version</span><span class="m">="</span><b>1.0.0</b><span class="m">"</span><span class="t"> href</span><span class="m">="</span><b><a href="http://127.0.0.1/1.0.0/">http://127.0.0.1/1.0.0/</a></b><span class="m">"</span><span class="m"> /></span> </div>
</div>
<div><span class="b"> </span> <span class="m"></</span><span class="t">Services</span><span class="m">><br><br><br></span></div></div></div><br>now I could not find where error is ? is there anybody have same problems before ?<br>
Thanks in advance <br><br>All the best <br>-- <br>Xiaoyu Guan (Sam)<br>Geo-information Science<br>Wageningen UR<br>
</div>