|
|
|
Terborch
regular
Reg'd: Thu
Posts: 29
|
|
I got a php chat on my site and I got a warning:
Quote:
Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in drivers/adodb-mysql.inc.php on line 373
Session: connection failed
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at drivers/adodb-mysql.inc.php:373) in index.php on line 6
Heres the line the one about drivers/adodb-mysql.inc.php is looking at:
Quote:
$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->
heres the lines around it: Code:
if (ADODB_PHPVER >= 0x4300) $this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this-> clientFlags);
Heres the line the one about index.php is looking at: Quote:
session_start();
heres the lines around it: Code:
<?php
require_once ('includes/config.php');
$date = adodb_date("D, d M Y h:i a"); session_start();
require 'libs/Smarty.class.php';
What do I have to do.
|
|
Zippy_Brown
regular
Reg'd: Fri
Posts: 88
Loc: /dev/null
|
|
The first error is simply saying it cannot connect to your database, double check the following: - are your database username and password correct. It will fail if these are not right. - do you have permission to access your MySQL database via sockets? Check with your hosting company.
Do not worry about the second error. It is only showing because of the first error. Sessions can only be created if nothing has been written to the screen first, and because your error message has been displayed before the session tried to start, it generates a warning. Correcting the first issue will solve this one too.
-------------------- Zippy
|
emailuser
regular
Reg'd: Wed
Posts: 190
|
|
If you have windows web hosting then you could try www.phpchatroom.co.uk as it doesnt use mysql or sessions .
I known that because it was me who wrote it :-)
|
|
|