[mapserver-users] small mapserver admin tool errors

kaaos moizkfov at gmail.com
Mon Dec 12 16:30:27 EST 2011


Hi. 

Im writing a small admin tool for MapServer for own use in PHP with
MapScript. 

I'm building a mapfile object with ms_newMapObj() and then throwing elements 

into database, forms, etc. 

I've got this problem that when a mapfile has errors (pure simple like 

'IMAGETYPE "pnhgg"' instead 'IMAGETYPE "png"') the mapscript parser throws
an 

error and the whole application stops. 

The thing is that I want the application on to at least tell the user, that
his 

mapfile has errors and for example open a textarea where the user could edit
his 

whole mapfile without throwing it to ms_newMapObj(). 

I tried many things but nothing seems to work. The thing is, it's 

msPostMapParseOutputFormatSetup() which actually crashes and which is used
by 

ms_newMapObj(). I dont have access to msPostMapParseOutputFormatSetup(). 


Sample: 


A PHP Error was encountered 
Severity: Warning 
Message: ms_newMapObj(): [MapServer Error]:
msPostMapParseOutputFormatSetup(): 

Unable to select IMAGETYPE `pnfg'. 
Filename: controllers/program.php 
Line Number: 35 

Fatal error: Uncaught exception 'MapScriptException' with message 'Failed to 

open map file "D:\ms4w\Apache\htdocs\p3\p3.map"' in 

D:\ms4w\Apache\htdocs\ci_doctrine\system\application\controllers\program.php:35 

Stack trace: #0 

D:\ms4w\Apache\htdocs\ci_doctrine\system\application\controllers\program.php(35)

: ms_newMapObj('D:\ms4w\Apache\...') #1 

D:\ms4w\Apache\htdocs\ci_doctrine\system\application\controllers\program.php(10)

: Program->index() #2 [internal function]: Program->save_f_tmp() #3 

D:\ms4w\Apache\htdocs\ci_doctrine\system\codeigniter\CodeIgniter.php(236): 

call_user_func_array(Array, Array) #4 

D:\ms4w\Apache\htdocs\ci_doctrine\index.php(115): 

require_once('D:\ms4w\Apache\...') #5 {main} thrown in 

D:\ms4w\Apache\htdocs\ci_doctrine\system\application\controllers\program.php
on 

line 35 

Fatal error: Uncaught exception 'MapScriptException' with message 'Failed to 

open map file "D:\ms4w\Apache\htdocs\map_file\map_file.map"' in 

D:\ms4w\Apache\htdocs\ci_doctrine\system\application\controllers\load_controler.

php:35 Stack trace: #0 

D:\ms4w\Apache\htdocs\ci_doctrine\system\application\controllers\load_controler.

php(35): ms_newMapObj('D:\ms4w\Apache\...') #1 

D:\ms4w\Apache\htdocs\ci_doctrine\system\application\controllers\load_controler.

php(10): Program->index() #2 [internal function]: Program->svft() #3 

D:\ms4w\Apache\htdocs\ci_doctrine\system\codeigniter\CodeIgniter.php(236): 

call_user_func_array(Array, Array) #4 

D:\ms4w\Apache\htdocs\ci_doctrine\index.php(115): 

require_once('D:\ms4w\Apache\...') #5 {main} thrown in 

D:\ms4w\Apache\htdocs\ci_doctrine\system\application\controllers\load_controler.

php on line 35 

Thanks for any help.

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/small-mapserver-admin-tool-errors-tp7087821p7087821.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list