Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> CGI and Cgi-Bin problem
waseem
Posted: May 12 2003, 01:04 AM
Quote Post





Group: Members
Posts: 11
Member No.: 52
Joined: 1-September 02



Hi

I am using Upipe account, and had a client comment that he couldnt get CGI spcripts to work, so i tested this myself and i got some strange resulsts , CGI is setup on the domain in the hosting option and has been for months.

For all cases the code is below: and files have been CHMOD'ed to 755

CODE
#!/usr/bin/perl



print "Content-type: text/htmlnn";



print "hello world";



When i run a .cgi version out side the Cgi-bin i get this (plain text on screen)

http://www.zaytoonmedia.com/test.cgi

Same file , same location but renamed as .pl file i get it working

http://www.zaytoonmedia.com/test.pl

---------------

Within cgi-bin dir
Both files give me "File not found error" when file is clearly there.

http://www.zaytoonmedia.com/cgi-bin/test.cgi

http://www.zaytoonmedia.com/cgi-bin/test.pl

Im not new to perl or CGI so i cant see why its not working, just a little confused, some direction would be great

Waseem
[/code]
PMAOLYahooMSN
Top
andy
Posted: May 12 2003, 07:57 AM
Quote Post





Group: Advantagecom Staff
Posts: 4,340
Member No.: 9
Joined: 12-July 02



I'd start with a search in this forum for "hello AND world". That should give you some material that has already been gone over.

This problem, without examining your domain settings or upload locations, would appear to me that CGI hasn't been turned on for the domain and/or the file giving the 404 wasn't uploaded to the cgi-bin directory. Note that the cgi-bin directory is not a sub-directory to the httpdocs directory on Plesk based accounts. It is at the same level as httpdocs.

I know you said that CGI was enabled for the domain, but it probably wouldn't hurt to double check your settings just to be sure.


--------------------
Sincerely,
Andrew Kinney
CTO, Advantagecom Networks

Please do not private message me. My regular management duties preclude responding to every customer that sends me a support issue. Instead, post on the forum or contact tech support.
PMUsers Website
Top
waseem
Posted: May 12 2003, 09:48 AM
Quote Post





Group: Members
Posts: 11
Member No.: 52
Joined: 1-September 02



I know where the cgi-bin is, adn that is where i put the script

I have read around on the forum and it talks about uploading as ASCII, chmod 755 and i had done all this before , but have repeated the steps and still doesnt work

cgi is set up in my domain 100% and has been for months, so there is no 1 hour problem with plesk

I have run out of ideas now

Waseem
PMAOLYahooMSN
Top
Dustin
Posted: May 12 2003, 10:17 AM
Quote Post





Group: Members
Posts: 495
Member No.: 6
Joined: 12-July 02



You've placed the scripts in a directory that has been created under /httpdocs. Every time a website is set up, a cgi-bin is automatically created, and that's the one you need to use. Creating your own directory will not work. Right now, the scripts mentioned above are placed in /httpdocs/cgi-bin, so they'll need to be moved to /cgi-bin which is in your site's root directory.
PMUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll