[Mapbender-users] Mapbender3-3.0.5.3: Error after updating PHP5 to PHP7

Uwe Seher uwe.seher at gmail.com
Wed May 3 00:14:32 PDT 2017


Hello group!

Last week we had to update our server including a switch from PHP5 to PHP7.
Everything worked fine, but after the update the digitizer element in
mabender produces an sql-error.
If the digititzer is activated, every move of the map produces the
following error-message:

*Feature API: Abfrage fehlgeschlagen."<!DOCTYPE html>\n<html>\n <head>\n
<meta charset=\"UTF-8\" />\n <title>An Error Occurred: Internal Server
Error</title>\n </head>\n <body>\n <h1>Oops! An Error Occurred</h1>\n
<h2>The server returned a \"500 Internal Server Error\".</h2>\n\n <div>\n
Something is broken. Please let us know what you were doing when this error
occurred.\n We will fix it as soon as possible. Sorry for any inconvenience
caused.\n </div>\n </body>\n</html>\n"*

The mapbender log shows the following:





*[2017-05-03 06:14:44] request.CRITICAL: Uncaught PHP Exception
Doctrine\DBAL\DBALException: "An exception occurred while executing 'SELECT
id, ST_ASTEXT(ST_TRANSFORM(geom, 25832)) AS geom, id, short_name, xcoord,
ycoord, bwastrid, station, dist, srid, description, site_type, priority,
planned, organization, issued_by, contact, is_valid, created, created_by,
last_edit, edited_by FROM mrh_1509.erkundung_06_2017 t WHERE () LIMIT
250':  SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near ")"
LINE 1: ...dited_by FROM mrh_1509.erkundung_06_2017 t WHERE () LIMIT
25...                                                              ^" at
/srv/www/htdocs/mapbender3-3.0.5.3/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php
line 91 {"exception":"[object] (Doctrine\\DBAL\\DBALException(code: 0): An
exception occurred while executing 'SELECT id, ST_ASTEXT(ST_TRANSFORM(geom,
25832)) AS geom, id, short_name, xcoord, ycoord, bwastrid, station, dist,
srid, description, site_type, priority, planned, organization, issued_by,
contact, is_valid, created, created_by, last_edit, edited_by FROM
mrh_1509.erkundung_06_2017 t WHERE () LIMIT 250':\n\nSQLSTATE[42601]:
Syntax error: 7 ERROR:  syntax error at or near \")\"\nLINE 1: ...dited_by
FROM mrh_1509.erkundung_06_2017 t WHERE () LIMIT
25...\n                                                             ^ at
/srv/www/htdocs/mapbender3-3.0.5.3/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91,
PDOException(code: 42601): SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax
error at or near \")\"\nLINE 1: ...dited_by FROM mrh_1509.erkundung_06_2017
t WHERE () LIMIT
25...\n                                                             ^ at
/srv/www/htdocs/mapbender3-3.0.5.3/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:699)"}
[][2017-05-03 06:14:44] security.DEBUG: Write SecurityContext in the
session [] []prod.log lines 3827-3852/3852 (END)*
The same is found in the database log (postgresql 9.6.2, postgis 2.3.1:


*2017-05-03 06:14:44 GMT[[unknown]:xxx:59097554.1ed9d:0]ERROR:  syntax
error at or near ")" at character 2912017-05-03 06:14:44
GMT[[unknown]:xxx:59097554.1ed9d:0]STATEMENT:  SELECT id,
ST_ASTEXT(ST_TRANSFORM(geom, 25832)) AS geom, id, short_name, xcoord,
ycoord, bwastrid, station, dist, srid, description, site_type, priority,
planned, organization, issued_by, contact, is_valid, created, created_by,
last_edit, edited_by FROM mrh_1509.erkundung_06_2017 t WHERE () LIMIT 250*

Some weeks before updating the server i ran a database update, but after
that, it worked as expected. So i dont think, the database-upgrade is the
reason for this.
Executing the sql shows the error, which disappears when the empty
where-clause is deleted.
I have just no clue how to handle this, so every hint would be helpful.

Thanks in advance

Uwe Seher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20170503/edba8b95/attachment.html>


More information about the Mapbender_users mailing list