hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Software and Control Panels : cgi-bin cgi/perl scripts
Reply

Hosting Software and Control Panels Software used in the web hosting industry. Topics include control panels, add-on software, setup scripts, etc.
Forum Jump

cgi-bin cgi/perl scripts

Reply Post New Thread In Hosting Software and Control Panels Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-30-2000, 09:18 PM
gthorley gthorley is offline
WHT Addict
 
Join Date: Sep 2000
Posts: 172
On my confirmation email from Tera-byte it was indicated that I would not see a cgi-bin directory and that cgi scripts could be put wherever I wanted. I am not sure what this means but am having no luck in getting a guestbook script to work. Does it mean that they have execcgi turned on? Do my .pl files need to be .cgi files? I have tried numerous paths for the following variables and nothing seems to work.

$guestbookurl = The url address of your guestbook.html file.
$guestbookreal = The system location of your guestbook.html file.
$cgiurl = The url portion of the address to the guestbook.pl file The file guestbook.pl needs to be placed in your server's cgi-bin and chmoded read/execute for users of your
httpd. (chmod a+rx)

What is the best method of tracing down the problem.

Reply With Quote


Sponsored Links
  #2  
Old 10-30-2000, 09:53 PM
BC BC is offline
Web Hosting Master
 
Join Date: Apr 2000
Location: 80,000 feet under the sur
Posts: 2,736
Uhmm.... Have you tried contacting Tera-Byte's support department first?

__________________
My 2 Cents.... (or is that 2.2 cents inc. GST...?)

Have a think about this : Programming is like sex. Make a single little mistake, and you'll be supporting it for the rest of your life.

Reply With Quote
  #3  
Old 10-30-2000, 10:47 PM
cbaker17 cbaker17 is offline
Web Hosting Master
 
Join Date: Jun 2000
Location: Wichita, Ks, USA
Posts: 1,984
perhaps

Perhaps if you need help you should post the error message??

ANyways the most common problem for cgi's not working is the incorrect path to perl IE the path statement located at the very top of your cgi file.

__________________
affordablecolo.com carrier grade colocation at a affordable price!
Charles Baker - Company Operations
1-866-316-HOST

Reply With Quote
Sponsored Links
  #4  
Old 10-31-2000, 12:53 AM
gthorley gthorley is offline
WHT Addict
 
Join Date: Sep 2000
Posts: 172
BC
My first request this a.m was responded to but didn't solve the problem, My subsequent requests have not as yet been responded to.

I received 2 different error messages.

>CGIWrap encountered an error while attempting to execute this script:

> Error Message: Permission denied
> Error Number: 13

Then after checking some boxes to try to set the chmod I got an

> Error Message: No such file or directory
> Error Number: 2

As I write this I just received a further email reply as follows

""We don't really get into debugging scripts, but here's what I just did.

I looked on your website itself, into guestbook.pl.

The first line was #!/usr/bin/perl--

I changed it to #!/usr/bin/perl -- ""

The script still did not work but it seems to call it fron the addguest entry because if left blank I get an error message from the guestbook.pl that nothing was entered and to resubmit. With fields completed I receive the following error.

""The server encountered an internal error or misconfiguration and was unable to complete your request.""



Reply With Quote
  #5  
Old 10-31-2000, 05:38 AM
kunal kunal is offline
Web Hosting Master
 
Join Date: Aug 2000
Posts: 2,750
Just create a dir called "cgi-bin" without the " ". CHMOD it to 755. I presume u know how to do that? Now, put all your scripts in the cgi-bin dir. CHMOD each file to there requirments. I think 755 should be write. This should work.

As far as the Errors are concerned, I think it is because of the paths and permisions you have set for your scripts.

__________________
The Php Support Desk
http://www.phpsupportdesk.com
Custom programming - kunal @ e-phoria.com
http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

Reply With Quote
  #6  
Old 10-31-2000, 10:35 AM
gthorley gthorley is offline
WHT Addict
 
Join Date: Sep 2000
Posts: 172
Thanks for your reply Kunal

Quote:
Originally posted by kunal
Just create a dir called "cgi-bin" without the " ". CHMOD it to 755. I presume u know how to do that? Now, put all your scripts in the cgi-bin dir. CHMOD each file to there requirments. I think 755 should be write. This should work.

As far as the Errors are concerned, I think it is because of the paths and permisions you have set for your scripts.
Is this standard to create a cgi-bin directory? Is this directory not normally on the hosts section of the server?
If I create the directory do I create it as a sub directory to my main directory "web' which is where my index.htm file is or where?

