[Mapserver-users] Success! Was: php_mapscript on a host - nightmare! help!
poff
poff at sixbit.org
Thu Aug 14 02:05:57 PDT 2003
finally I have got a map to draw!
For others here is what I had to do using a host with the php_module, 25mb
space, and linux.
Actually I used another account with 100+mb to actually compile php, but
installed with a 6mb shapefile the whole setup takes 10mb.
get php-4.3.1 (NOT 4.3.2 as it won't work: "Cannot find input file" bug)
./configure --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr
-with-mysql=/usr --with-pear --with-ttf --with-freetype-dir=/usr
--enable-gd-native-ttf --with-zlib --enable-force-cgi-redirect
make
cp sapi/cgi/php ~/pkg/bin
get mapserver (tested with 3.6)
compile --with-php your compiled version (well configured really)
make
copy the .so file to your mapscripts directory
cd ~/public_html/mapscripts
cat <<END > .htaccess
SetEnv REDIRECT_STATUS CGI
END
cat <<END > draw.cgi
#!${HOME}/pkg/bin
<?php
dl("php_mapscript.so");
phpinfo();
?>
chmod +x draw.cgi
Works fine, not sure how much slower it is though.
Nice thing about linux is that it compiled very easily with libjpeg, gd and
png support.
The trick is not to specify a --prefix so it uses the system extensions -
pear works fine too.
P
On Sat, Aug 02, 2003 at 04:43:25PM +0200, poff wrote: > Sorry for the title.
>
> I'm using a commercial host to host my site, and am trying to get
> php_mapscript working.
>
> So far I had to:
>
> get and configure php sources in ${HOME} for regex
> compile mapserver (after a lot of tweaking)
>
> Get it listed in phpinfo.
>
> Then be told, when I try using it I need to recompile as a CGI!
>
> I can't ask for this as this is a shared server. What should I do?
>
> Does mapscript 4 bypass this requirement? I'm trying to compile 3.6 at the
> moment, on a red hat server.
>
> Thanks for any tips,
> --
> poff at sixbit.org
> SDF Public Access UNIX System - http://sdf.lonestar.org
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
--
poff at sixbit.org
SDF Public Access UNIX System - http://sdf.lonestar.org
Please do not carbon copy replies to me
More information about the MapServer-users
mailing list