require perl script for random html

Discuss Programming

Postby Calum » Sat Dec 11, 2004 11:12 am

bugger!

OK, well, the server is not under my control, sadly, so i will have to obviously do a little reading now, before taking any action... thank you for your comments, they are most helpful and i hope they will give me several good starting points for this...

not sure how quickly i can get behind this, but you are right it helps to know what i am actually doing! :-)
User avatar
Calum
guru
guru
 
Posts: 1343
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland

Postby Void Main » Sat Dec 11, 2004 11:31 am

It's possible that the server you are using is already configured to recognize *.shtml files as SSI files. Have you tried testing this? It also might be worth asking if they could turn it on for you, they might do it.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Calum » Sat Dec 11, 2004 5:45 pm

they might well do. last year they turned off directory listing (where you see the contents of a directory, if you just put www.sitename.com/directoryname/ into a browser, not sure if it has a real name) and i emailed them asking them to turn it back on, and they did, but no, haven't tested it yet, might not for a bit though, i am idiotically tired trying to earn some overtime before christmas

edit: hey hey! i just moved index.html to index.shtml and look! it (kind of) works!: www.polytheism.org.uk - it's kind of a bummer though as if i change all the pages to something.shtml i will have to go through them all again and change all the anchor tags to point to the new locations. well, such is life, i suppose! edit: thinking out loud alert... actually i could just make *html pages that redirect to the real shtml pages, although that'd be a bit messy. good stopgap measure though...

BUT instead of a quote, it now shows "[an error occurred while processing this directive]", this actually makes me happy! (because i know the error messages are my friends!) - what now! :-D

edit again:
when doing "perl qotd" from command line, i see this:
-bash-2.05b$ perl qotd
Too late for "-T" option at qotd line 1.
so i changed line 1 from "#!/usr/bin/perl -wT" to "#!/usr/bin/perl -w" - but this clearly isn't the issue, as no change. Is this a separate nono on its own? or am i OK to leave it as is now? apparently i have disabled tainting checks by emoving the "T", but does this make any difference, and is it in fact any use considering it's not my server anyway?
User avatar
Calum
guru
guru
 
Posts: 1343
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland

Postby Void Main » Sun Dec 12, 2004 7:04 pm

That error message is not coming from your perl script, it's coming from Apache because something is wrong with your SSI call. I was able to get the same error message by messing up the path to my CGI script. Can I see the source to your HTML file? I can't do a "View Source" because Apache has translated the SSI call.

You'll also likely see a better error message in the "error_log" for your site.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Calum » Mon Dec 13, 2004 3:03 pm

-bash-2.05b$ pwd
/home/6041/calum9/www.polytheism.org.uk/public_html
-bash-2.05b$ ls ../cgi-bin/
FormMail.pl qotd quotes.txt random.cgi randomnew.cgi
-bash-2.05b$ cat index.shtml
<!DOCTYPE public "-//wapforum//dtd wml 1.2//en" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="author" content="Calum">
<meta name="Keywords"
content="spirituality,religion,god,pagan,wicca,gods,muslim,christian,worship,bla
sphemy,norse,eclectic"> <meta name="Description" content="Integrational
Polytheism - Make up your own rules..."> <link rev="made"
href="mailto:polytheism@linuxmail.org.REMOVETHISBIT"> <meta name="robots"
content="index, follow"><title>Polytheism.org.uk - Religions of the
World</title></head><body bgcolor="#c8d290">
<br>

<table align="center" width="90%" bgcolor="#e8f2b0">
<tr>
<td align="center"><a
href="http://www.polytheism.org.uk/index.html">Home</a></td><td
align="center"><a href="http://polytheism.org.uk/ip/index.html">Integrational
Polytheism</a></td><td align="center"><a

href="http://polytheism.org.uk/religions/index.html">World Religions</a></td><td
align="center"><a
href="http://polytheism.org.uk/essays/index.html">Philosophical
Essays</a></td><td align="center"><a
href="http://polytheism.org.uk/bbs/index.php" target="_blank">Discussion
Forum</a></td></tr></table><br><table align="center" width="90%"
cellpadding="10" bgcolor="#e8f2b0"><tr>
<td valign="top">