I have figured out the CHMOD. I use WS_ftp and it just gives the settings as to read, write & execute not the numerical.
But using an old version of Cute ftp which gives the numbers which correspond I was able to understand the settings. The script file is 755. The guestbook.htm is 777 and the addguest.htm is 744.

I am sure the problem lies with the paths placed in the variables. I don't think that I am enetring them correctly.

As an example for the following :

$cgiurl= The url portion of the address to the guestbook.pl file. The file guestbook.pl needs to be placed in your server's cgi-bin

Tera-byte indicated the following info for this variable
/home/sites/www.artbyjudy.com/web/cgi-bin/

I have tried using this and different combinations.
One problem is I have no understanding of what it means ie:
-Should it be preceeded by something like "http:" or ".."
-What does /home/sites mean is this something to do with the address to the server?

Can someone explain this url and what it does?
Also can I use my IP address in place of "www.artbyjudy.com" in the urls.

Reply With Quote
  #7  
Old 10-31-2000, 11:07 AM
kunal kunal is offline
Web Hosting Master
 
Join Date: Aug 2000
Posts: 2,750
Quote:

Is this standard to create a cgi-bin directory? Is this directory not normally on the hosts section of the server?
If I create the directory do I create it as a sub directory to my main directory "web' which is where my index.htm file is or where?
Yes, this is the standard to create a cgi-bin dir. It should normally be there, but if itsnt you can create it . You have to create it under the "web" directory.

Quote:

As an example for the following :

$cgiurl= The url portion of the address to the guestbook.pl file. The file guestbook.pl needs to be placed in your server's cgi-bin

Tera-byte indicated the following info for this variable
/home/sites/www.artbyjudy.com/web/cgi-bin/
Try one of these
$cgiurl = "/home/sites/www.artbyjudy.com/web/cgi-bin/"
OR
$cgiurl = "http://www.artbyjudy.com/cgi-bin/"

Quote:

-Should it be preceeded by something like "http:" or ".."
It depends, if the path should be the absolute path, then you dun need the "http:" or "..". The path should look like this "/home/sites/whatever"

Quote:

-What does /home/sites mean is this something to do with the address to the server?


Yes, it is the absolute path the files on the server.

Quote:

Also can I use my IP address in place of "www.artbyjudy.com" in the urls.
Yes, you can use your IP address. That should not be a problem at all.

__________________
The Php Support Desk
http://www.phpsupportdesk.com
Custom programming - kunal @ e-phoria.com
http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

Reply With Quote
  #8  
Old 10-31-2000, 11:37 AM
Chicken Chicken is offline
Web Hosting Master
 
Join Date: Jun 2000
Location: Southern California
Posts: 12,121
Quote:
Originally posted by kunal
Quote:

As an example for the following :

$cgiurl= The url portion of the address to the guestbook.pl file. The file guestbook.pl needs to be placed in your server's cgi-bin

Tera-byte indicated the following info for this variable
/home/sites/www.artbyjudy.com/web/cgi-bin/
Try one of these
$cgiurl = "/home/sites/www.artbyjudy.com/web/cgi-bin/"
OR
$cgiurl = "http://www.artbyjudy.com/cgi-bin/"
The only thing I'll add, is that it seems to want the the full path to the file (if I'm not mistaken), which would be:

/home/sites/www.artbyjudy.com/web/cgi-bin/guestbook.pl

