a damsel in distress
What's wrong with my script?
I need to add a forum to my site (in Hebrew). I used a ready-made script and changed it to Hebrew. So far so good.
It was working fine - I swear!
Then, I wanted to put the whole thing with my site template. So I changed only the HTML parts of the script.
Next thing I know the script doesn't work at all and all I get is the 500 error message.
What do you think might have happened? Could it be any of these -
1. My script became too long (is there such a thing?)
2. The Javascript and/or CSS in my HTML conflict with the Perl (is there such a thing?)
Any ideas?
There's nothing wrong with the permissions by the way. I tripled checked and they're all chmoded to 755.
I would be eternally greatful for any clues.
Anat.
Mike Fisher posted this at 16:51 — 7th August 2000.
They have: 429 posts
Joined: Jul 2000
I'll take number two, Johnny!
What script was this?
[If it's UBB, I understand fully--same thing happened to me.]
richjb posted this at 17:41 — 7th August 2000.
They have: 193 posts
Joined: Feb 2000
Anat,
Here are the answers to your two questions:
print "
print qq|
print qq~
There are other cases, but those are the most common (usually the first). Your problem is that you may be ending the print statement too soon. You see, when you say: print ", the script will then print untill it finds another ". The only way to fix this, if it is your problem, is to exscape the " by typing \" instead.
This code works:
print "I am now printing.";
This code will NOT work:
print "I am "now" printing";
This code WILL work:
print "I am \"now\" printing.";
If this is your problem, you have two solutions: 1) replace all the " with \" or 2) just change print " "; to print qq| |; and make all the | inside the print statement become \|. There are usually less |'s than "'s, if any at all.
Another thing you might want to "exscape" is the @, no matter what kind of print statment you use. This will also cause an error; simply make it \@ to avoid this though.
Hope that helped. If you weren't able to fix it, make sure to post back with your WHOLE script code.
[edit]I always mess up on those UBB list commands. ;)[/edit]
Richard
[Edited by richjb on 08-07-2000 at 01:43 PM]
[email protected]
Everyone here has a website. It's just that not all are worth posting (Mine! ).
anat posted this at 18:08 — 7th August 2000.
They have: 304 posts
Joined: Dec 1999
Thank you both for the replies.
I used an eof to print the HTML and I thought that meant I could use anything I like. I'll try to get rid of the @ for staters.
What I did meanwhile is simply to take off all the HTML code (execpt for the "head", "body" and "html" tags) just to see if the script was running.
It is running but now I see there's another problem.
It is a BBS script of sorts. It's meant to create a directory on my server where it's supposed to store all my forum data. This is what it says (with the original documentation )-
--------------------------------------
# Set-Up Variables
# The document-root environment variable is used to find your path so
# that you can easily transfer the script between servers without having
# to change anything. If it doesn't work you can manually state the full
# path for the $forumdir variable
$root = "$ENV{'DOCUMENT_ROOT'}";
# This is the directory which all the data files for the forum will be
# held. Most likely you'll want to have it as a sub-directory off of
# your cgi-bin but it can be anywhere. This directory will be created
# by the script so you need not set up any thing before hand.
$forumdir = "$root/cgi-bin/dforum/forumdata";
-------------------------------
Yet it doesn't make the directory anywhere. I tried changing the $root variable and assigning my root URL by myself like it says but I'm not sure how. I tried my full URL, my IP address and a whole bunch of variations on those two.
Any ideas?
Thanks a milion,
Anat.
Mike Fisher posted this at 18:17 — 7th August 2000.
They have: 429 posts
Joined: Jul 2000
You need to use the full path if you're going to resert that root value.
[I believe.]
You need to contact your web host about what your full path to the CGI bin and other such things are.
Mike Fisher - TWF Conquerer
"Don't trust a spiritual leader that cannot dance."
anat posted this at 19:16 — 7th August 2000.
They have: 304 posts
Joined: Dec 1999
It's finally working!
After 3 hours of trying every possible combination for that path I've finally made it.
I had to look up scripts that my host provides and copy the path from them. They do state what the path should be in their manual, but it took me ages to discover that this is not really the path.
Trial and error - the best method there is, I guess.
Thanks everyone!
richjb posted this at 20:13 — 7th August 2000.
They have: 193 posts
Joined: Feb 2000
Glad to hear everything worked out. Seems like most of my typing didn't even help.
Richard
Mike Fisher posted this at 16:18 — 8th August 2000.
They have: 429 posts
Joined: Jul 2000
See? Goes to show you that you should never try -too- hard.
Lazy = better.
VIVA LA... LAZINESS!
richjb posted this at 17:06 — 8th August 2000.
They have: 193 posts
Joined: Feb 2000
Thanks for that philosiphy...I'll make sure to bring it up whrn someone calls me lazy.
Richard
Mike Fisher posted this at 17:11 — 8th August 2000.
They have: 429 posts
Joined: Jul 2000
Yes, you should.
(Chomps off his own thumb with a sander.)
Laziness strikes again! Turning it off would have been -so- time consuming.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.