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 
Guide to installing PHPPoll  XML
Forum Index » Support Forum
Author Message
Anonymous



I have read through this forum, and the anount of people having problems without real answers to this subject is unreal.

I had many problems installing this, and the lame install text did not help me one bit! It took me about 2 weeks to get this script to work nearly properly.

This works with unix server with htaccess (may work without).

Ok, here how to get this script to work.

1, Create a folder/Dir on your server called 'poll'
2, Unzip the PHPpoll archive and copy all the contents of this to the 'poll' folder on the server. Remember any file that is not a image file should be uploaded as ascii and the images as binary.

So the dirtree should look like this on the server..

Poll
...../admin
...../image
...../etc..

Do not changed any of the folder names or this could stop the script from running.

3, Set up the permissions.
Give all *.php files a permission of 755 though

4, edit the include/config.inc.php with a text editor (notepad and nothing else) and change the first two lines to this....

$pollvars['base_url'] = "/poll";
$pollvars['base_gif'] = "/poll/image";

nb: if you are using the mysql version, remember to edit your database details!!! or you will get an error. If you do not have a database then use the text version of PHPPoll.

Save the file and copy it back to the same place on the server, with a 666 file permission.

5, On the server where your docs and html files are stored (normally the httpdocs or similar, look for .htaccess (that's if you server has this) and edit it adding these lines at the top....

Options Indexes FollowSymLinks Includes
AddType application/x-httpd-cgi .cgi
AddType text/x-server-parsed-html .html
AddType text/x-server-parsed-html .htm

(This lets you use the normal *.html extenstion)

and save and copy this back in the same place.

NB: If you do not have .htaccess, then make sure the webpage that has the <include file> (below) has an shtml file extenstion.

6, Go to http://www.yourdomain.com/poll/admin/ and when the script runs enter the default username and password. If you have any errors, check the paths are correct as in step 4 and all permissions are set as in the install.txt.

7, Once the sript as run, delete all existing polls (as you probably wont be using them) and then go to 'create a new poll' on the menu. Now create your new poll and save it.

8, leave the general settings alone for now and only edit them after the last step has been taken.

9, Your new poll should have a Poll ID of one.!!!

10, Launch your web disigner program (example: Frontpage or dreamweaver).

12, next, you need to enter the include file line that will call the poll to your webpage.

In front page, go to insert, advanced and then HTML and in the new box insert this line......

<!--#include virtual="/poll/poll_ssi.php?poll_id=1" -->

Or just enter the above into the html its self

DO NOT JUST PUT THIS STRAIGHT ONTO THE DESIGN PAGE (normal view in frontpage) IT HAS TO BE IN THE HTML CODE OR IT WONT WORK!

Now, close the box, save the page and copy this page over to the server.

In your browser, point to the the html file (ie index.html) that has the poll on it and it should be there, if there are any errors check through each stage for any error and correct them.

A small note on the poll not correctly counting the votes, ie, when you vote it is showing up as no vote. The vote is being registered! This problem seems to be down to a 'cookie' problem and if you delete all the cookies in IE or netscape and refresh the page, you will then see that text 'you have already voted' when you try to vote again.

Also, I have noted that sometimes the PHPpoll does not give the 'poll/polldata/1, 1.ip and session.php the correct file permissions. Set 1 and 1.ip to 666 and session.php to 777 and hopefully that may sort out a few problems.

Hope this helps
Anonymous



SWEET!

BOUT TIME SOMEONE DID THIS

SINCE THEY DIDNT
Anonymous



ummm no doesn't work.........
Anonymous



when you inset the phpfile that has poll onto the heml page this happens!

get_random_poll_id(); } } elseif ($poll_id=="newest") { $poll_id = $php_poll->get_latest_poll_id(); } if ($php_poll->is_valid_poll_id($poll_id)) { $voted = $php_poll->has_voted($poll_id); $is_active = $php_poll->is_active_poll_id($poll_id); switch ($action) { case "vote": $poll_type = (isset($random)) ? "random" : "poll_ident"; if (!$voted && isset($option_id)) { $php_poll->update_poll($poll_id,$option_id); header("Location: ".$poll_ref."?$poll_type=$poll_id"); exit(); } else { header("Location: ".$poll_ref."?$poll_type=$poll_id"); exit(); } case "results": if (($poll_ident == $poll_id) && isset($HTTP_SERVER_VARS['QUERY_STRING_UNESCAPED'])) { echo $php_poll->view_poll_result($poll_id,0); break; } default: if (!$is_active) { echo $php_poll->view_poll_result($poll_id,0); } elseif ($is_active && $voted) { echo $php_poll->view_poll_result($poll_id,1); } else { $php_poll->form_forward = $HTTP_SERVER_VARS['DOCUMENT_URI']; $poll_html = $php_poll->display_poll($poll_id); $poll_html = eregi_replace("action=\"$HTTP_SERVER_VARS[DOCUMENT_URI]\"", "action=\"$PHP_SELF?poll_ref=$HTTP_SERVER_VARS[DOCUMENT_URI]\"", "$poll_html"); echo "$poll_html"; } } } else { echo "Poll ID $poll_id does not exist."; } ?>

because an html page canrt display php code!!
Anonymous



Just renamed to whatever .PHP

Cya a
Anonymous



Gandalf
Beginner

Joined: 27/05/2002 13:11:13
Messages: 10
Offline

Hey Catzwolf, I'm so glad you posted that 'cos the readme is not very helpful.

I was able to log-in before that but the problem I have is getting the ssi call to display anything on the page. I have named the page with a .shtml extension and normally can call using <!--#include virtual="" --> without any problem. Only this time I get '[an error occured while processing this directive]' no matter what path I use.

Any thoughts?
[Email]
Anonymous



Anonymous wrote:
ummm no doesn't work.........


Then I can only say that your sever doesn't support either php, mysql or they may have restrictions on their sever, because I tested this about 5 times before I wrote the help file.
Anonymous



Gandalf wrote:
Hey Catzwolf, I'm so glad you posted that 'cos the readme is not very helpful.

I was able to log-in before that but the problem I have is getting the ssi call to display anything on the page. I have named the page with a .shtml extension and normally can call using <!--#include virtual="" --> without any problem. Only this time I get '[an error occured while processing this directive]' no matter what path I use.

Any thoughts?


Does sound like a path problem, email me private catzwolf@soundsstudio.co.uk, with the following details,

1, Server path to the Poll ie user/home/htdocs/poll
2, Virtual path, ie url address to the Poll http://www.myaddress.com/poll
2, Html code that you have for you shtml page

Will try and work it out for you and send it back!
Anonymous



PS: Sorry took me so long to reply
Anonymous



Is there a config file that I need to edit, to have the comment go to one of my email accounts...where is the comment sent by default? Also .... thanks to everyone with the great tips on installing Advanced Poll ... much appreciated!!! 8O
MPK
Newbie

Joined: 29/06/2002 02:58:15
Messages: 3
Offline

hey dude :)
Nice work on that tutorial. BTW, just chmoding them and chaning the director to /poll in config.inc.php got it working for me. Hopefully that will save somebody else some time.

All the best,
From Martin
[WWW]
Anonymous



Hey how can I do to make the results to open in a popup? WHat is the code to put on my page.
MPK
Newbie

Joined: 29/06/2002 02:58:15
Messages: 3
Offline

xbotchrockx, just do a popup window with the location of the ssi script.
[WWW]
Anonymous



You talk about ....
Set up the permissions.
Give all *.php files a permission of 755 though

=====

where do i put this permission? or where can I find this permission so I can set it to 755, etc?
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum