Re: chatsystem problem
| From: | Gonzalo Vera | Date: | Sat, 23 Dec 2000 17:13:29 +0000 |
| Subject: | Re: chatsystem problem | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4638@lists.php.net to get a copy of this message | ||
Try set_time_limit(10000) or something like it, if the error reported
is a timeout. Place it at the beggining of the script.
Gonzalo.
> 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