PHP setup using tomcat
Mark Howard
mhoward at AKIMEKA.COM
Thu Sep 21 11:47:24 PDT 2006
Thanks for the reply Jacob. I'm using tomcat for my webapps 'cause we do
a lot of servlet/jsp stuff in this environment. I've used mapserv in
WIN/IIS a LONG time now - as I'd initially had problems getting it
working in tomcat. Unfortunately to run IIS and tomcat, one needs to run
port 80 and the other another port like 8080 (yea you can
proxy).......... so I'd like to run everything in one environment. One
good offshoot of this exercise is getting mapserv to run in tomcat --
our production server is UNIX (no IIS). I'm trying to get a test server
up to run Ka-Map. My first e-mail detailed my progress. I've got the
sample app (KA-EXPLORER!) running in a new context. I'm just not getting
any services or maps. I've configured the config.php to use a tested
mapserv map file. I've observed that the sample app calls "init.php" --
"http://my_server/ka-map/init.php"
So yes - Ka-Map is php-based BUT it appears that php has to run in a web
app container. I'd be interested in finding out how to test/debug this
problem.
Are you using Ka-Map now?
Mark
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Delfos, Jacob
Sent: Wednesday, September 20, 2006 5:21 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] PHP setup using tomcat
Mark,
I don't believe there is a very simple solution to getting php to run on
tomcat. I had to do it myself a while ago, and it seems the general
agreement out there is that for best performance, you should run PHP
using Apache webserver (on port 80), and then use a proxy/reverse proxy
for running Tomcat on a different port, proxied through the normal
Apache webserver. You can then run Tomcat on a different port, while
running Apache on the normal port. This works for me, but I'm no expert
on this.
Is there any reason why you are using Tomcat? You mentioned it's for
Ka-Map, but Ka-Map is php-based.
Regards,
Jacob
> -----Original Message-----
> From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Mark Howard
> Sent: 21 September 2006 11:14
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] PHP setup using tomcat
>
> I'm setting up a Tomcat server to use for ka-maps. I've got mapserv
> working correctly in the C:\tomcat\webapps\ROOT\WEB-INF\cgi folder
> (as http://my_server/cgi-bin/mapserv.exe).
>
> So this works fine:
> http://my_server/cgi-bin/mapserv.exe?REQUEST=GetMap&VERSION=1.
> 1.1&MAP=C:
> \tomcat\webapps\ka-map\Akidemo\AkiDemo1.map&SRS=EPSG:4326&bbox
> =-180,-90,
> 180,90&width=200&height=200&layers=countries&format=image/PNG
>
>
> I've got PHP installed and configured -- php.exe and php.ini are in
> C:\WINDOWS\system32 and the php.ini extension_dir =
> /ms4w/Apache/php/ext/
> This works on the command line - for example:
> php quickmap.php > zzz.png
>
> makes a perfectly good png.
>
> Where quickmap.php has
> // define variables
> define( "MAPFILE", "C:/tomcat/webapps/ka-map/AkiDemo1.map" );
> define( "MODULE", "php_mapscript_48.dll" );
>
>
> However If I access the same php file in a web context, I just get the
> php file streamed back. Obviously php is not running. I tried putting
> php and all the dll's in the cgi folder (probably stupid - eh?).
>
> Do I need to download and install a php class library (jar)
> to run as a
> servlet - as in these instructions? --
>
> http://blog.taragana.com/index.php/archive/running-php-5x-on-w
> indows-usi
> ng-tomcat-4x-or-5x/
>
>
> OR is there something simple I'm missing in the system configuration
> (web.xml....)????
>
>
> TIA for any assistance!!!!!
>
> Mark
>
>
> JMEWS II/Medical Situational Awareness (MSA)
> Akimeka, LLC
> 1305 North Holopono Street, Suite # 3
> Kihei, HI 96753
> Office (808) 442-7137
> Fax (808) 442-7140
> Cell (303) 829-1255
> mhoward at akimeka.com
>
More information about the MapServer-users
mailing list