You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jonathan Villa <jd...@ftbwebsolutions.com> on 2002/12/10 05:22:09 UTC

[users@httpd] Quick CGI Fix


I'm sure that this has been posted before, but I'm in a hurry.

I never use CGI-BIN, however I need to this very moment to get test
something.

This is what I have, (I'm using Windows):

DocumentRoot "D:/is/clients/"

ScriptAlias /cgi-bin/ "D:/is/clients/cgi-bin/"

<Directory "D:/is/clients/cgi-bin/">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

then I type

http://localhost/cgi-bin/cart.pl

But I get an internal server error

The error looks like this:

[Mon Dec 09 22:12:58 2002] [error] [client 127.0.0.1] (720003)The system
cannot find the path specified.  : couldn't create child process:
720003: cart.pl

[Mon Dec 09 22:12:58 2002] [error] [client 127.0.0.1] (720003)The system
cannot find the path specified.  : couldn't spawn child process:
D:/is/clients/cgi-bin/cart.pl

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

I don't know what else to do.  The only thing I know is what the manual
says.

I am trying to test this locally before upload to the server to test,
which is what I was doing, but don't always have time to do so.

When uploading, all I did was upload to /www/cgi-bin/ and everything
worked fine.


Any ideas/hints?

By the way, the printenv.pl which comes with Apache doesn't work either.





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Quick CGI Fix

Posted by JDeSalle <jd...@earthlink.net>.
No Problem Jacob, I see your point.
hope this is better.

jd








---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Quick CGI Fix

Posted by Jacob Coby <jc...@listingbook.com>.
JDeSalle, could you do us (well at least me) a favor and not quote the
entire message when it isn't relevant?  You post good information, but it
gets lost in unsub information, quoted messages, and sigs.

----- Original Message -----
From: "JDeSalle" <jd...@earthlink.net>
To: <us...@httpd.apache.org>
Sent: Tuesday, December 10, 2002 10:41 AM
Subject: Re: [users@httpd] Quick CGI Fix


> Jonathan Villa wrote:
>
> >Ok, I think I see what I am missing now.  Both of you said mentioned
> >paths to perl.  Well guess what, I never installed/configured/or
> >whatever perl onto my machine.  I would bet this is the problem.
> >
> >-----Original Message-----
> >From: Mike Rambour [mailto:mikey@b2systems.com]
> >Sent: Monday, December 09, 2002 11:07 PM
> >To: users@httpd.apache.org; users@httpd.apache.org
> >Subject: RE: [users@httpd] Quick CGI Fix
> >
> >At 10:43 PM 12/9/2002 -0600, Jonathan Villa wrote:
> >
> >
> >
> >>Like I said, I don't know anything about cgi, but I thought the ExecCGI
> >>was to allow for cgi to execute outside of the scriptaliased directory?
> >>
> >>
> >
> >  I think that is correct, you should not need the ExecCGI since you
> >have
> >it ScriptAlias'd and I had not seen it in your original e-mail.
> >
> >
> >
> >>What's a shebang line?
> >>
> >>
> >
> >  First line of a Perl program that tells your shell where to find Perl,
> >I
> >am not sure why its called shebang but I am sure someone would know if I
> >
> >asked.  Anyway it is usually something like #!/usr/local/bin/perl on
> >Unix/Linux machines and when it is wrong you will get the could not
> >create
> >child process error, I am sure other things can cause it but its a place
> >to
> >start.  You mentioned a couple of .pl files in your email, look at the
> >first line of them and is Perl in that path ?
> >
> >         mike
> >
> >~~~~~ I'd rather be sailing and  ~~~ .oooO  Oooo.  ~~~~~~~~~~~
> >Mike Rambour                                   (    )  (     )
> >Bug Writer er...Programmer                \   )   (   /
> >      mikey@b2systems.com                  \_)  (_/
> >**********************************************************************
> >If you want to learn more about the ULTIMATE BRITISH sports car,
> >then take a look at   http://www.singercars.com/
> >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
> >
> >---------------------------------------------------------------------
> >The official User-To-User support forum of the Apache HTTP Server
> >Project.
> >See <URL:http://httpd.apache.org/userslist.html> for more info.
> >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> >For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >---------------------------------------------------------------------
> >The official User-To-User support forum of the Apache HTTP Server
Project.
> >See <URL:http://httpd.apache.org/userslist.html> for more info.
> >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> >For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >
> >
> er, Installation of perl would be a wonderful Idea.
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Quick CGI Fix

Posted by JDeSalle <jd...@earthlink.net>.
Jonathan Villa wrote:

>Ok, I think I see what I am missing now.  Both of you said mentioned
>paths to perl.  Well guess what, I never installed/configured/or
>whatever perl onto my machine.  I would bet this is the problem.
>
>-----Original Message-----
>From: Mike Rambour [mailto:mikey@b2systems.com] 
>Sent: Monday, December 09, 2002 11:07 PM
>To: users@httpd.apache.org; users@httpd.apache.org
>Subject: RE: [users@httpd] Quick CGI Fix
>
>At 10:43 PM 12/9/2002 -0600, Jonathan Villa wrote:
>
>  
>
>>Like I said, I don't know anything about cgi, but I thought the ExecCGI
>>was to allow for cgi to execute outside of the scriptaliased directory?
>>    
>>
>
>  I think that is correct, you should not need the ExecCGI since you
>have 
>it ScriptAlias'd and I had not seen it in your original e-mail.
>
>  
>
>>What's a shebang line?
>>    
>>
>
>  First line of a Perl program that tells your shell where to find Perl,
>I 
>am not sure why its called shebang but I am sure someone would know if I
>
>asked.  Anyway it is usually something like #!/usr/local/bin/perl on 
>Unix/Linux machines and when it is wrong you will get the could not
>create 
>child process error, I am sure other things can cause it but its a place
>to 
>start.  You mentioned a couple of .pl files in your email, look at the 
>first line of them and is Perl in that path ?
>
>         mike
>
>~~~~~ I'd rather be sailing and  ~~~ .oooO  Oooo.  ~~~~~~~~~~~
>Mike Rambour                                   (    )  (     )    
>Bug Writer er...Programmer                \   )   (   / 
>      mikey@b2systems.com                  \_)  (_/  
>**********************************************************************
>If you want to learn more about the ULTIMATE BRITISH sports car,
>then take a look at   http://www.singercars.com/
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server
>Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>  
>
er, Installation of perl would be a wonderful Idea.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] log module for apache2

