Using QGIS project saved in Postgres as project file for QGIS server - postgresql

I am trying to set up a Qgis server on debian that uses a Qgis project file stored in a Postgres db.
To get started I followed the official Qgis Training Module Lesson 12.1.
When using a project file stored locally on the server, it works fine.
Now I tried to change the "default qgis project" in the qgis.demo.conf file and indicate my project file stored in the postgres database according to this template : postgresql://localhost:5432?sslmode=disable&dbname=mydb&schema=myschema&project=myproject which I found in the QGIS User Guide.
My edited line in the qgis.demo.conf looks like this:
SetEnv QGIS_PROJECT_FILE postgresql://localhost:5432?sslmode=disable&dbname=Test&schema=public&project=world
When doing a GetCapabilities request I now get:
"WMS configuration error" There was an error reading the project file or the SLD configuration.
I looked in the qgis.server.log to understand what is going wrong.
"Error, configuration file 'postgresql://localhost:5432?(...)' does not exist"
I am able to access the stored project file with qgis and with pgadmin 4 I can see that it is stored in the database.
Do I indicate the project file wrong?

you should complete the connectionstring with user and password
SetEnv QGIS_PROJECT_FILE postgresql://user:password#localhost:5432?sslmode=disable&dbname=Test&schema=public&project=world

Related

MySQL extension not working in GeoServer 2.19.3

I downloaded the MySQL extension for GeoServer but the option for adding a MySQL database as a new store in GeoServer is not displayed. There are no issues reported in the log after restarting GeoServer.
My GeoServer version: 2.19.3
MySQL extension: https://phoenixnap.dl.sourceforge.net/project/geoserver/GeoServer/2.19.3/extensions/geoserver-2.19.3-mysql-plugin.zip
I copied the zip archive contents to /opt/apache-tomcat-8.5.73/webapps/geoserver/WEB-INF/lib
I also modified the ownership of each file in the archive
to tomcat:chown -R tomcat:tomcat
I restarted GeoServer.
The log details can be found here: https://1drv.ms/t/s!AoHzL3uXbH31izDQWgrzDijr6uLY?e=8zeU8i
Any suggestions would be welcome.
Thanks.

neo4j apoc import/export not working. How to modify the neo4j.conf file?

I am a beginner user of neo4j. I am trying to export a simple graph in .graphml format in order to be able to visualize it in Gephi. Even though the apoc procedures seem to be successfully installed, a command like CALL apoc.export.graphml.all("C:/path/to/folder/file.graphml",{}) generates the following error:
apoc.export.graphml.all is not available due to having restricted
access rights, check configuration*.
I tried to modify the neo4j.conf file (which I copied and pasted into the conf folder of the default graph database folder in Documents) adding dbms.security.procedures.unrestricted=apoc, shutting down and restarting neo4j with no success.
I am using Windows 10 and I have installed the NEO4J 3.2.1 Community Edition version (installer version). Any help appreciated.
I tried to modify the "neo4j.conf" file (which I copied and pasted
into the conf folder of the default graph database folder in
Documents) adding "dbms.security.procedures.unrestricted=apoc.*",
shutting down and restarting neo4j with no success.
According the documentation, the correct file location of neo4j.conf file for Windows installations is %APPDATA%\Neo4j Community Edition\neo4j.conf.
So edit the above file and put into it the line dbms.security.procedures.unrestricted=apoc.*".

restore database PgAdmin4

