Re: [mapserver-users] php mapscript loadQuery problem

2010-02-09 Thread Daniel Morissette

Lime, Steve D (DNR) wrote:


This will print the entire error stack one per line. PHP-MapScript must 
have something similar. We need to know if the problem is parsing the 
query file or if it’s running the query itself.




There is an example showing how to dump the error stack in PHP MapScript 
at http://mapserver.org/mapscript/php/index.html#errorobj-class


Daniel
--
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php mapscript loadQuery problem

2010-02-09 Thread Moen, Paul T.
This is the error I get when dumping the error stack as described below.

Error in msEvalRegex(): String failed expression test.


On Feb 9, 2010, at 7:51 AM, Daniel Morissette wrote:

Lime, Steve D (DNR) wrote:
 
 This will print the entire error stack one per line. PHP-MapScript must 
 have something similar. We need to know if the problem is parsing the 
 query file or if it’s running the query itself.
 

There is an example showing how to dump the error stack in PHP MapScript 
at http://mapserver.org/mapscript/php/index.html#errorobj-class

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php mapscript loadQuery problem

2010-02-09 Thread Daniel Morissette

Moen, Paul T. wrote:

This is the error I get when dumping the error stack as described below.

Error in msEvalRegex(): String failed expression test.



My first guess is that this error message comes from the file extension 
test on the filename of your query file. Your query file has to have a 
.qy extension if I'm not mistaken, otherwise MapServer won't open it.


This error message should definitely be improved.

Daniel
--
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php mapscript loadQuery problem

2010-02-09 Thread Moen, Paul T.

 Daniel Morissette wrote:
 Moen, Paul T. wrote:
 This is the error I get when dumping the error stack as described below.
 
 Error in msEvalRegex(): String failed expression test.
 
 
 My first guess is that this error message comes from the file extension 
 test on the filename of your query file. Your query file has to have a 
 .qy extension if I'm not mistaken, otherwise MapServer won't open it.
 
Oops, I did not know that.  I changed the extension to .qy and the loadQuery 
gives a MS_SUCCESS.  

The right items are high lighted now but I get many of the following errors 
when I dumping the error stack.

 Error in msEvalExpression(): Cannot evaluate expression, no item index defined.

This only seems to happen when there are many classes in the layer.  Are these 
errors expected?

Thanks, 

Paul
 

 This error message should definitely be improved.
 
 For the record, I have created a ticket to make sure we don't forget to 
 fix this error message:
 
 http://trac.osgeo.org/mapserver/ticket/3302
 
 Daniel
 -- 
 Daniel Morissette
 http://www.mapgears.com/
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php mapscript loadQuery problem

2010-02-08 Thread Moen, Paul T.
The query file parser will throw a detailed error message if it has a parsing 
problem.


Where would I look for the errors that the query file parser throws?  I don't 
see any in the error_log for apache, which is where all my php errors are 
logged.  Does that mean that the parser is having no problems parsing the file, 
but something else goes awry?

I added some information hoping it may help.

This is my command from php
$test = $map-saveQuery(/tmp/testfile.txt);
error_log($test. .MS_SUCCESS);
The output from the error_log line above is Testing save query: 0 0

I then try to load the query file with the following commands.
$test = $map-loadQuery(/tmp/testfile.txt);
error_log(Testing load = .$test. - .MS_SUCCESS);
The output from the error_log line above is Testing load = 1 - 0

Thanks,

Paul

On Feb 1, 2010, at 3:55 PM, Lime, Steve D (DNR) wrote:

I’ll send you more details when I get time tonite (I hope) and can test things. 
I’ve been using 5.6 save/load query functions a ton via the CGI but not PHP. I 
tested a bunch with Perl MapScript and will have to check those methods against 
what PHP is doing. Here’s what the lines mean:

Line – Contents
0 - magic string
1 - mode, type (single or multiple), qlayer, slayer
2 - point x, point y, buffer, max results (queryByPoint)
3 - query rect (minx, miny, maxx, maxy) (queryByRect)
4 - shp index, tile index, clear cache flag (queryByIndex)
5 - qitem or NULL (queryByAttribute)
6 - qstring or NULL
7 - operator (used by WFS)
8+ - query shape (queryByShape)

Basically each line or so after the first couple match a MapServer query method 
and it’s parameters. The file contents look fine to me. The query file parser 
will throw a detailed error message if it has a parsing problem.

Steve

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Moen, Paul T.
Sent: Monday, February 01, 2010 2:42 PM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] php mapscript loadQuery problem

I have not been able to get loadQuery to work.  The saveQuery command creates 
the file and returns MS_SUCCESS.  When I try to load the file using loadQuery, 
it always returns MS_FAILURE.  I get no other errors.   The permissions are 
good.  Is there a way to enable more verbose error logging to find out what is 
going on?  Is there any documentation on what should be in the saved file?

The following is the text from one of the saved query files.

MapServer Query - Generated by msSaveQuery()
1 2 83 -1
-1 -1 0 0
2183769.22727273 944435.909090909 2331977.40909091 1066349.09090909
-1 -1 1
NULL
NULL
-1
0