without including the file name 'guestbook.pl' you are just leading the script to your cgi-bin (I wouldn't think this would work).

__________________
HostHideout.com - Where professionals discuss web hosting.

• Chicken

Reply With Quote
  #9  
Old 10-31-2000, 11:44 AM
kunal kunal is offline
Web Hosting Master
 
Join Date: Aug 2000
Posts: 2,750
If it needed the absolute path, Chicken, then the filename isnt necessary, else it is.

__________________
The Php Support Desk
http://www.phpsupportdesk.com
Custom programming - kunal @ e-phoria.com
http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

Reply With Quote
  #10  
Old 10-31-2000, 02:30 PM
gthorley gthorley is offline
WHT Addict
 
Join Date: Sep 2000
Posts: 172
Thanks again for the help Kunal. I have spents hours on this thing and can't seem to get it to work. The variables are set as follows.

# Set Variables

$guestbookurl = "http://216.234.185.32/guestbook/guestbook.html";
$guestbookreal = "/home/sites/216.234.185.32/web/guestbook/guestbook.html";
$guestlog = "/home/sites/216.234.185.32/web/guestbook/guestlog.html";
$cgiurl = "http://216.234.185.32/cgi-bin/guestbook.pl";
$date_command = "/usr/bin/date";

I have tried taking the /web out of $guestbookreal and setting $cgiurl to /home/sites/www.216.234.185.32/web/cgi-bin/guestbook.html
with this in it directs to
-http://216.234.185.32/home/sites/216.234.185.32/web/cgi-bin/guestbook.pl and this variable only is used when fields in the form are blank and it asks for info when resubmitted it looks for the web address along with the system address so have come to the conclusion that the url set is correct. I have come to the conclusion that the problem could only be in $guestbookreal or that the script doesn't work or that the server is not reading the script.

Oh yes and I double checked all the chmod.
cgi-bin directory and guestbook.pl I set to 755
guestbook directory and guestbook.html to 777
addguest.html to 744

Any other suggestions would be appreciated.
Is there a simple cgi/perl script or test that I can put up to make sure cgi is running on my site. The cobalt site settings indicates cgi is active.

Reply With Quote
  #11  
Old 10-31-2000, 02:56 PM
ODE ODE is offline
WHT Addict
 
Join Date: Aug 2000
Posts: 111
Quote:
Originally posted by gthorley
""The server encountered an internal error or misconfiguration and was unable to complete your request.""
You made sure to upload the file as ASCII(text) right? I've gotten this error when I uploaded a perl script as binary.

__________________
ODE
Optimum Digital Enterprises sm
http://odenet.net

Reply With Quote
  #12  
Old 10-31-2000, 03:04 PM
kunal kunal is offline
Web Hosting Master
 
Join Date: Aug 2000
Posts: 2,750
Try these
# Set Variables

$guestbookurl = "http://216.234.185.32/guestbook/guestbook.html";
$guestbookreal = "/home/sites/www.artbyjudy.com/web/guestbook/";
$guestlog = "/home/sites/www.artbyjudy.com/web/guestbook/";
$cgiurl = "/home/sites/www.artbyjudy.com/web/cgi-bin/";
$date_command = "/usr/bin/date";


You cannot put the IP address in the absolute path.

[Edited by kunal on 10-31-2000 at 02:06 PM]

__________________
The Php Support Desk
http://www.phpsupportdesk.com
Custom programming - kunal @ e-phoria.com
http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

Reply With Quote
  #13  
Old 11-01-2000, 11:20 AM
gthorley gthorley is offline
WHT Addict
 
Join Date: Sep 2000
Posts: 172
Well I finally got the sucker running (somewhat). Thanks to all that assisted especially Kunal and at Tera-byte.

The main problem it appears to have been the site at not yet propagated fully and I was trying to use my IP address. As pointed out in a latter post by Kunal this is not allowed in an absolute address. It also appears the original addguest.html file included with the script did not work properly.

For the record just in case anyone using Tera-byte does a search and needs help on the variables these are what I ended up with

$guestbookurl = "http://www.artbyjudy.com/guestbook/guestbook.html";
$guestbookreal = "/home/sites/www.artbyjudy.com/web/guestbook/guestbook.html";
$guestlog = "/home/sites/www.artbyjudy.com/web/guestbook/guestlog.html";
$cgiurl = "http://www.artbyjudy.com/cgi-bin/guestbook.pl";

Problem still

The date variable $date_command = "/usr/bin/date"; doesn't seem to work. Anyone have a suggestion.

Next project a counter, hopefully I have learned enough to accomplish it.

Reply With Quote
  #14  
Old 11-01-2000, 11:27 AM
kunal kunal is offline
Web Hosting Master
 
Join Date: Aug 2000
Posts: 2,750
Im glad you got most of the script going

Ask Tera-byte if they have the date module installed, and if they do, the path to it. I think thats your problem. I have never used the date function in this way though.

As far as the counter script, goes, are you writing your own or getting one? If you are getting one, get one which has some decent documentation.

__________________
The Php Support Desk
http://www.phpsupportdesk.com
Custom programming - kunal @ e-phoria.com
http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

Reply With Quote
  #15  
Old 11-01-2000, 11:29 AM
kunal kunal is offline
Web Hosting Master
 
Join Date: Aug 2000
Posts: 2,750
Try this,
$date_command = "#!/usr/bin/date";

__________________
The Php Support Desk
http://www.phpsupportdesk.com
Custom programming - kunal @ e-phoria.com
http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
cPanel Security Updates Address Perl Module Vulnerabilities Web Hosting News 2012-12-06 12:55:54
Web Host Liquid Web Donates $10,000 to The Perl Foundation Web Hosting News 2011-09-23 18:45:40
Softaculous Adds 17 New Apps to Auto Installer Library Web Hosting News 2011-09-12 17:51:10
Web Host HostingZoom Adds Softaculous Auto-Installer to Hosting Plans Web Hosting News 2011-08-17 17:52:34
Web Host JaguarPC Adds Auto-Installer Softaculous to Hosting Plans Web Hosting News 2011-07-27 18:55:46


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?