Posted by Thomas Sandor <ts...@rndsoft.com>.
hi all,

does anyone know a log module for apache2? I have cronolog, but it seems
they are not developing it, or got few resource, because their log module is
for a future release since the begining of this year, and now I have twice
as many cronolog process running as virtualhost I got.

is there any log module that splits logs for each day (on linux)?

regards,
Thomas


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Quick CGI Fix

Posted by Steve Winter <st...@roadshow.org>.
Jonathan,

The error you're getting is more related to the way in which perl is
being called on your Windows machine...the shebang line which others
have talked about is the first line of the perl script you are running
and is used on *nix to tell apache where perl is installed, and so
apache by default will look for perl in that location...

The error you're getting about the child process is an indication that
perl isn't found where the shebang line in your perl scripts is leading
apache to think it is...as most perl scripts will default to a standard
*nix location.

The simple solution on Windows is to find the line;

ScriptInterpreterSource registry

In httpd.conf and 'un-comment' it...I include below the description form
httpd.conf

I suspect that if you do this your problem may well go away..

Cheers
Steve

---------------------------------------
>From httpd.conf
---------------------------------------

# 
# Apache parses all CGI scripts for the shebang line by default.
# This comment line, the first line of the script, consists of the
symbols
# pound (#) and exclamation (!) followed by the path of the program that

# can execute this specific script.  For a perl script, with perl.exe in
# the C:\Program Files\Perl directory, the shebang line should be:

   #!c:/program files/perl/perl

