If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Advanced Poll 2.03 Voting  XML
Forum Index » Support Forum
Author Message
RiSkE
Beginner

Joined: 08/03/2005 13:50:06
Messages: 5
Offline

Whenever I vote, pressing refresh will prompt me to resend data, and my vote will be counted again. Also, if I reload (not refresh) the page, it asks me to vote again instead of displaying the results! Any idea what could be wrong?

The webpage is http://coa.ausut.com/index.html

I thought that having the poll data in a seperate folder might be the problem, but I tried a test file in the same folder, and had the same problem (http://coa.ausut.com/poll/test.htm).

I have figured out how to block an IP for a set number of hours, but that's not really much of a help. Surely the page should also be using cookies or similar to block users from re-posting their vote.

For reference, index.html includes side.htm (HTM is PHP enabled on my host), which has (in terms of relevant stuff):

<?php
require ("http://coa.ausut.com/poll/poll_cookie.php");
?>

<html><head>

//Script for date

</head><body>

//Table setup and titles, etc

<?php

$poll_path = "/data/www/agn_38896/coa.ausut.com/html/poll";

require $poll_path."/include/config.inc.php";
require $poll_path."/include/$POLLDB[class]";
require $poll_path."/include/class_poll.php";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();

$php_poll = new poll();


echo $php_poll->poll_process(newest);

?>

//Rest of document

</body></html>


I have also tried putting the require poll_cookie line in the index.html file before the <html> tag, and the same in the test file in the poll directory, but with no luck.

Any help would be appreciated.
Anonymous



I have voted and there isn't a problem with IE, but with Netscape I received the same message.
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

it doesn't appear to be writing the cookie.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Change the path in the require for the poll_cookie.php file.

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
RiSkE
Beginner

Joined: 08/03/2005 13:50:06
Messages: 5
Offline

Change it to what? If I make the require point anywhere else, all I get is errors because it can't load! I've made it require ("./poll/poll_cookie.php"); but that's just loading the exact same thing.

The problem is occurring in IE and Firefox, and a mate who I got to check it is having the same problem.
RiSkE
Beginner

Joined: 08/03/2005 13:50:06
Messages: 5
Offline

Actually, when I change it to what I said above, I get:

Warning: Cannot modify header information - headers already sent by (output started at /data/www/agn_38896/coa.ausut.com/html/index.html:20) in /data/www/agn_38896/coa.ausut.com/html/poll/poll_cookie.php on line 21

Very wierd.
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

search on cannot add headers.

remove any white space eg. empty lines and/or spaces.

search the link up the top there.

second line is the solution.

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
RiSkE
Beginner

Joined: 08/03/2005 13:50:06
Messages: 5
Offline

Can't find anything wrong there. It's just got a title.

The following code is on the demo page. Do I actually need any of it besides the require poll_cookie.php bit? There is no mention of it on the side.

<?php
$poll_path = dirname(__FILE__);
if (eregi("WIN",PHP_OS)) {
$poll_path = str_replace("\\","/",$poll_path);
}
require "./poll_cookie.php";
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
?>
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

RiSkE wrote:Warning: Cannot modify header information - headers already sent by (output started at /data/www/agn_38896/coa.ausut.com/html/index.html:20) in /data/www/agn_38896/coa.ausut.com/html/poll/poll_cookie.php on line 21


search on this forum. using-- warning: cannot add headers.

then you'll find the solution to the problem.

is the page you've included the poll have a .html/.htm extension?
if so it should be .php

edit; to get rid of the error search this forum for i just said and that'll get rid of the error!!!

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
RiSkE
Beginner

Joined: 08/03/2005 13:50:06
Messages: 5
Offline

The page including the poll is HTML or HTM, depending where you go, but my server provides PHP support in both. I just changed it all over to PHP, and there is no change.
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum