Forum Moderators: coopster & phranque

Message Too Old, No Replies

Dazed, Confused, Angry

         

grandpa

1:12 am on Nov 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I had to move our site to another hosting company, and the CGI scripts are driving me nuts. I got one working after several hours, but the other one is ***** me off.

Basically, the only thing that I can see that needs to be changed is the path to the cgi. My new path would be "http://www.mysite.com/cgi-bin/"

I'm getting this error in my logs:
[Thu Nov 13 17:04:59 2003] [error] [client 67.22.65.8] malformed header from script. Bad header=: /home/mysite/public_html/cgi-bin/subscribe.cgi

What is a malformed header? Also, I downloaded the latest script (we use shareware - registered) and it arrived as a *.pl file, instead of a *.cgi file. Should it be renamed to cgi? Will it run as pl.

I am totally clueless about this aspect of the site, but I need it up and running today. Any thoughts?

Thank You

ogletree

1:20 am on Nov 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The .pl may not be associated as an executable. The server may need to be set up to execute .pl files. I had to do this one time. I moved from a UNIX based server to a Windows based server.

grandpa

1:29 am on Nov 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The server has handlers defines for cgi-script(.cgi) and cgi-script(.pl).

It acts like a bad path, but the malformed header message is throwing me, since I have no idea what that means.

Here's some relevant info for the path:

$memberinfo = "http://www.mysite.com/cgi-bin";
$passfile = "http:/www.mysite.com/cgi-bin";
$closing = "http:/www.mysite.com/cgi-bin";

grandpa

1:31 am on Nov 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Oh, and I'm ftp'ing the file up in ascii mode, and then chmod to 755 for the cgi and 777 for the data files.

coopster

1:41 am on Nov 14, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Hey grandpa, I remember this error. It's a fun one. If it isn't your content-type declaration...

print "Content-type:text/html\n\n";

...then you may want to check your application from the command line before you try to execute it from the Web.

grandpa

1:56 am on Nov 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




That line is my script is exactly as you printed it. The problem is a path issue, I just resolved it.

I had to use "/home/myweb/public_html/cgi-bin" instead of "http://www.mysite.com/cgi-bin/". It must be server thing....

Grrr, and I'm not really smarter for the effort. Thank guys for jumping in.

marcs

2:47 am on Nov 14, 2003 (gmt 0)

10+ Year Member



"/home/myweb/public_html/cgi-bin" would be the path to your cgi-bin (in the directory tree) on that server.

"http://www.mysite.com/cgi-bin/" is the URL to your cgi-bin.

Two very different things. Hope that clears things up for you.

ogletree

3:23 am on Nov 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well aparently that worked on his old server. I guess on the old server you could get there that way as well.

sanuk

3:30 am on Nov 15, 2003 (gmt 0)

10+ Year Member



Hi,

Try CHMOD your perl script to 750 instead of 755

Regards,
Sanuk