Home   News  Product reviews  Website reviews  Forums   Competitions  Subscribe 
We've teamed up with Firebox.com to bring our readers and visitors the hottest gadgets in our very own shop!


Web Building >> Web design & build
 |  Print Topic
Jump to first unread post. Pages: 1
Terborch
regular


Reg'd: Thu
Posts: 29
php chat & mysql
      #328990 - Sat Jan 27 2007 02:00 AM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zippy_Brown
regular


Reg'd: Fri
Posts: 88
Loc: /dev/null
Re: php chat & mysql [Re: Terborch]
      #329023 - Sat Jan 27 2007 09:24 AM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
emailuser
regular


Reg'd: Wed
Posts: 190
Re: php chat & mysql [Re: Zippy_Brown]
      #329038 - Sat Jan 27 2007 11:19 AM

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 :-)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1

Rate this topic

Jump to


Extra information
0 registered and 0 anonymous users are browsing this forum.

Moderator:  putasolutions, Joe_London, greysts, bricat, Nanook, Hello_There, John_McKenna, Mouse, TheFatControlleR 


Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      Mark-up is enabled

Rating:
Topic views: 0

Contact Us | Privacy statement Main website