Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can someone please help me? 1

Status
Not open for further replies.

JoshuaLCx

Programmer
Oct 24, 2001
7
0
0
US
I have a cgi script for a greeting card secttion on my website but everytime I test it, it says error ./card.cgi line 1 near ". Then when I go to see what line 1 is, it is the line that says unix directory, which I know nothing about. Can someone please help me with the unix so that I can complete the greeting card section?
 
Sorry - can you be more specific? Does the line actually give the path to a unix script or command (an example might be /usr/bin/dosomething.sh or similar). If it does, are you sure that the file exists (if you can, try to cd to the directory in question and do ls <filename> to verify that it is there). Even if it exists, it's possible that you are not authorised to access it (check this with ls -la to give the various permissions). If you're able to post any output you get, that would help. Cheers.
 
Make sure it's in the correct format too. It should look something like this:
Code:
#!/usr/local/bin/perl
You can pass parameters to perl after it, like this:
Code:
#!/usr/local/bin/perl -w
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
You see, I am a newcomer to this stuff, so I don't even know what a Unix directory is. I just used the one that was already on the code when I got it from a website. And to really be truthful, I need some help on the whole script because I don't understand some of the things on it.
 
Unix directories are pretty much just like Windows directories, except they use forward slashes instead of backslashes, and they don't have a drive letter in front of them. The /usr/local/bin/perl in the !# line tells the server where the perl compiler (perl.exe) is located so it can run your program. Some ISPs put it in a different place. Your ISP should have a help file that tells you where it is, or you can get the info from support. Then just put what they tell you in the first line. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Can I not put a Unix directory on my Tripod.com account somewhere? Tripod.com is where I put the script that I got from the website.
 
I don't understand.
What does the ISP have to do with the Unix code?

Why can't you make one at an online web page editor system?

Is my ISP(Bellsouth.net)supposed to have a web page editor built in on it like Microsoft FrontPage?

I hate to ask you all these questions, but I really want to learn how to do this so that I can get ready to launch my website soon.

THANK YOU SO VERY MUCH
Josh Cox
 
Is it possible that I can show you(who ever replies to this message) the code that I have edited and you can see what I have done wrong? I don't know if this will work, but it sounds like it would be easier.
 
Yep. Just post a bit of the offending code and someone will take a look.

Greg.
 
Thank You!!!! The online editor that I am using(Tripod.com)already had a unix directory built in when I registered. But even though I have figured that out it still shows an error message it reads exactly:

It looks like there was an error:
Your script produced this error: syntax error at ./card.cgi line 489, near &quot;&quot;
Can someone please help me correct this error?
 
unfortunately there is no way to see the cgi code when accessing it thru the web server because the web server executes the code rather than just giving it to your browser. if you could post the cgi script here then people could point out where the problem is.

stan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top