This is my version.

MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


Thanks,


Paul

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] php mapscript loadQuery problem

2010-02-08 Thread Lime, Steve D (DNR)
The way loadQuery works is like so:


1)  Load the queryfile into an internal queryObj

2)  Execute the query defined by the queryObj

If an error occurs at step 1 you'll get a load error of some sort.  If at 2 it 
is deeper inside one of the query methods. I'm not a PHP user but in Perl you 
can access the msGetErrorString() function like so:

  print mapscript::msGetErrorString(\n);

This will print the entire error stack one per line. PHP-MapScript must have 
something similar. We need to know if the problem is parsing the query file or 
if it's running the query itself.

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Moen, Paul T.
Sent: Monday, February 08, 2010 12:51 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] php mapscript loadQuery problem

The query file parser will throw a detailed error message if it has a parsing 
problem.


Where would I look for the errors that the query file parser throws?  I don't 
see any in the error_log for apache, which is where all my php errors are 
logged.  Does that mean that the parser is having no problems parsing the file, 
but something else goes awry?

I added some information hoping it may help.

This is my command from php
$test = $map-saveQuery(/tmp/testfile.txt);
error_log($test. .MS_SUCCESS);
The output from the error_log line above is Testing save query: 0 0

I then try to load the query file with the following commands.
$test = $map-loadQuery(/tmp/testfile.txt);
error_log(Testing load = .$test. - .MS_SUCCESS);
The output from the error_log line above is Testing load = 1 - 0

Thanks,

Paul

On Feb 1, 2010, at 3:55 PM, Lime, Steve D (DNR) wrote:

I'll send you more details when I get time tonite (I hope) and can test things. 
I've been using 5.6 save/load query functions a ton via the CGI but not PHP. I 
tested a bunch with Perl MapScript and will have to check those methods against 
what PHP is doing. Here's what the lines mean:

Line - Contents
0 - magic string
1 - mode, type (single or multiple), qlayer, slayer
2 - point x, point y, buffer, max results (queryByPoint)
3 - query rect (minx, miny, maxx, maxy) (queryByRect)
4 - shp index, tile index, clear cache flag (queryByIndex)
5 - qitem or NULL (queryByAttribute)
6 - qstring or NULL
7 - operator (used by WFS)
8+ - query shape (queryByShape)

Basically each line or so after the first couple match a MapServer query method 
and it's parameters. The file contents look fine to me. The query file parser 
will throw a detailed error message if it has a parsing problem.

Steve

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Moen, Paul T.
Sent: Monday, February 01, 2010 2:42 PM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] php mapscript loadQuery problem

I have not been able to get loadQuery to work.  The saveQuery command creates 
the file and returns MS_SUCCESS.  When I try to load the file using loadQuery, 
it always returns MS_FAILURE.  I get no other errors.   The permissions are 
good.  Is there a way to enable more verbose error logging to find out what is 
going on?  Is there any documentation on what should be in the saved file?

The following is the text from one of the saved query files.

MapServer Query - Generated by msSaveQuery()
1 2 83 -1
-1 -1 0 0
2183769.22727273 944435.909090909 2331977.40909091 1066349.09090909
-1 -1 1
NULL
NULL
-1
0

This is my version.

MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE



Thanks,



Paul

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] php mapscript loadQuery problem

2010-02-01 Thread Lime, Steve D (DNR)
I'll send you more details when I get time tonite (I hope) and can test things. 
I've been using 5.6 save/load query functions a ton via the CGI but not PHP. I 
tested a bunch with Perl MapScript and will have to check those methods against 
what PHP is doing. Here's what the lines mean:

Line - Contents
0 - magic string
1 - mode, type (single or multiple), qlayer, slayer
2 - point x, point y, buffer, max results (queryByPoint)
3 - query rect (minx, miny, maxx, maxy) (queryByRect)
4 - shp index, tile index, clear cache flag (queryByIndex)
5 - qitem or NULL (queryByAttribute)
6 - qstring or NULL
7 - operator (used by WFS)
8+ - query shape (queryByShape)

Basically each line or so after the first couple match a MapServer query method 
and it's parameters. The file contents look fine to me. The query file parser 
will throw a detailed error message if it has a parsing problem.

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Moen, Paul T.
Sent: Monday, February 01, 2010 2:42 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] php mapscript loadQuery problem

I have not been able to get loadQuery to work.  The saveQuery command creates 
the file and returns MS_SUCCESS.  When I try to load the file using loadQuery, 
it always returns MS_FAILURE.  I get no other errors.   The permissions are 
good.  Is there a way to enable more verbose error logging to find out what is 
going on?  Is there any documentation on what should be in the saved file?

The following is the text from one of the saved query files.

MapServer Query - Generated by msSaveQuery()
1 2 83 -1
-1 -1 0 0
2183769.22727273 944435.909090909 2331977.40909091 1066349.09090909
-1 -1 1
NULL
NULL
-1
0

This is my version.

MapServer version 5.6.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER 
SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


Thanks,


Paul
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users