i am trying to restore database in PgAdmin 4 and getting an error
"[Errno 2] No such file or directory" with i assume is related to the the backup file, which is located in /Users/myuser/Downloads/dbupload (PostgreSQL installed on my local machine). This makes me believe that the issue is not with the file but with the link to the file.
In pgadmin 3 all is working ok and given that pgadmin was related a few weeks ago, i am not getting much support online.
Any assistance is highly appreciated.
This is already answered: "[Errno 2] No such file or directory" when trying to backup a database in pgAdmin4
And make sure you use pgAdmin4 file manager to locate your file & once your file is selected using file manager, it displays properly in Filename filed
/Users/myuser/Downloads/dbupload/< your_selected_restore_file >
if you see /Users/myuser/Downloads/dbupload/ means your file is not selected properly.
So, you have to go to OTHER LOCATIONS, then:
var/lib/pgadmin/storage/postgres_localhost
There, I created a folder called Backup and put all the backup files from the Databases.
Remember that you need to access these locations as Root.
You can do that either by installing Nautilus, then clicking with the right-button on the folder and Open as Administrator (you will be requested your password of course).

could not load library for oracle_fdw

I am facing issue while creating oracle_fdw.
I have copied oracle_fdw.dll to postgres lib folder *
both .sql file and control file to shrared/extension
now when I connect to psql with superadmin user & make an query
create extension oracle_fdw;
I am getting response
ERROR: could not load library "D:/postgresdb/lib/oracle_fdw.dll": The specified procedure could not be found.
From the error it seems that the oracle_fdw library is not available in the lib folder of postGreSQL installation directory.
You may download the Oracle fdw extension/or library file from https://github.com/laurenz/oracle_fdw/releases/ - please download the one suitable to your system environment(eg : 32bit windows/64bit).
Extract the downloaded .zip file.
copy the oracle_fdw.dll from \oracle_fdw-1.4.0-pg95-win64\lib folder to \Program Files\PostgreSQL\9.5\lib dir
&
2.copy all the files from oracle_fdw-1.4.0-pg95-win64\share\extension to \Program Files\PostgreSQL\9.5\share\extension
Now restart postGreSQL server and try.
Note : Always download and use compatible version of library; e.g.: PostgreSQL 9.5 version you should download same version of oracle_fdw zip.
Just had the same problem so this is what i did to resolve it. Not sure if all steps are needed since i was trying untill it worked.
Downloaded:
Instant Client Package
Instant Client Package - SQL*Plus
Instant Client Package - ODBC
From oracle (http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html)
Unzipped everything to one folder (c:\oracle)
Ran odbc_install in that folder
Added folder to PATH variable (System properties - Environment variables)
Restarted postgresql server
After that it worked. Also notice that you need the same version as your server (x86, x64).
Hope this helps.

trouble configuring zend framework with netbeans 6.9!

i am new to zend framework. i am trying to create a zend framework project in netbeans 6.9. but the ide shows some error, i couldn't understand. the following are the screenshots that could illustrate my problem.
the following are the error message shown in the ide log:
***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.
The easiest way to get the zf command running is to give it the include
path via an environment variable ZEND_TOOL_INCLUDE_PATH or
ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
then run the command "zf --setup". This command is designed to create
a storage location for your user, as well as create the zf.ini file
that the zf command will consult in order to run properly on your
system.
Example you would run:
$ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf --setup
Your are encourged to read more in the link that follows.
Zend_Tool & CLI Setup Information
(available via the command line "zf --info")
* Home directory found in environment variable HOMEPATH with value \Documents and Settings\oandz
* Storage directory assumed in home directory at location \Documents and Settings\oandz/.zf/
* Storage directory does not exist at \Documents and Settings\oandz/.zf/
* Config file assumed in home directory at location \Documents and Settings\oandz/.zf.ini
* Config file does not exist at \Documents and Settings\oandz/.zf.ini
To change the setup of this tool, run: "zf --setup"
can any one give the procedure to set-up zend framework and to configure it with netbeans 6.9 starting from scratch.
thanks in advance.
It looks like the cli Zend_Tool isn't being called. I'm not a windows man so the best I can provide is a link Using the CLI Tool there's a section on setting up in Windows.
The images are quite small so I'm guessing a bit but it looks like you pointed netbeans at the zf.bat file, are the permissions correct?
i resolved the problem. the problem is with zend framework 1.10.x itself. i just downloaded the latest version of the zend frame work and it just worked fine.