<h3>World Religions, considered with an open mind</h3>
<p>
Hello and welcome to Polytheism.org.uk. This website aims to spotlight various
religions of the world and hopefully to provide some interesting information
about religions you may not know about or may want to know more about. Please
use the quick hyperlinks at the top of each page to find each section of the
site.</p><p>This website sprung up from my own interest in world religions. This
interest has prompted me to search out literature, stories and other information
about various religions which I attempt to present in an easy to understand way
on the site. I like to think that the information here is accurate and correct,
so if you see any inaccuracies, i would appreciate it if you could send me an
email to <u><i>calum</i> <b>@</b> <i>polytheism.org.uk</i></u> so i can correct
the spurious information in question. The site is definitely not limited, by the
way, to smaller religions, although i confess to being more interested in them.
I hope to continue to include features about Christianity, Judaism and other
mainstream religions.</p><p>The other important function that this site provides
is to let you know about <a href="ip/index.html">Integrational Polytheism</a>,
or Inclusional Polytheism as it has been called. This is my own view of
religion. You could call it a sect, a cult, a way of life, a cultural position
or many other things, but basically it is a religious framework describing what
I actually believe myself. It is a little different from the other religions
featured here as it is a "new" religion and it is also non-exclusive, meaning
that is does not exclude belief in other religions (quite the opposite in
fact!).</p><p>There is also a <a href="bbs/index.php" target="_blank">public
discussion forum</a>, feel free to read and contribute to the various
discussions that are going on there. You're more than welcome to talk about
things other than religion in the forum as well, i might add.</p></td>
<td
width=300 valign="top"><img src="logo.jpg">
<p><!--#include virtual="../cgi-bin/qotd"-->
</p>
</td></tr></table><a
HREF="http://www.monkeys.com/spammers-are-leeches/"> </a></body></html>
-bash-2.05b$ tail -15 ../logs/error_log
[Mon Dec 13 20:03:42 2004] [error] [client 24.132.104.233] File does not exist: /home/6041/calum9/www.polytheism.org.uk/public_html/missing.html
[Mon Dec 13 20:29:57 2004] [error] [client 209.193.50.99] Invalid URI in request GET / HTTP/1.1
[Mon Dec 13 20:29:57 2004] [error] [client 209.193.50.99] unable to include "../cgi-bin/qotd" in parsed file /home/6041/calum9/www.polytheism.org.uk/public_html/index.shtml
[Mon Dec 13 20:29:57 2004] [error] [client 209.193.50.99] premature EOF in parsed file /home/6041/calum9/www.polytheism.org.uk/public_html/index.shtml
[Mon Dec 13 20:51:33 2004] [error] [client 81.129.16.47] Invalid URI in request GET / HTTP/1.1
[Mon Dec 13 20:51:33 2004] [error] [client 81.129.16.47] unable to include "../cgi-bin/qotd" in parsed file /home/6041/calum9/www.polytheism.org.uk/public_html/index.shtml
[Mon Dec 13 20:51:33 2004] [error] [client 81.129.16.47] premature EOF in parsed file /home/6041/calum9/www.polytheism.org.uk/public_html/index.shtml
[Mon Dec 13 20:52:12 2004] [error] [client 81.129.16.47] File does not exist: /home/6041/calum9/www.polytheism.org.uk/public_html/bbs/images/avatars/990731982419360b7ad7c7.jpg
[Mon Dec 13 20:52:12 2004] [error] [client 81.129.16.47] File does not exist: /home/6041/calum9/www.polytheism.org.uk/public_html/missing.html
[Mon Dec 13 20:54:56 2004] [error] [client 65.54.188.57] File does not exist: /home/6041/calum9/www.polytheism.org.uk/public_html/robots.txt
[Mon Dec 13 20:54:56 2004] [error] [client 65.54.188.57] File does not exist: /home/6041/calum9/www.polytheism.org.uk/public_html/missing.html
[Mon Dec 13 20:56:23 2004] [error] [client 81.129.16.47] File does not exist: /home/6041/calum9/www.polytheism.org.uk/public_html/bbs/images/avatars/990731982419360b7ad7c7.jpg
[Mon Dec 13 20:56:23 2004] [error] [client 81.129.16.47] File does not exist: /home/6041/calum9/www.polytheism.org.uk/public_html/missing.html
[Mon Dec 13 20:56:23 2004] [error] [client 81.129.16.47] File does not exist: /home/6041/calum9/www.polytheism.org.uk/public_html/bbs/images/avatars/7484995763e48f3267fa9a.jpg
[Mon Dec 13 20:56:23 2004] [error] [client 81.129.16.47] File does not exist: /home/6041/calum9/www.polytheism.org.uk/public_html/missing.html


i hope this is meaningful, i wonder what all those missing things mean too, must look into that...

edit: well, they mean all the avatars are gone, i must have deleted them all when i replaced the phpbb 2.0.4 files with the 2.0.11 ones...
User avatar
Calum
guru
guru
 
Posts: 1343
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland

Postby Void Main » Mon Dec 13, 2004 3:08 pm

Get rid of the ".." in your SSI call. Make it "/cgi-bin/qotd".
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby Calum » Mon Dec 13, 2004 6:48 pm

thanks! it works, you are a star.

why was it wrong? from a shell prompt the terminology is correct.
User avatar
Calum
guru
guru
 
Posts: 1343
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland

Postby Void Main » Mon Dec 13, 2004 7:15 pm

But it's relative to your DocumentRoot path not the real path that you need to use. "../cgi-bin" does not get you to "/cgi-bin" from "/" if that makes any sense. Think of how the browser would see it.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Previous

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests