2p2r / velobs_web

Application web permettant aux cyclistes de signaler les problèmes sur les aménagements cyclables.
GNU General Public License v3.0
22 stars 14 forks source link

Database port setting is not used by the connection #110

Closed vinsnet closed 6 years ago

vinsnet commented 6 years ago

our database is not on default port ; the database could not be connected

gerald2545 commented 6 years ago

right, I have to test but I think the right way to go is to delete the PORT constant in key.php file and add the port in the HOST one : define('HOST', 'server_url:Port');

gerald2545 commented 6 years ago

oups, I closed this issue. Even if I put the following host, the connection is OK...seems that mysql change the specified port by the default one if it does not succeed to connect. define('HOST', 'localhost:8800');//8800 is not he port mysql listens to //define('PORT', '3306'); could you please tell me if this configuration is OK for you, with your port number?

Thank you

vinsnet commented 6 years ago

I'm ok with the merge of port and host settings (since other php project config is done that way) define('HOST', 'localhost:3307');

(I'm a php newbie : my proposals could seem weird to you :) )

vinsnet commented 6 years ago

What do you think to rename HOST to DB_HOST ?

This will let HOST available to the config of the app host ( this could be useful when sending mail or another action)

I understand that is a change with some impact. feel free to stop me :)

gerald2545 commented 6 years ago

OK to merge host and port in the same constant. why not renaming HOST to DB_HOST, shouldn't be too difficult

gerald2545 commented 6 years ago

implemented and the upgrade procedure (https://github.com/2p2r/velobs_web/wiki/Mise-%C3%A0-jour) was too updated