Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 11th, 2001, 09:00 AM
kojr kojr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 51 kojr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
apachi + active perl+win2000

here is the configuration of my pc
apachi + active perl +win 2000

After installation, I can successfully run a "hello world " perl

But when I like to run a guestbook I am not able posting any message as the script propmt me if I like to download the cgi script when I hit hte submit

thanks for any one offering me a hints

1.my apachi config
http://csss.hypermart.net/cofig.txt

2.here is the page when I like to make post things and a prompt shows up asking me if I like to dowload my cgi
http://csss.hypermart.net/test2.htm

Reply With Quote
  #2  
Old June 11th, 2001, 03:04 PM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
hi, hmm, might want to double check the scripting thats all i think i could see wrong, unless you got the path to perl wrong in your script.

Reply With Quote
  #3  
Old June 11th, 2001, 10:55 PM
dkode dkode is offline
PHP/PERL/.NET Coder
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Daytona Beach, Florida
Posts: 36 dkode User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 sec
Reputation Power: 8
Send a message via AIM to dkode
:D

i've run into this problem with activeperl on win2k before.

I beleive it has to do with not having the correct permissions in the directory you are running the script out of. Make sure the script that your running is in the cgi-bin and chmod'd 755
i.e.

chmod 755 filename

I'm not too sure about permissions and stuff like that on win2k as my admin fixed the problem but I know it has to do with script permissions.
__________________
"Mankind cannot define memory, yet it defines mankind"

Reply With Quote
  #4  
Old June 12th, 2001, 06:46 AM
kojr kojr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 51 kojr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
apachi+active perl

Well first of all
I can run a "hello world" script
=> my path to perl is right


Secondly
Is it necessary to chmod for the file in my own PC ?
how change it...


Thirdly
there must be something wrong.....and it would be a basic one.


Thanks for response..

Reply With Quote
  #5  
Old June 12th, 2001, 08:09 AM
footinmouth footinmouth is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: North Vancouver, BC, Canada
Posts: 44 footinmouth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Hmmmmm.....

Do you have a content type line in your script ?

Such as :

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

Foot in Mouth ver 1.2.5 Onion

Reply With Quote
  #6  
Old June 12th, 2001, 08:23 AM
kojr kojr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 51 kojr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
apachi+2000

certainly
But only in sub-routine of this guestbook script..........

sub send_html {
if ($has_send ne "1") {
print "Content-type: text/html\n\n";
$has_send = "1";
}
}

The other part is unfound.

Reply With Quote
  #7  
Old June 12th, 2001, 09:17 AM
footinmouth footinmouth is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: North Vancouver, BC, Canada
Posts: 44 footinmouth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Sounds like Server mime type missing for perl as cgi handler

You say the " Hello World " script works.

what is the name of this script ie Hello.pl ???

try as Hello.pl and hello.cgi :

#!/path_to_perl/perl

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

print "<html>\n<body>\n";
print "Hello World !\n";
print "</body></html>\n";

===================

If hello.pl works but hello.cgi downloads then
uncomment your add handler or fix the mime type
under windows O/S.

If hello.cgi works but hello.pl downloads then
uncomment your add handler or fix the mime type
under windows O/S.

Reply With Quote
  #8  
Old June 12th, 2001, 10:17 AM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
No chmoding

You do not need to chmod, because your on windows. it automatically gets chmoded in its own way for it to work

Reply With Quote
  #9  
Old June 12th, 2001, 11:04 AM
kojr kojr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 51 kojr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I know what your doubt is
Here is my hello.pl and my hello.cgi

#!c:\perl\bin\perl.exe

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

print "hello world";

Both( .pl and .cgi) can run successfully......

Reply With Quote
  #10  
Old June 12th, 2001, 11:06 AM
mcsimon mcsimon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 179 mcsimon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 38 sec
Reputation Power: 9
Send a message via AIM to mcsimon Send a message via Yahoo to mcsimon
When you click the submit button it is trying to download the cgi script.

YOu need to go to Internet Services Manager and "create" an application for that website directory.

After you "create" an application click on the "configuration" button.

Next "add" an application map:

extension would be .cgi or .pl or .plx (whatever your flavor)
path would be similiar to C:\Perl\bin\Perl.exe %s %s
(the %s %s) are important for some reason unknown to me.

If you have done all of the above, then I am stuck. From my experience it sounds like your machine isn't configured as described above.

Good luck

mcsimon
http://www.votematic.com

Reply With Quote
  #11  
Old June 12th, 2001, 11:43 AM
kojr kojr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 51 kojr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
apachi+2000

where is that (i am using win2000 server version)

[B]Internet Services Manager[B]

or in apachi

Reply With Quote
  #12  
Old June 12th, 2001, 12:02 PM
mcsimon mcsimon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 179 mcsimon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 38 sec
Reputation Power: 9
Send a message via AIM to mcsimon Send a message via Yahoo to mcsimon
I totally forgot you were using apache. I was stuck on IIS since I saw windows 2000. Sorry I misguided you.

However, the fact that your browser wants to download the file means that cgi is not configured correctly in Apache. I just recently set up apache + cgi to run on my windows 2000 box, but I don't recall exactly what I had done. I know that I used an options directive rather than using a scriptalias directive. Look at the heading: "Explicitly using Options to permit CGI execution" at the following website.

http://httpd.apache.org/docs/howto/cgi.html

That worked for me.

mcsimon

Reply With Quote
  #13  
Old June 12th, 2001, 12:09 PM
kojr kojr is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 51 kojr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
OK

I will go there and try to DIGEST it...
nice to meet you
If you got any hint, just post it and I think there must be ample of persons who share the similar experience like me.

ps
Rarely the information you provided to me help me....

Reply With Quote
  #14  
Old June 12th, 2001, 03:59 PM
footinmouth footinmouth is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: North Vancouver, BC, Canada
Posts: 44 footinmouth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
So "Hello" Works Hmmmmm.....

Since Hello.pl and Hello.cgi work then we may "assume"
perl is working in the directory they were placed in.

So try adding the content type line at the start of this long
script you are trying to use. Leave one more blank line after this.

Now:

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

print "hello world";

exit;

If this works remove the print "hello..." and exit and leave the
content header as this may solve the download problem.


Or :

Zip up the pl file you are trying to run and post it were we can
perl -c and scratch on it from here.

Quality help is hard to give if we can not see the code.

Reply With Quote
  #15  
Old June 12th, 2001, 04:13 PM
mcsimon mcsimon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 179 mcsimon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 38 sec
Reputation Power: 9
Send a message via AIM to mcsimon Send a message via Yahoo to mcsimon
If Perl is installed on windows, then a perl script will run in any directory.

If the content type is not correct (as suggested by footinmouth), then there would be an error reported via the browser window - possibly, some complaint about headers.

Usually, when a user requests a CGI page and a download dialogue box appears, it means that the web server doesn't know to execute that type of file.

I agree with footinmouth, seeing the code would help and probably confirm my assumptions.

mcsimon

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > apachi + active perl+win2000


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump