[mapserver-users] Couldn't run perl mapscript under Apache

Krung Saengpole krung at cad.go.th
Thu Nov 7 06:45:20 EST 2002


Hello all,

I had trouble getting perl mapscript run on Apache 1.3.26 under RH 7.2. Mapscript compiled from mapserver 3.6.3. 

My script is:

#!/usr/bin/perl
use mapscript;
use CGI qw/:standard/;

print header();
print start_html();
$map = new mapObj('mapfile.map');
$img = $map->draw();  # <---- error took place here
$img->saveImage('file.png', $mapscript::MS_PNG,1,1,0);
....
....

What I did wrong with this script or anything else? But I could run this script at command line. I'm very new to Linux. I tried to write a script that open database and run under Apache, it had no problem. So, I thought it should not be wrong with Apache configuration. 

Thank you in advance.
Krung.




More information about the mapserver-users mailing list