postgresq connexion error

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
mahmoud
Posts: 27
Joined: 27 Mar 2020, 22:01

postgresq connexion error

Post by mahmoud » 01 May 2021, 01:41

Hi
"php": "^7.3|^8.0",
"aimeos/ai-cms-grapesjs": "dev-master",
"aimeos/aimeos-laravel": "dev-master",
DB: Postgresql.

i use the same configuration (.env and shop.php) in the local version and hosted version.

One DB Postgresql 9.6 in Virtual server used .

when I use the local version (from 127.0.0.1) and DB in vitual server, everything is fine but when I use the same DB in web version it displays this message to me.

Code: Select all

SQLSTATE[08006] [7] could not connect to server: Connection refused Is the server running on host "xxx.10.137.xx" and accepting TCP/IP connections on port 5432? (SQL: select * from "sessions" where "id" = ToOd40DSTQi4x9dotDXXAi4d7Ss3fAlRMJpED3pd limit 1) 

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: postgresq connexion error

Post by aimeos » 01 May 2021, 15:59

The database connection details including the credentials are different on the hosted server for sure.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

mahmoud
Posts: 27
Joined: 27 Mar 2020, 22:01

Re: postgresq connexion error

Post by mahmoud » 01 May 2021, 19:00

Thank you for the reply.


I use GIT including .env.
File: .gitignore

Code: Select all

/node_modules
/public/hot
/public/storage
/ext/devoext/vendor
/storage/*.key
/vendor
.env.backup
.phpunit.result.cache
docker-compose.override.yml
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
In my post:

Code: Select all

git push origin master
In the hosting terminal:

Code: Select all

 git checkout -f 
 git pull origin master 
 php artisan config:cache ;php artisan cache:clear ; php artisan aimeos:clear;php ./artisan view:clear ;php ./artisan route:clear 
and i tested
I believe the configuration data is the same

Thank you

mahmoud
Posts: 27
Joined: 27 Mar 2020, 22:01

Re: postgresq connexion error

Post by mahmoud » 02 May 2021, 00:13

Hi,
Now I can say that (in hosted mode) the connection to a postgresql database is only done through port 5432, even we change the port in .env and shop.php. it does not accept ports other than 5432 (if the website is hosted).
but in local mode works perfectly.
i only changed the server port and .env and shop.php to 5432.
but I don't want to use this default port
thank you

Post Reply