[Fixed] A valid hostname is needed

Hello All,

I am getting an error when I add Host name in the Database Configuration.

I am entering the correct host name but is still saying " A valid host name is needed ".

Please help.


  • That error is generated when the database hostname fails the hostname REGEX. What hostname are you using?
  • Damian, I am using localhost:3660
  • edited January 2017

    /cc-install/database.php line 76, change
    $dbc = @mysql_connect ($hostname, $username, $password);to
    $dbc = @mysql_connect ($hostname . ':3660', $username, $password);

    and on /cc-core/lib/Database.php line 22, change
    $this->_connection = new PDO('mysql:host=' . DB_HOST . ';dbname=...to
    $this->_connection = new PDO('mysql:host=' . DB_HOST . ';port=3660;dbname=...

    This is an omission in our code that will be added in our next 2.5 release.
  • Use another browser. Might have to do with the cache
  • This has been resolved in 2.5.
This discussion has been closed.