-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.1] add port to db constructor by default #417
Comments
Okay, let's do this in Milestone 3.0 (end of 2014, early 2015), as this is not urgent and a more or less rare edge case. Thanks for the notice! |
panique
changed the title
Data Base connection - improve propose
[3.0] add port to db constructor by default
Apr 28, 2014
I wouldnt hardcode the port due to #423. Rather add it to your config.php as well. |
panique
added a commit
that referenced
this issue
Dec 27, 2014
panique
changed the title
[3.0] add port to db constructor by default
[2.1] add port to db constructor by default
Dec 27, 2014
Done in develop |
npuichigoB
added a commit
to npuichigoB/panique2
that referenced
this issue
Feb 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.
I had small issue with data base connection. On my server, port to data base need to be defined.
Simply add port number like: define('DB_HOST', 'my.server.com:3307');
in config.php doesn't work. I had to hard code DB port in Database class like so:
parent::__construct(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8';port=3307', DB_USER, DB_PASS, $options);
So, I have propose to include (maybe in some future version) something like
define('DB_PORT', '????');
or
define('DB_PORT', substr(strrchr(DB_HOST, ":"), 1));
The text was updated successfully, but these errors were encountered: