Page 1 of 1

403 error after modding httpd.conf [SOLVED]

PostPosted: 19. July 2009 06:34
by mnem0
hi,
i tried to enable perl execution in htdocs.

here are the changes i made to my httpd.conf file :
i changed the ScripAlias thing like this :
Code: Select all
ScriptAlias /cgi-bin/ "C:/xampp/htdocs/"


and i also modified this :

Code: Select all
# "C:/xampp/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/xampp/htdocs">
   Options ExecCGI
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>


finaly i touched this :
Code: Select all
AddHandler cgi-script .cgi .pl


and now, when i try to access a .pl script located in htdocs, i got a 403 error.

note : my shebang i ok.

Could someone please help me, i'm a bit lost :(

bye,
mnem0

Re: 403 error after modding httpd.conf

PostPosted: 19. July 2009 10:57
by Wiedmann
finaly i touched this :
Code: Select all
AddHandler cgi-script .cgi .pl

That's the only thing you must change. Don't change anything else.

Re: 403 error after modding httpd.conf

PostPosted: 19. July 2009 14:11
by mnem0
thank you for quick help Wiedman.

i followed your advices and reversed
Code: Select all
ScriptAlias /cgi-bin/ "C:/xampp/htdocs/"
to this
Code: Select all
ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"


i also reversed
Code: Select all
<Directory "C:/xampp/htdocs">
   Options ExecCGI
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>


to this
Code: Select all
<Directory "C:/xampp/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>



now, i obtain a 500 error. do you know how to fix this ?

thank you again,

mnem0

Re: 403 error after modding httpd.conf

PostPosted: 19. July 2009 14:47
by Wiedmann
now, i obtain a 500 error. do you know how to fix this ?

Read the "error.log" what's the problem.

Re: 403 error after modding httpd.conf

PostPosted: 19. July 2009 14:52
by mnem0
well, it is quite obscure for me. i already had done this. here are the errors :
Code: Select all
[Sun Jul 19 15:07:20 2009] [error] [client 127.0.0.1] (OS 5)Acces denied.  : couldn't create child process: 720005: archivesic.pl
[Sun Jul 19 15:07:20 2009] [error] [client 127.0.0.1] (OS 5)Acces denied.  : couldn't spawn child process: C:/xampp/htdocs/archivesic.pl


note : the script used to run on another server, the code is ok.
the shebang is good too.

any idea ?

thank you for all your help, you're very kind.

mnem0

Re: 403 error after modding httpd.conf

PostPosted: 19. July 2009 14:59
by Wiedmann
the shebang is good too.

Shure?

Re: 403 error after modding httpd.conf

PostPosted: 19. July 2009 15:01
by Nobbie
mnem0 wrote:the shebang is good too.


How can we know that? Please, show us the shebang line (copy&paste).

Re: 403 error after modding httpd.conf

PostPosted: 19. July 2009 15:04
by mnem0
here it is :
Code: Select all
#!c:\xampp\perl\bin -w


thank you for your great help :D

mnem0

Re: 403 error after modding httpd.conf

PostPosted: 19. July 2009 15:11
by Wiedmann
here it is :

Should be:
Code: Select all
#!c:\xampp\perl\bin\perl.exe -w

Re: 403 error after modding httpd.conf

PostPosted: 19. July 2009 15:13
by mnem0
what a lamer.
really sorry for wasting your time.
you solved it. a great thank you for you.

mnem0