|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||
|
|||
|
: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" |
|
#4
|
|||
|
|||
|
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.. |
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||
|
|||
|
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. |
|
#7
|
|||
|
|||
|
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. |
|
#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
|
|
#9
|
|||
|
|||
|
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...... |
|
#10
|
|||
|
|||
|
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 |
|
#11
|
|||
|
|||
|
apachi+2000
where is that (i am using win2000 server version)
[B]Internet Services Manager[B] or in apachi |
|
#12
|
|||
|
|||
|
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 |
|
#13
|
|||
|
|||
|
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.... |
|
#14
|
|||
|
|||
|
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. |
|
#15
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > apachi + active perl+win2000 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|