希望你能幫助我......過去2天我一直在這裏,不得不承認我很難過。在運行PHP腳本時獲取errno 2
我使用的操作系統是Ubuntu 9.10 Karmic。
我成功安裝並測試了Mapserver。對於我的一流的項目,我有我使用創建圖層下面看到一個PHP腳本....
我得到運行一個命令行提示符腳本時的錯誤:
Warning: [MapServer Error]: msProcessProjection(): no system list, errno: 2
in /var/www/mapserverdocs/ms4w/apps/world/mapscripts/staticwms.php on line 16
Warning: Failed to open map file static.map in /var/www/mapserverdocs/ms4w/apps/world/mapscripts/staticwms.php on line 16
Fatal error: Call to a member function owsdispatch() on a non-object in /var/www/mapserverdocs/ms4w/apps/world/mapscripts/staticwms.php on line 18
PHP SCRIPT:
<?php
if (!extension_loaded("MapScript")) dl("php_mapscript");
$request = ms_newowsrequestobj();
foreach ($_GET as $k=>$v) {
$request->setParameter($k, $v);
}
$request->setParameter("VeRsIoN","1.0.0");
ms_ioinstallstdouttobuffer();
$oMap = ms_newMapobj("static.map");
$oMap->owsdispatch($request);
$contenttype = ms_iostripstdoutbuffercontenttype();
if ($contenttype == 'image/png') {
header('Content-type: image/png');
ms_iogetStdoutBufferBytes();
} else {
$buffer = ms_iogetstdoutbufferstring();
echo $buffer;
}
ms_ioresethandlers();
?>
我所做的目錄和文件,世界各地的rwx只是爲了確保它不是一個權限問題
任何幫助將不勝感激!
感謝
克里斯
static.map與.php文件的關係在哪裏? – meagar 2010-09-26 00:58:43