Hi Rich:<br><br>IIS was configured to work with Python scripts. I did the configuration according to http://support.microsoft.com/kb/276494 <br><br>I have removed #! c:\python24\python -u from the make_dlegend_xml.py and make_dlegend_xml_cgi.py. I tried as you told me to test the script, and I get the error:<br><br>This XML file does not appear to have any style information associated with it. The document tree is shown below.<br><br><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">dLegend</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">error</span><span class="m">></span><span class="tx">Missing required parameter "server"</span><span class="m"></</span><span class="t">error</span><span
class="m">></span> </div></div> <div><span class="b"></span><span class="m"></</span><span class="t">dLegend</span><span class="m">></span></div></div></div><br><br>When I look at the javascript console I see:<br><br>Error: xml declaration not at start of external entity<br>Source File: http://localhost/scripts/make_dlegend_xml_cgi.py?map=c:/inetpub/wwwroot/demo/example/itasca.map&server=localhost<br>Line: 2, Column: 1<br>Source Code:<br><?xml version="1.0" ?>^<br><br>What is strange is that the legend appears OK and I can work with it, but it is obvious that somewhere something is wrong and I can understand where!<br><br>Thank you again<br><br>William<br><br><br><b><i>Richard Greenwood <richard.greenwood@gmail.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On 11/3/06, william paul <williampaul28@yahoo.com> wrote:<br>> Hi again to everybody:<br>><br>> I
am trying to use the example provided with dBox, and to combine mapscript<br>> python with dbox on IIS. I have installed dBox and seems to work, but I have<br>> problems with mapscript python. These are steps which I did so far:<br>><br>> I have downloaded a installed on windows xp sp 2 with IIS, mapserver 4.10. I<br>> used the the binaries from MS4W, latest stable version from www.maptools.org<br>> I have downloaded and installed Python 2.4.3<br>> I have copied mapscript.py, mapscript.pyd and _mapscript.pyd into<br>> Python24/Lib/site-packages<br>> I have copied make_dlegend_xml.py. make_dlegend_xml_cgi.py,<br>> make_dlegend_xml.pyc into c:/inetput/scripts/<br>> I have modified the example.html to point the correct path<br>> In javascript console I get the error:<br>> Error: objDomTree.getElements("server")[0] has no properties<br>> Yet another dlegend initialization error. Implies that dlegend.js has<br>> received some data,
but not in the expected form<br>><br>> When I test the mapscript python installation I get the error:<br>> CGI Error<br>> The specified CGI application misbehaved by not returning a complete set of<br>> HTTP headers. The headers it did return are:<br><br>I don't think you have IIS configured to render any Python scripts.<br>IIS does not recognize the #!C:\Python24\python.exe convention.<br>Instead, you use IIS manager to map the .py extension to the Python<br>inturperter.<br><br>Open IIS manager, and properties for your web site, pick<br>"configuration" from the "Home Directory" tab. Under the "mappings"<br>tab, pick "Add":<br> Executable: C:\Python24\python.exe -u %s %s<br> Extension: .py<br> Verbs: All<br>Now try your test Python script.<br><br>If you are having troubles with make_dlegend_xml_cgi.py, call it<br>directly with something like:<br><br>http://localhost/make_dlegend_xml_cgi.py?map=/path/to/yourMapFile.map?server=localhost<br><br>This way
you will see errors that make_dlegend_xml_cgi.py produces,<br>not the downstream errors that is has created in your JavaScript.<br>e.g. objDomTree.getElements("server")[0] has no properties<br><br>Rich<br><br>-- <br>Richard Greenwood<br>richard.greenwood@gmail.com<br>www.greenwoodmap.com<br></williampaul28@yahoo.com></blockquote><br><p>
<hr size=1>Want to start your own business? Learn how on <a href="http://us.rd.yahoo.com/evt=41244/*http://smallbusiness.yahoo.com/r-index"> Yahoo! Small Business.</a>