# Note you _must_not_ indent the actual shebang line, and it must be the
# first line of the file.  Of course, CGI processing must be enabled by 
# the appropriate ScriptAlias or Options ExecCGI directives for the
files 
# or directory in question.
#
# However, Apache on Windows allows either the Unix behavior above, or
can
# use the Registry to match files by extention.  The command to execute 
# a file of this type is retrieved from the registry by the same method
as 
# the Windows Explorer would use to handle double-clicking on a file.
# These script actions can be configured from the Windows Explorer View
menu, 
# 'Folder Options', and reviewing the 'File Types' tab.  Clicking the
Edit
# button allows you to modify the Actions, of which Apache 1.3 attempts
to
# perform the 'Open' Action, and failing that it will try the shebang
line.
# This behavior is subject to change in Apache release 2.0.
#
# Each mechanism has it's own specific security weaknesses, from the
means
# to run a program you didn't intend the website owner to invoke, and
the
# best method is a matter of great debate.
#
# To enable the this Windows specific behavior (and therefore -disable-
the
# equivilant Unix behavior), uncomment the following directive:
#
ScriptInterpreterSource registry
#
# The directive above can be placed in individual <Directory> blocks or
the
# .htaccess file, with either the 'registry' (Windows behavior) or
'script' 
# (Unix behavior) option, and will override this server default option.
#



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Quick CGI Fix

Posted by Jonathan Villa <ap...@ftbwebsolutions.com>.
Ok, I think I see what I am missing now.  Both of you said mentioned
paths to perl.  Well guess what, I never installed/configured/or
whatever perl onto my machine.  I would bet this is the problem.

-----Original Message-----
From: Mike Rambour [mailto:mikey@b2systems.com] 
Sent: Monday, December 09, 2002 11:07 PM
To: users@httpd.apache.org; users@httpd.apache.org
Subject: RE: [users@httpd] Quick CGI Fix

At 10:43 PM 12/9/2002 -0600, Jonathan Villa wrote:

>Like I said, I don't know anything about cgi, but I thought the ExecCGI
>was to allow for cgi to execute outside of the scriptaliased directory?

  I think that is correct, you should not need the ExecCGI since you
have 
it ScriptAlias'd and I had not seen it in your original e-mail.

>What's a shebang line?

  First line of a Perl program that tells your shell where to find Perl,
I 
am not sure why its called shebang but I am sure someone would know if I

asked.  Anyway it is usually something like #!/usr/local/bin/perl on 
Unix/Linux machines and when it is wrong you will get the could not
create 
child process error, I am sure other things can cause it but its a place
to 
start.  You mentioned a couple of .pl files in your email, look at the 
first line of them and is Perl in that path ?

         mike

