PC Playground  

Go Back   PC Playground > The Core > Scripting/Programming
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-08-2003, 06:16 AM
Senior Member
 
Join Date: Feb 2003
Location: Mars
Posts: 137
Default the trouble with Perl

The trouble with Perl seems to be that there's no error output when you screw something up. I've been trying to install a polling script on my site for two days now with no success.

http://www.cgi-world.com/pollit.html

It actually runs fine, loads and shows my poll, I can even log in to it's admin tool and view results, create new polls, change the poll, etc without probelms. The one error is that you can't vote. I've checked and quadruple checked all the settings. Everything is chmodded correctly according to the installation instructions, everything that should be uploaded in binary mode was, and the same for ASCII. All the files are in the right place too.

What the hell could be wrong? I heard of an editor called TextPad that let's you save files in UNIX format or Windows format. Do I need to use this? If so, should I save it in unix format and re-upload?

Some links :

http://arcticflare.pcplayground.com/cgi-bin/hello.cgi <---"Hello Internet World" Perl Test.

http://arcticflare.pcplayground.com/ <----- my index page with the poll on it, try voting and view the pretty 404 error page.
Reply With Quote
  #2 (permalink)  
Old 02-08-2003, 08:33 AM
Senior Member
 
Join Date: Feb 2003
Location: Mars
Posts: 137
Default

Sorry fo replying to my own post, but this is kinda important new information to this problem. After posting this topic, I decided to try a php poll, so I did. This time it's the same deal, everything works but you can't vote! There must be an SSI problem, because it works by itself

http://arcticflare.pcplayground.com/phppoll/poll.php

and allows voting.

But when it's loaded inside the index.shtml, it doesn't let you vote, error 404!

This is how I added it to my index.html :



And this is how I added the perl poll to my index.shtml "



So I'm hoping somebody smarter than me can shed some light on the problem.
Reply With Quote
  #3 (permalink)  
Old 02-08-2003, 08:36 AM
Member
 
Join Date: Jan 2003
Location: Netherlands
Posts: 75
Send a message via MSN to utimer
Default solution

I don't know what is causing this but I think it is the following:
Code:
<form method=GET action="index.html"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="0" width="0"> <form name=poll action=/phppoll/poll.php method=post>What should I add next? <input type=radio name=vote value=1>BBS <input type=radio name=vote value=2>Games <input type=radio name=vote value=3>Image Hosting <input type=radio name=vote value=4>WormRage Mods <input type=hidden name=mode value=vote> <input type=submit value=vote></form> Previous polls </td> </tr> </table> </form>
this is a part of your source, which contains TWO forms, removing the get-form should solve it. result:
Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="0" width="0"> <form name=poll action=/phppoll/poll.php method=post>What should I add next? <input type=radio name=vote value=1>BBS <input type=radio name=vote value=2>Games <input type=radio name=vote value=3>Image Hosting <input type=radio name=vote value=4>WormRage Mods <input type=hidden name=mode value=vote> <input type=submit value=vote></form> Previous polls </td> </tr> </table>
btw. place an index.html in the phppoll/ dir else anybody can view your files (in that dir)
Reply With Quote
  #4 (permalink)  
Old 02-08-2003, 08:43 AM
Senior Member
 
Join Date: Feb 2003
Location: Mars
Posts: 137
Default

Wow, thanks. Problem solved. And thanks for the other advice too, will do.
Reply With Quote
  #5 (permalink)  
Old 02-08-2003, 08:46 AM
Member
 
Join Date: Jan 2003
Location: Netherlands
Posts: 75
Send a message via MSN to utimer
Default

no problem
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:32 PM.