I installed today phpgedview and I had problems with the pdo_mysql. I found a bug and the solution to this one.
This is the problem:
in the config.php in line 38 is normaly: "$DBHOST='localhost'; //- Host where MySQL database is kept" .
But this leads on some Servers the Error: "ERROR 2: PDO::__construct()", because the pdo want to have 127.0.0.1 to work.
Solution:
After changing the line to "$DBHOST='127.0.0.1'; //- Host where MySQL database is kept" the System worked.
Yours
usb-linux
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not necessarily a 'bug' but rather that your hosts file has not been configured on your server with the phrase:
127.0.0.1 localhost
Some prefer this setup as it has been viewed that the use of 'localhost' can be more easily hacked within the HOSTS file and diverted to an external IP, say
80.80.80.80 localhost
However, the preponderance of configs use the host file for the equivalency of 127.0.0.1 = localhost
If you choose not to configure it as such, for whatever the reasons (can't, won't), this is easy remedied as you suggested in altering your database host information, as you did. Still, IMHO, I would not necessarily refer to it as a bug. -Stephen[/color/
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Out of interest, if your MySQL server is configured to accept direct connections (via a socket), rather than over a network port (127.0.0.1:3306), then you can connect directly to the database by specifying a host of just a dot/period "."
This bypasses the network protocol, and can give slightly better performance.
YMMV
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I installed today phpgedview and I had problems with the pdo_mysql. I found a bug and the solution to this one.
This is the problem:
in the config.php in line 38 is normaly: "$DBHOST='localhost'; //- Host where MySQL database is kept" .
But this leads on some Servers the Error: "ERROR 2: PDO::__construct()", because the pdo want to have 127.0.0.1 to work.
Solution:
After changing the line to "$DBHOST='127.0.0.1'; //- Host where MySQL database is kept" the System worked.
Yours
usb-linux
Not necessarily a 'bug' but rather that your hosts file has not been configured on your server with the phrase:
127.0.0.1 localhost
Some prefer this setup as it has been viewed that the use of 'localhost' can be more easily hacked within the HOSTS file and diverted to an external IP, say
80.80.80.80 localhost
However, the preponderance of configs use the host file for the equivalency of 127.0.0.1 = localhost
If you choose not to configure it as such, for whatever the reasons (can't, won't), this is easy remedied as you suggested in altering your database host information, as you did. Still, IMHO, I would not necessarily refer to it as a bug.
-Stephen[/color/
Out of interest, if your MySQL server is configured to accept direct connections (via a socket), rather than over a network port (127.0.0.1:3306), then you can connect directly to the database by specifying a host of just a dot/period "."
This bypasses the network protocol, and can give slightly better performance.
YMMV