mikelbring / tinyissue

Simple Issue Tracking for Teams
MIT License
769 stars 204 forks source link

install.php: Error messages don't give enough info on what went wrong #216

Closed eddie-dunn closed 3 years ago

eddie-dunn commented 10 years ago

I was trying to install tinyissue but it kept failing on check_connect(), giving me the unhelpful error '<strong>Database Connect Error.</strong>!'. MySQL was up and running and I had provided the correct credentials.

I changed the function to

if(!$connect)
{
    return array('error' => '<strong>Database Connect Error: </strong>!' . mysql_error());
}

This actually gave me the error message I needed (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock # Debian squeeze: /var/run/mysqld/mysqld.sock' (13)) to solve the problem -- use 127.0.0.1 instead of localhost as the address in the tinyissue config file.

Anyway, more informative error messages would be nice.

ellisio commented 10 years ago

@mikelbring Not sure if you're aware, but "localhost" is considered bad practice as it's considered a hostname and some user's configurations will be setup to not allow hostnames when trying to connect.

eddie-dunn commented 10 years ago

I wasn't aware of that. Then maybe the file config.app.example.php should be changed to use something better?

ajira86 commented 10 years ago

You are right, it's illogical to propose localhost as example and having an error message like this -_- Perhaps better to put host_name or host_ip ?