What setting I need in config.php when running at localhost?

69 views
Skip to first unread message

Nico Schumann

unread,
Mar 5, 2020, 1:25:03 PM3/5/20
to AJAX-chat
Hello, I want to set the stanalone version ajax-chat at localhost, just for testing. I followed the setup guideline provided with the sources, but It doesn't work.

I use ubunu 18.04.
The apache server works fine, also php-server and mysql.

Could it be that my chat/lib/config.php is wrong configured?
Here an extraction of:

// Database connection values:
$config
['dbConnection'] = array();
// Database hostname:
$config
['dbConnection']['host'] = 'localhost?';
// Database username:
$config
['dbConnection']['user'] = 'root';
// Database password:
$config
['dbConnection']['pass'] = 'my_MySQl_root_passwd?';
// Database name:
$config
['dbConnection']['name'] = 'chat';
// Database type:
$config
['dbConnection']['type'] = null;
// Database link:
$config
['dbConnection']['link'] = null;





Negative Edge

unread,
Mar 8, 2020, 1:09:51 PM3/8/20
to AJAX-chat
if not just localhost without the ? then your servers ip

Frug

unread,
Nov 15, 2020, 7:32:57 PM11/15/20
to AJAX-chat
I find in linux you often have to use the IP address for localhost instead of just 'localhost', even though you should have locahost mapped to it in /etc/hgosts. Try using 127.0.0.1 instead.
Reply all
Reply to author
Forward
0 new messages