Php Guestbook delete problem

More
16 years 8 months ago #850 by Redy4it
I am using the latest php guestbook and the only thing I have changed is in the header and that was just the bg color. The problem I have is when I delete anything in the guestbook from the admin page, I get multiple deletes. It will delete one then the next time it deletes 2 at a time.

Randy T.

Please Log in or Create an account to join the conversation.

More
16 years 8 months ago #851 by Pete
Replied by Pete on topic Php Guestbook delete problem
That is obviously not a standard issue with the guestbook system. My guess is it may be related to the customization that you have made on the header file.

Can you post your header file's code here? Also, what is your PHP version, Server Operating System and Webserver?

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

More
16 years 8 months ago #852 by Redy4it
Hi Pete, my server os is Fedora 7, php is 4.4.7 they will be changing to 5 soon....
webserver is www.redy4it.com
below is my header code, btw thanks for checking this! :)
and here is an error from the log:
Code:
[08-Jan-2008 14:34:46] PHP Warning: fread() [<a href='function.fread'>function.fread]: Length parameter must be greater than 0. in /home/redy4it/public_html/guestbook/admin/delete_process.php o n line 64
Code:
Header: <?php session_start(); ?> <!-- NOTE: PLEASE DO NOT REMOVE THE BELLOW 3 LINES FROM YOUR HEADER FILE --> <?php include("gbclass.php"); include("config.php"); include("language/$default_language"); ?> <!-- NOTE: PLEASE DO NOT REMOVE THE ABOVE 3 LINES FROM YOUR HEADER FILE --> <html> <head> <title>Randy's Guestbook</title> <link rel="STYLESHEET" type="text/css" href="style.css"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- body { background-color: #336600; } --> </style></head> <body text="#000000" link="#8080ff" vlink="#0000ff" alink="#ffff00"><center> <h1><?php echo $headingtitletxt ?></h1> <br><br> <center> [ [url=guestbook.php]<b><?php echo $addentrytxt ?></b>[/url] ] [ [url=list.php?page=1&order=asc]<b><?php echo $viewguestbooktxt ?></b>[/url] ]<br> [ [url=list.php?page=1&order=asc]<?php echo $newpostfirsttxt ?>[/url] ] [ [url=list.php?page=1&order=desc]<?php echo $newpostlasttxt ?>[/url] ]</center> <br> <form action="search.php" method=post> <table border=0 cellpadding=2> <tr> <td><font size="1">Enter Search <b>WORD</b>:</font></td> <td align=left><input type="text" name="search_term" size=20 maxlength=50><input type=submit value="Find Now!"></td> </tr> </table> </form> <br>

Please Log in or Create an account to join the conversation.

More
16 years 8 months ago #853 by Pete
Replied by Pete on topic Php Guestbook delete problem
Open file delete_process.php. Replace lines 63 to 65:
Code:
$handle = fopen($filename, "r"); $datain = fread($handle, filesize($filename)); fclose($handle);

With the following:
Code:
$datain = file_get_contents($filename);

Let me know if this resolves your problem.

Pete

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

More
16 years 8 months ago #854 by Redy4it
Well I replaced it and so far so good :)
Will watch it over the next couple of days.
Thanks again for the nice program! :)

Randy T.

Please Log in or Create an account to join the conversation.

Time to create page: 0.131 seconds
Powered by Kunena Forum