Closed nicogodet closed 1 year ago
HI,
I don't reproduce the issue :-/ No problem with PHP 8.1 and Qgis 3.22 with Debian 10. No errors into lizmap/var/log/ ?
Hi, I can't reproduce neither.
@nboisteault We discussed with Laurent on IRC yesterday trying to investigate. It could be a local issue and I will try a fresh install on fresh server soon.
Ok I close, reopen if needed.
I've done a fresh install on new server and I have the exact same error.
(Can't reopen by myself)
And again, installing php7;4 solves the issue
Can you provide the https://yourhost_and_path_to_lizmap/index.php/view/app/metadata ?
Do you have an error in qgis server log ? I can't help you to configure it with spawn-fcgi
but the docs provide it:
The PHP Fatal Error provided is more about an issue to reopen database connection than a request error
PHP Fatal error: Uncaught Error: PostgreSQL connection has already been closed in /var/www/lizmap-web-client-3.5.4/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php:179
You can probably fix this Error with pgsql.auto_reset_persistent
I reproduce the errors in a vagrant VM, with the installation script given above.
@rldhont
{"info":{"version":"3.5.5","date":"2022-07-21"},"dependencies":{"jelix":{"minversion":"1.1.6","maxversion":"1.6.*"}},"qgis_server":{"test":"OK","mime_type":"text\/xml; charset=utf-8","http_code":500,"response":"<ServerException>Project file error. For OWS services: please provide a SERVICE and a MAP parameter pointing to a valid QGIS project file<\/ServerException>\n"},"qgis_server_info":{"metadata":{"commit_id":"a8e9e6fae5","name":"Bia\u0142owie\u017ca","py_qgis_server":false,"py_qgis_server_version":"","version":"3.22.9","version_int":32209},"plugins":{"atlasprint":{"commitNumber":"unknown","commitSha1":"unknown","dateTime":"unknown","version":"3.3.1"},"lizmap_server":{"commitNumber":"1","commitSha1":"063960540d85f30099519dccb8913a1eba2f5c0a","dateTime":"2022-06-29T05:49:09Z","version":"1.0.2"},"wfsOutputExtension":{"commitNumber":"1","commitSha1":"d94b53f82946a1f289b05214a0e64e4d0471d38d","dateTime":"2022-03-24T10:48:18Z","version":"1.7.0"}},"services":["WMS","WFS","WCS","WMTS","ATLAS","EXPRESSION","LIZMAP"]}}
The PHP error about the postgresql connection, is because in the profiles.ini.php, there are two profiles, jdb:jauth
and jdb:lizlog
, having the same parameters. Jelix has two connection objects into its pool, but PHP maintain only one connection because of the equality of parameters. So when the two connection objects are destroy, pg_close is called twice, and is called in reality twice on the same real pg connection. So it is closed at the first call of pg_close, but it failed at the second call of pg_close, as the connection is already closed by the first one.
A temporary solution is to declare only one profile : delete the jdb:lizlog
section, and add into the jdb
section : lizlog=jauth
. I will see if I can make an improvement into Jelix to avoid this error. I don't know yet why it doesn't appear with PHP 7.4 and lower. It seems PHP 8.1 manage the postgresql connection differently than PHP 7.
This fix doesn't fix the error with the Lizmap plugin, so I think the errors are unrelated. There is an other problem.
@nicogodet do you still have the error in lizmap plugin ?
with PHP 8.1 when you have a response for https://yourhost_and_path_to_lizmap/index.php/view/app/metadata
With the temporary solution, I do not have an error in lizmap plugin any more, neither in php.log
This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎
Not stale :)
It is fix into the upcoming 3.6.1
What is the bug?
Original mailing list issue: https://lists.osgeo.org/pipermail/lizmap/2022-July/000517.html
Using php8.1, Lizmap qgis plugin fails to retrieve metadata and throw a 500 http error.
Looking at php error log, I have this PHP Fatal error:
If I use php7.4, plugin can successfully retrieve metadata.
Let me know if you need additional logs.
Steps to reproduce the issue
Versions
Check Lizmap plugin
QGIS server version, only if the section above doesn't mention the QGIS Server version
3.22.8
Operating system
Debian 10
Browsers
Chrome
Browsers version
Not relevant
Relevant log output
No response