[Mapbender-users] Mapbender3-3.0.5.3: Error after updating PHP5 to PHP7
Gero Wahren
g.wahren at klemm-hensen.de
Wed May 3 02:01:09 PDT 2017
Hi,
i have the same problem. It seem's that the database-query is'nt well formed. I think that the where-clause don't have to be empty.
Please correct me.
Query:
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
I searched a little bit and you can fix it , when you uncheck the "currentExtend" for the digitizer or Pipe it with all in your yaml-File. "currentExtend|all".
I think that the Plattformname changed in PHP 7 so the genIntersectCondition-Function generates an empty where-clause.
Mit freundlichen Grüßen
Gero Wahren
Dipl.-Inf.
25 Jahre Ingenieurbüro Klemm & Hensen GmbH
Ingenieurbüro Klemm & Hensen GmbH
Fabrikstraße 18 | 04178 Leipzig
T: +49 341 45311-13
F: +49 341 45311-88
M: +49 176 10609065
E: g.wahren at klemm-hensen.de
W: www.klemm-hensen.de
Erfolgreich zertifiziert nach ISO 9001:2008.
Geschäftsführer: Günter Klemm | Gerald Schäfer
Sitz der Gesellschaft: Fabrikstraße 18 | 04178 Leipzig
Registergericht: Amtsgericht Leipzig | HRB 2522
----- Ursprüngliche Mail -----
Von: "Uwe Seher" <uwe.seher at gmail.com>
An: "Mapbender User List" <mapbender_users at lists.osgeo.org>
Gesendet: Mittwoch, 3. Mai 2017 09:14:32
Betreff: [Mapbender-users] Mapbender3-3.0.5.3: Error after updating PHP5 to PHP7
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 291
2017-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
_______________________________________________
Mapbender_users mailing list
Mapbender_users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapbender_users
More information about the Mapbender_users
mailing list