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

From: Date: Sun, 24 Dec 2000 05:17:16 +0000
Subject: Re: Re[2]: [PHP-WIN] chatsystem problem
References: 1 2 3  Groups: php.windows 
Request: Send a blank email to php-windows+get-4647@lists.php.net to get a copy of this message
----- Original Message ----- From: "Gonzalo Vera" <gvz@eucalipto.net> To: "Toby Butzon" <php-lists@imawebdesigner.com> Cc: "dulidel the programmer" <dulidel@gmx.net>; <php-windows@lists.php.net> Sent: Saturday, December 23, 2000 11:50 PM Subject: Re[2]: [PHP-WIN] chatsystem problem : IMO I don't think that -even if it is possible- php is the best : choice of a tool for a chat system. I didn't say that it wasn't, but I disagree. PHP can be transformed into many things, including a chat system, if you want to. But people have become so used to chat systems such as IRC, Instant Messaging and the likes, that I think many will wonder why one would publish an HTTP-based chat system. Java solutions exist and can be written, and for an live-chat environment, I think Java or a downloadable client (coupled with a live server) would be the best way to go. People like speed, and a PHP page would have to be refreshed or you've got an unterminating process. The former just isn't acceptable to most web users, and the latter seems to be a sloppy practice, IMO. : 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). That's nice, but I thought PHP was the best choice? A little more coherence might help your argument be a clearer to me ;) : : Gonzalo. : And I still say the following is both the reason your error is occuring and the best solution for your troubles. -Toby Butzon- : > 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 : > : : > : : : : : -- : 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 (#4647) next »