Re[2]: [PHP-WIN] chatsystem problem

From: Date: Sun, 24 Dec 2000 04:50:07 +0000
Subject: Re[2]: [PHP-WIN] chatsystem problem
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-4646@lists.php.net to get a copy of this message
IMO I don't think that -even if it is possible- php is the best choice of a tool for a chat system. If you look at www.hotscripts.com you'll find some good ones in Javascript (matter of fact, top of the download list for several weeks now). Gonzalo. > You're getting the error because of PHP's timeout value, I suspect. You > could extend this timeout value, but I don't recommend it, as sooner or > later the script _should_ timeout. > I recommend rewriting the display page to use a meta refresh tag to refresh > every 10 seconds (or whatever interval you think is appropriate), and > possibly also make it refresh upon clicking the POST button on the input > form. (That would have to be done with JavaScript, which isn't always going > to work for everybody, but since you're not talking about core functionality > I don't see this as being a problem.) > Toby Butzon > [ criticism spurs improvement ] > ----- Original Message ----- > From: "dulidel the programmer" <dulidel@gmx.net> > To: <php-windows@lists.php.net> > Sent: Saturday, December 23, 2000 10:20 AM > Subject: [PHP-WIN] chatsystem problem > : HI all, i made a chat system with php and mysql , it works, thats the good > : thing, but after 30 seconds an php error message appears. Please help. > : > : I did it this way: > : > : one mysql database with one entry containing the message > : > : 2 frames one with the input one with the output > : > : i think the input is ok > : > : but i have trouble with the output it starts with the frame PHP file > : chat.php > : > : <HTML> > : <head> > : <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1"> > : <link rel=stylesheet type="text/css" href="format.css"> > : > : </head> > : > : <body> > : </body> > : </html> > : > : <?php > : require("chat4.php"); requires the chat 4 file below : ?>> > : > : > : chat4.php: > : > : <?php > : $db=mysql_connect("localhost","$benutzer","$passwort") or die > ("Konnte > nicht > : verbinden"); // writes the message in an variable > : mysql_select_db("abi")or die ("keine datenbank"); > : // writes the message in an variable > : $result = MYSQL_QUERY( "SELECT inhalt FROM nachricht WHERE (art = > : 'gesamt')"); // writes the message in an variable > : $row = mysql_fetch_row($result); > : // writes the message in an variable > : if ($oldrow!=$row) // if message in > : mysql not old message he writes the new message > : { > : $oldrow=$row; // if message in > : mysql not old message he writes the new message > : echo $row[0];echo"<br>"; // if message in mysql > : not old message he writes the new message > : } > : mysql_close($db); > : include("chat4.php"); // he includes the > : same file so that he does the same thing again : ?>> > : > : > : > : > : ps an endless repeat doesn't work, too > : > : > : please help > : > : > : > : -- > : PHP Windows Mailing List (http://www.php.net/) > : To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > : For additional commands, e-mail: php-windows-help@lists.php.net > : To contact the list administrators, e-mail: php-list-admin@lists.php.net > : > :

« previous php.windows (#4646) next »