Click to See Complete Forum and Search --> : need help installing a CGI script


jaxfan11
02-24-2004, 04:49 AM
First off i uploaded the script from the server, where it says upload files ....is this the way to do it? i keep reading about FTP but do i really need it? and do i just upload all files inside the CGI-BIN folder?


I am trying to install a CGI script.

It says execute the setup.pl file (i am guessing this means place the URL in the browser) and it says it should work and in case it does not work, to make a table something....which i don't know how to do...

I get a 404 message, so i am not sure i am doing it right .....

BUT could it be if my perl path is not correct?

is my perl path supposed to look like:

#/usr/bin/perl
or
/usr/bin/perl

but i have this message on the installation:

Important note for windows servers users:

You need to open
ad.pl, ad-admin.pl, configur.pl, redirect.pl, setup.pl, and stats.pl, then modify $fullpath to your full system path. In addition, make sure you are using "/" instead of "\" in your system path. Do not end the path with a slash. For example, your path should look somewhat like c:/inetpub/cgi-bin/sqlad.

Am i a windows server user? (what is this, windows?)

Now i need to learn how my path is supposed to look like:

It gives me the example at the end, but where do i find this?

Also when i find out what my path is, where do i place it?
Is this where i am supposed to be looking at?

$fullpath="./";
push(@INC, $fullpath);

so where does the path go? in the middle of the " " ...???

Thanks alot ...

JesterDev
02-25-2004, 07:23 PM
Since no one else had replied I'll give it a go. I'm not all that great with this topic, but I've managed to install a message board once or twice.

Originally posted by jaxfan11
First off i uploaded the script from the server, where it says upload files ....is this the way to do it? i keep reading about FTP but do i really need it? and do i just upload all files inside the CGI-BIN folder?



First, unless your hosting company offers some sort of upload through your web browser, you will need to ftp them. (FTP - File Transfer Protocal). This is most likely what your doing and just don't know it.

If you read through the docs it will tell you where to upload the files. At least it should! Most of the time the cgi, or cgi-bin directory is the proper place to upload the files.



I am trying to install a CGI script.

It says execute the setup.pl file (i am guessing this means place the URL in the browser) and it says it should work and in case it does not work, to make a table something....which i don't know how to do...

I get a 404 message, so i am not sure i am doing it right .....


Not sure about the table thing. But if your files are not in your CGI-BIN directory then you will get the 404 message. Also besure to check the url make sure it's something like: www.yourdomain.com/cgi-bin/setup.pl

You may also need to telnet into your server and make the files executable. I would suggest you contact your host about this. And also search google for: chmod (If your sever is a Linux/Unix server. See below.)


BUT could it be if my perl path is not correct?

is my perl path supposed to look like:

#/usr/bin/perl
or
/usr/bin/perl

but i have this message on the installation:

Important note for windows servers users:

You need to open
ad.pl, ad-admin.pl, configur.pl, redirect.pl, setup.pl, and stats.pl, then modify $fullpath to your full system path. In addition, make sure you are using "/" instead of "\" in your system path. Do not end the path with a slash. For example, your path should look somewhat like c:/inetpub/cgi-bin/sqlad.

Am i a windows server user? (what is this, windows?)


Ask your host to see that type of server they use, and what the path to perl is. (I'd rather not get into what Windows is and is not). Use a text editor to edit the .pl files once you get the needed info from your host. You may not have to make any changes at all.


Now i need to learn how my path is supposed to look like:

It gives me the example at the end, but where do i find this?

Also when i find out what my path is, where do i place it?
Is this where i am supposed to be looking at?

$fullpath="./";
push(@INC, $fullpath);

so where does the path go? in the middle of the " " ...???

Thanks alot ...


I would actually have to see the source code in order to tell you. I'd suggest reading the comments in the source code. They should lead you in the right direction.

knute
02-25-2004, 07:35 PM
You also need to make sure that your account is capable of using cgi scripts, because that can be enabled and disabled on a per user/group basis in the hosting software, and in the permissions that are set in the directory structure.

jaxfan11
02-26-2004, 01:09 AM
Originally posted by knute
You also need to make sure that your account is capable of using cgi scripts, because that can be enabled and disabled on a per user/group basis in the hosting software, and in the permissions that are set in the directory structure.


I already contacted my host. He told me i can upload scripts.

He also let me know the path to perl is : /usr/bin/perl
My question was, In the files, do i have to add the "#" symbol at the front to make it look like this:

#/usr/bin/perl


now, FTP .....all i did was go into the CGI-BIN folder and uploaded the files from my host, and NOT use the actual FTP program i have used before .... was wondering if this is ok or FTP was the only way .....


I may as well start all over again, since i have not done much, but it says the message above for "Windows Users" I wanted to know if that pertains to me and that maybe the reason why my page is not executing ........ Then again, if it does not execute i don't know anything about the tables they are talking about for the second option .....


Thanks for your help, I will go back in and see if i can find anything ...

bwkaz
02-26-2004, 08:21 PM
It needs to be:

#!/usr/bin/perl

Notice the "!". ;)

jaxfan11
02-27-2004, 03:35 AM
Originally posted by bwkaz
It needs to be:

#!/usr/bin/perl

Notice the "!". ;) I really missed that exclamation point, i will go back in and see if it works... Thanks a lot. jaxfan11.

jaxfan11
02-27-2004, 04:07 AM
Ok, that did not work, so i want to see if i have it right .....

The script default path is:
#!/usr/local/bin/perl


What it says on my server and what my administrator told me is:
/usr/bin/perl


Now here is how i have it after i edit the files:
#!/usr/bin/perl


Does that look right?
let me know.
thanks.

(PS - remember it says that if it does not execute to make a table or something (which i don't know how to do) ......)

JesterDev
02-27-2004, 12:18 PM
It looks right to me. You may have to make the files executable. You'll need to telnet to the server on which you site is hosted. Move your way to the dir which hold the files and chmod them. Do you kow how to do this? It's just an idea, and may not be the case at all.

Are you still getting the 404 error? Or something else now.

jaxfan11
02-27-2004, 04:33 PM
Originally posted by JesterDev
It looks right to me. You may have to make the files executable. You'll need to telnet to the server on which you site is hosted. Move your way to the dir which hold the files and chmod them. Do you kow how to do this? It's just an idea, and may not be the case at all.

Are you still getting the 404 error? Or something else now. I am still getting the 404 error. I don't think i know how to do that, but i will look around a little ...... i don't know what telnet is/does, so i will look for some info on that too. Thanks for your help. will check back here soon ...