~~~~~ I'd rather be sailing and  ~~~ .oooO  Oooo.  ~~~~~~~~~~~
Mike Rambour                                   (    )  (     )    
Bug Writer er...Programmer                \   )   (   / 
      mikey@b2systems.com                  \_)  (_/  
**********************************************************************
If you want to learn more about the ULTIMATE BRITISH sports car,
then take a look at   http://www.singercars.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Quick CGI Fix

Posted by Mike Rambour <mi...@b2systems.com>.
At 10:43 PM 12/9/2002 -0600, Jonathan Villa wrote:

>Like I said, I don't know anything about cgi, but I thought the ExecCGI
>was to allow for cgi to execute outside of the scriptaliased directory?

  I think that is correct, you should not need the ExecCGI since you have 
it ScriptAlias'd and I had not seen it in your original e-mail.

>What's a shebang line?

  First line of a Perl program that tells your shell where to find Perl, I 
am not sure why its called shebang but I am sure someone would know if I 
asked.  Anyway it is usually something like #!/usr/local/bin/perl on 
Unix/Linux machines and when it is wrong you will get the could not create 
child process error, I am sure other things can cause it but its a place to 
start.  You mentioned a couple of .pl files in your email, look at the 
first line of them and is Perl in that path ?

         mike

~~~~~ I'd rather be sailing and  ~~~ .oooO  Oooo.  ~~~~~~~~~~~
Mike Rambour                                   (    )  (     )    
Bug Writer er...Programmer                \   )   (   / 
      mikey@b2systems.com                  \_)  (_/  
**********************************************************************
If you want to learn more about the ULTIMATE BRITISH sports car,
then take a look at   http://www.singercars.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Quick CGI Fix

Posted by JDeSalle <jd...@earthlink.net>.
Jonathan Villa wrote:

>Like I said, I don't know anything about cgi, but I thought the ExecCGI
>was to allow for cgi to execute outside of the scriptaliased directory?
>
>What's a shebang line?  
>
>
>-----Original Message-----
>From: Mike Rambour [mailto:mikey@b2systems.com] 
>Sent: Monday, December 09, 2002 10:40 PM
>To: users@httpd.apache.org; users@httpd.apache.org
>Subject: Re: [users@httpd] Quick CGI Fix
>
>    Don't you need ExecCGI in the directory section ? unless the 
>ScriptAlias takes care of it, I am not sure.
>
>  
>
>>[Mon Dec 09 22:12:58 2002] [error] [client 127.0.0.1] (720003)The
>>    
>>
>system
>  
>
>>cannot find the path specified.  : couldn't create child process:
>>720003: cart.pl
>>    
>>
>
>  I get this error when I don't have a proper shebang line, my machine
>uses 
>#!/usr/local/bin/perl and the server uses #!/usr/bin/perl If I forget to
>
>change the line when I download from the server, I get that error every
>time.
>
>         mike
>
>~~~~~ I'd rather be sailing and  ~~~ .oooO  Oooo.  ~~~~~~~~~~~
>Mike Rambour                                   (    )  (     )    
>Bug Writer er...Programmer                \   )   (   / 
>      mikey@b2systems.com                  \_)  (_/  
>**********************************************************************
>If you want to learn more about the ULTIMATE BRITISH sports car,
>then take a look at   http://www.singercars.com/
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server
>Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>  
>
Jonathan, first try direct path to your script 
 http://localhost/path/to/script  not the alias.
If that doesn't work, check the first line of your script to see what 
the path to perl is.
The first line is your  shebang line.    #!/path/to/perl    the shebang 
is an exclamation character
that's where it gets the name.

hope that helps



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Quick CGI Fix

Posted by Jonathan Villa <ap...@ftbwebsolutions.com>.
Like I said, I don't know anything about cgi, but I thought the ExecCGI
was to allow for cgi to execute outside of the scriptaliased directory?

What's a shebang line?  


-----Original Message-----
From: Mike Rambour [mailto:mikey@b2systems.com] 
Sent: Monday, December 09, 2002 10:40 PM
To: users@httpd.apache.org; users@httpd.apache.org
Subject: Re: [users@httpd] Quick CGI Fix

    Don't you need ExecCGI in the directory section ? unless the 
ScriptAlias takes care of it, I am not sure.

>[Mon Dec 09 22:12:58 2002] [error] [client 127.0.0.1] (720003)The
system
>cannot find the path specified.  : couldn't create child process:
>720003: cart.pl

  I get this error when I don't have a proper shebang line, my machine
uses 
#!/usr/local/bin/perl and the server uses #!/usr/bin/perl If I forget to

change the line when I download from the server, I get that error every
time.

         mike

~~~~~ I'd rather be sailing and  ~~~ .oooO  Oooo.  ~~~~~~~~~~~
Mike Rambour                                   (    )  (     )    
Bug Writer er...Programmer                \   )   (   / 
      mikey@b2systems.com                  \_)  (_/  
**********************************************************************
If you want to learn more about the ULTIMATE BRITISH sports car,
then take a look at   http://www.singercars.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Quick CGI Fix

Posted by Mike Rambour <mi...@b2systems.com>.
    Don't you need ExecCGI in the directory section ? unless the 
ScriptAlias takes care of it, I am not sure.

>[Mon Dec 09 22:12:58 2002] [error] [client 127.0.0.1] (720003)The system
>cannot find the path specified.  : couldn't create child process:
>720003: cart.pl

  I get this error when I don't have a proper shebang line, my machine uses 
#!/usr/local/bin/perl and the server uses #!/usr/bin/perl If I forget to 
change the line when I download from the server, I get that error every time.

         mike

~~~~~ I'd rather be sailing and  ~~~ .oooO  Oooo.  ~~~~~~~~~~~
Mike Rambour                                   (    )  (     )    
Bug Writer er...Programmer                \   )   (   / 
      mikey@b2systems.com                  \_)  (_/  
**********************************************************************
If you want to learn more about the ULTIMATE BRITISH sports car,
then take a look at   http://www.singercars.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org