我正在尝试将一个Webserver + Mapserver迁移到一个新的Ubuntu12.04机器上。所有事情(apache2,mapserver6.2.1)到目前为止都在工作,除了一个tilecached wms服务(安装了tilecache 2.11-2 ),它需要额外的身份验证。
当我直接调用cgi脚本(它处理请求)时,我会得到以下错误:
An error occurred: cannot identify image file
File "/usr/lib/pymodules/python2.7/TileCache/Service.py", line 343, in cgiHandler
format, image = service.dispatchRequest( params, path_info, req_method, host )
File "/usr/lib/pymodules/python2.7/TileCache/Service.py", line 208, in dispatchRequest
return self.renderTile(tile, params.has_key('FORCE'))
File "/usr/lib/pymodules/python2.7/TileCache/Service.py", line 138, in renderTile
data = layer.render(tile, force=force)
File "/usr/lib/pymodules/python2.7/TileCache/Layer.py", line 436, in render
image = self.renderMetaTile(metatile, tile)
File "/usr/lib/pymodules/python2.7/TileCache/Layer.py", line 397, in renderMetaTile
image = Image.open( StringIO.StringIO(data) )
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1980, in open
raise IOError("cannot identify image file")我搜索了几个小时,但是找不到映射文件或tilecache.cfg中的错误配置。所有文件也应具有正确的权限。不幸的是,我的access和error.log没有告诉我更多关于这方面的信息。
我最后的猜测是python2.7F.E中的一些东西发生了变化。不同的参数(在我们使用python 2.53之前)。
我知道我的问题有点弱,但也许有人也有类似的情况。或者有人有提示,还有什么可以测试来找出错误呢?
带着亲切的问候,
Toni
发布于 2014-01-03 18:40:36
哦不!如果有人有同样的问题,
检查
allow_url_fopen = 在您的php.ini中,出于安全原因,我把它转了。当然,WMS不能工作!!
https://serverfault.com/questions/564826
复制相似问题