#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Christchurch New Zealand
    Posts
    0
    Rep Power
    0
    I am working on a machine with windows 98, ActivePerl and Apache for windows. I have set this up so I can learn Perl and test CGI scripts. Whenever I try to generate a web page on the fly via a perl script It appears as text in a DOS window. I have used many different scripts but the result is always the same. ActivePerl seems to be functioning in all other respects. The Apache server seems to be working ok. I have spent days on this and followed many7 suggestions to no avail. Can any one suggest a solution???????
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Denver, CO
    Posts
    0
    Rep Power
    0

    Cool


    I'm not sure how Apache works on a PC but you might want to try and modify the file folder parameters for that ???.cgi files. Open Explorer and goto "View...options" then on "File Types" I think Win98 is executing a dos shell for that type of file.

    OR

    Are you trying to run the CGI script from the Browser? in the URL : //c|perlperlprogssomething.cgi

    Not sure you might have to give more information on settings and configuration for acurate diag...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Christchurch New Zealand
    Posts
    0
    Rep Power
    0

    Thanks dark_jurmanji.
    I am no further on but you may have found an area where I lack understanding.
    The scripts I have been executing have the perl extension .pl. so that is what I have put in the html Form Action
    I then go to the browser bring up localhost, navigate to the page with the form fill it out press submit.... etc

    I don't really understand what it is that governs the action that is taken when the script is executed.
    There doesn't seem to be anything that says to open a Dos shell but that is what it does..
    C:PERLBINPERL.EXE "%1" %* is what appears in the box for "application used to perform action".
    I obviously need to know more about this stuff.

    Any further help would be greatly appreciated.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Denver, CO
    Posts
    0
    Rep Power
    0

    Folder Options


    I think WINDOWS will excecute a dos window because when you installed perl (I think) it entered a Registry entry that defines what application to execute those types of files.
    Have you tried to rename your scripts with the .CGI instead of .PL? What does your "View-->options -->File Types" say for a .CGI file?
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Christchurch New Zealand
    Posts
    0
    Rep Power
    0

    It lists c:windowsNOTEPAD.EXE "%1" as the application used to perform the action. Any idea what I should change this to??? as this is definitely not what It should be.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    300
    Rep Power
    14

    Thumbs up


    Well, you could always check the FAQs over at http://www.activestate.com/ and see there.

    But I will spare you the trip. What got me working, is quite simple: you need to put the ordinary UNIX-like shebang at the beggining of your CGI script, but with a Windows-like path. To make it simple:
    #!cerlbinperl.exe (any switches)

    This worked for me, and is still working on Windows 2000 Pro. (tried first on Windows 98). The thing you mentioned is simply an "association" to a certain file extension in the Windows Explorer. It has nothing to do with Apache.

    HTH.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Christchurch New Zealand
    Posts
    0
    Rep Power
    0
    No. I have already done that in all my scripts. Same Result...text in a Dos window.
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Denver, CO
    Posts
    0
    Rep Power
    0

    Talking


    Well as I said before, I don't know that much about Apache but I know that you can assign what application to assign a file .??? by going into Explorer and pressing "shift" and right clicking on the file and you will see an option to "Open With" and that will bring up a window that will allow you to change the application that it executes with.

    Is there a configuration setting on Apache that will let you define a folder with permissions? I know that when I was setting up a web site at work I had to have the Administator change the directory (CGI-BIN)to execute vs. read a flat file (HTML). You might have to contact the software support for Apache about this.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    300
    Rep Power
    14

    Thumbs up


    Have you configured Apache to execute CGI scripts, with the ScriptAlias etc. directives??

    Here is the link to the FAQ I was talking about:
    http://velocity.activestate.com/docs...l-Winfaq6.html

    But as I read it, I can only see one potential problem, and that is that you haven't configured your Apache.

    [Edited by dwarf on 01-16-2001 at 02:23 AM]
  18. #10
  19. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Christchurch New Zealand
    Posts
    0
    Rep Power
    0
    Thanks for all the help dark_jurmanji and dwarf. Problem solved. Apache was configured incorrectly. This may not have been the only problem, I tried so many things I lost track of it all but it is up and running now. Yeeehaaaa!!!
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    300
    Rep Power
    14

    Thumbs up


    Not a problem. Just keep those FAQs handy...

IMN logo majestic logo threadwatch logo seochat tools logo