Re: PostGIS with Mapserver/Mapscript 4.0 - how to stop warning messages... - Mailing list pgsql-cygwin
From | Mike Leahy |
---|---|
Subject | Re: PostGIS with Mapserver/Mapscript 4.0 - how to stop warning messages... |
Date | |
Msg-id | 001201c37cb4$e037b2d0$0100a8c0@MGLEAHY Whole thread Raw |
In response to | PostGIS with Mapserver/Mapscript 4.0 (Mike Leahy <mgleahy@fes.uwaterloo.ca>) |
List | pgsql-cygwin |
All, I've eventually determined that my problem is in fact related to the warning messages. While the best solution is to wait for the latest mapserver build, I decided to see if it would work if I could stop those messages. So I basically just wiped any code in PostgreSQL that sent those specific messages. Now it all works like a charm. Here are the actual changes I made: pquery.c - lines 112-113 commented out: elog(WARNING, "Closing pre-existing portal \"%s\"", portalName); xact.c - line 1562 commented out: elog(WARNING, "BEGIN: already a transaction in progress"); The only problem with this is, I'd rather not be blocking warning messages. I'd prefer that they were directed specifically to the log file, rather than just disappearing them with the approach I used above. Someone from another list suggested I do something to handle the stderr calls by writing a custom notice handler that to send them somewhere. I think such a task is beyond my skills at the moment. I did try setting-up the postmaster service with the parameter '--sterr' directed to a log file, but that made no change to the output in the PHP script. I actually found that a log file was already being kept by default anyway. Would anybody know of another option that might be better than just hacking the source code? Kind regards, Mike -----Original Message----- From: pgsql-cygwin-owner@postgresql.org [mailto:pgsql-cygwin-owner@postgresql.org] On Behalf Of Mike Leahy Sent: September 15, 2003 12:51 PM To: postgis-users@postgis.refractions.net; pgsql-cygwin@postgresql.org Subject: [CYGWIN] PostGIS with Mapserver/Mapscript 4.0 Hello All, Here's my current problem, for those that haven't seen my post in other groups: I've just now been able to get maps working in MapLab, using PostGIS layers (PostGIS 0.7.5 in PostgreSQL 7.3.4-2, built in cygwin on WinXP). The maps display fine, and if I do a point query, that also works fine. However, there are two problems that occur when I query multiple objects (i.e., with a box query instead of a point). First, and more important, is that the ROSA applet doesn't display the image. If I go directly to the IMG_URL parameter for the Rosa applet, the image is there, and looks fine, but the actual applet just gives me a white box, with the navigation controls visible. Second, I get a series of warning messages in the query attributesn (tacked on to the end of the HTML text right after the last </html> tag), such as the following: WARNING: BEGIN: already a transaction in progress WARNING: Closing pre- existing portal "mycursor" WARNING: BEGIN: already a transaction in progress WARNING: Closing pre-existing portal "mycursor" WARNING: BEGIN: already a transaction in progress WARNING: Closing pre-existing portal "mycursor" WARNING: etc... I finally figured out that these are the messages that are being returned by PostgreSQL - with the older versions of Mapscript and PostGIS, the messages were just sent to the command window that was running postmaster. The same thing happens with the newer Mapscript (4.0) and the older version of PostgreSQL/PostGIS (unknown). So here's my question to the PostgreSQL/PostGIS experts - is there any way I can prevent PostgreSQL/PostGIS from writing its warning messages to the output from the PHP script? I have no idea where the logs from the postmaster service are being saved - I'd prefer if I could get the warnings sent there only, and not to the mapscript DLL. Many thanks, Mike ---------------------------------------- This mail sent through www.mywaterloo.ca ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly
pgsql-cygwin by date: