This is a discussion on Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4 within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi Everyone, I am having trouble running perl scripts from my user directories. Here is my userdir setup in my ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi Everyone,
I am having trouble running perl scripts from my user directories. Here is my userdir setup in my httpd.conf file UserDir public_html <Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS PROPFIND> Order deny,allow Deny from all </LimitExcept> </Directory> I have ExecCGI in there, but for some reason I can even run a simple perl script such as the following #!/usr/bin/perl print <<"DOC"; content-type: text/html\n\n print <html>\n print <h1>Hello World</h1>\n print </html>\n DOC Anyone have any ideas why? |
|
|||
|
"Materialised" <materialised@privacy.net> wrote in message news:bont9t$1fv8ts$1@ID-204621.news.uni-berlin.de... > Hi Everyone, > > I am having trouble running perl scripts from my user directories. > Here is my userdir setup in my httpd.conf file > > UserDir public_html > > <Directory /home/*/public_html> > AllowOverride FileInfo AuthConfig Limit Indexes > Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI > <Limit GET POST OPTIONS PROPFIND> > Order allow,deny > Allow from all > </Limit> > <LimitExcept GET POST OPTIONS PROPFIND> > Order deny,allow > Deny from all > </LimitExcept> > </Directory> > > I have ExecCGI in there, but for some reason I can even run a simple > perl script such as the following > > #!/usr/bin/perl > > > print <<"DOC"; > content-type: text/html\n\n > print <html>\n > print <h1>Hello World</h1>\n > print </html>\n > > > DOC Why are you putting print and \n in a here doc? That should be; print <<DOC; Content-type: text/html <html> <h1>Hello World</h1> </html> DOC A newline in a heredoc is a literal newline, you don't need to add \n, and the "print"'s are certainly not necessary. You may be able to run that script now, I don't know, you didn't tell us what kind of error you were getting. -- Brian Wakem |
|
|||
|
Brian Wakem wrote:
> "Materialised" <materialised@privacy.net> wrote in message > news:bont9t$1fv8ts$1@ID-204621.news.uni-berlin.de... > >>Hi Everyone, >> >>I am having trouble running perl scripts from my user directories. >>Here is my userdir setup in my httpd.conf file >> >>UserDir public_html >> >><Directory /home/*/public_html> >> AllowOverride FileInfo AuthConfig Limit Indexes >> Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI >> <Limit GET POST OPTIONS PROPFIND> >> Order allow,deny >> Allow from all >> </Limit> >> <LimitExcept GET POST OPTIONS PROPFIND> >> Order deny,allow >> Deny from all >> </LimitExcept> >></Directory> >> >>I have ExecCGI in there, but for some reason I can even run a simple >>perl script such as the following >> >>#!/usr/bin/perl >> >> >>print <<"DOC"; >>content-type: text/html\n\n >>print <html>\n >>print <h1>Hello World</h1>\n >>print </html>\n >> >> >>DOC > > > > Why are you putting print and \n in a here doc? That should be; > > print <<DOC; > Content-type: text/html > > > <html> > <h1>Hello World</h1> > </html> > DOC > > A newline in a heredoc is a literal newline, you don't need to add \n, and > the "print"'s are certainly not necessary. > > You may be able to run that script now, I don't know, you didn't tell us > what kind of error you were getting. > The error im getting is Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@purehacker.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4 Server All permissions are setup correctly though. |
|
|||
|
"Materialised" <materialised@privacy.net> wrote in message news:bonv8q$1glnsd$1@ID-204621.news.uni-berlin.de... > Brian Wakem wrote: > > "Materialised" <materialised@privacy.net> wrote in message > > news:bont9t$1fv8ts$1@ID-204621.news.uni-berlin.de... > > > >>Hi Everyone, > >> > >>I am having trouble running perl scripts from my user directories. > >>Here is my userdir setup in my httpd.conf file > >> > >>UserDir public_html > >> > >><Directory /home/*/public_html> > >> AllowOverride FileInfo AuthConfig Limit Indexes > >> Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI > >> <Limit GET POST OPTIONS PROPFIND> > >> Order allow,deny > >> Allow from all > >> </Limit> > >> <LimitExcept GET POST OPTIONS PROPFIND> > >> Order deny,allow > >> Deny from all > >> </LimitExcept> > >></Directory> > >> > >>I have ExecCGI in there, but for some reason I can even run a simple > >>perl script such as the following > >> > >>#!/usr/bin/perl > >> > >> > >>print <<"DOC"; > >>content-type: text/html\n\n > >>print <html>\n > >>print <h1>Hello World</h1>\n > >>print </html>\n > >> > >> > >>DOC > > > > > > > > Why are you putting print and \n in a here doc? That should be; > > > > print <<DOC; > > Content-type: text/html > > > > > > <html> > > <h1>Hello World</h1> > > </html> > > DOC > > > > A newline in a heredoc is a literal newline, you don't need to add \n, and > > the "print"'s are certainly not necessary. > > > > You may be able to run that script now, I don't know, you didn't tell us > > what kind of error you were getting. > > > The error im getting is > > Internal Server Error > > The server encountered an internal error or misconfiguration and was > unable to complete your request. > > Please contact the server administrator, root@purehacker.com and inform > them of the time the error occurred, and anything you might have done > that may have caused the error. > > More information about this error may be available in the server error log. > Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4 Server > > All permissions are setup correctly though. Change the script as I suggested, you are not printing a proper header which will cause the Internal Sever Error message that you are seeing. -- Brian Wakem |
|
|||
|
Brian Wakem wrote:
> "Materialised" <materialised@privacy.net> wrote in message > news:bonv8q$1glnsd$1@ID-204621.news.uni-berlin.de... > >>Brian Wakem wrote: >> >>>"Materialised" <materialised@privacy.net> wrote in message >>>news:bont9t$1fv8ts$1@ID-204621.news.uni-berlin.de... >>> >>> >>>>Hi Everyone, >>>> >>>>I am having trouble running perl scripts from my user directories. >>>>Here is my userdir setup in my httpd.conf file >>>> >>>>UserDir public_html >>>> >>>><Directory /home/*/public_html> >>>> AllowOverride FileInfo AuthConfig Limit Indexes >>>> Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI >>>> <Limit GET POST OPTIONS PROPFIND> >>>> Order allow,deny >>>> Allow from all >>>> </Limit> >>>> <LimitExcept GET POST OPTIONS PROPFIND> >>>> Order deny,allow >>>> Deny from all >>>> </LimitExcept> >>>></Directory> >>>> >>>>I have ExecCGI in there, but for some reason I can even run a simple >>>>perl script such as the following >>>> >>>>#!/usr/bin/perl >>>> >>>> >>>>print <<"DOC"; >>>>content-type: text/html\n\n >>>>print <html>\n >>>>print <h1>Hello World</h1>\n >>>>print </html>\n >>>> >>>> >>>>DOC >>> >>> >>> >>>Why are you putting print and \n in a here doc? That should be; >>> >>>print <<DOC; >>>Content-type: text/html >>> >>> >>><html> >>><h1>Hello World</h1> >>></html> >>>DOC >>> >>>A newline in a heredoc is a literal newline, you don't need to add \n, > > and > >>>the "print"'s are certainly not necessary. >>> >>>You may be able to run that script now, I don't know, you didn't tell us >>>what kind of error you were getting. >>> >> >>The error im getting is >> >>Internal Server Error >> >>The server encountered an internal error or misconfiguration and was >>unable to complete your request. >> >>Please contact the server administrator, root@purehacker.com and inform >>them of the time the error occurred, and anything you might have done >>that may have caused the error. >> >>More information about this error may be available in the server error > > log. > >>Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4 Server >> >>All permissions are setup correctly though. > > > > Change the script as I suggested, you are not printing a proper header which > will cause the Internal Sever Error message that you are seeing. > I did change as you suggested, and that was the error message I got. |
|
|||
|
"Materialised" <materialised@privacy.net> wrote in message news:boo8v7$1gncm4$2@ID-204621.news.uni-berlin.de... > Brian Wakem wrote: > > "Materialised" <materialised@privacy.net> wrote in message > > news:bonv8q$1glnsd$1@ID-204621.news.uni-berlin.de... > > > >>Brian Wakem wrote: > >> > >>>"Materialised" <materialised@privacy.net> wrote in message > >>>news:bont9t$1fv8ts$1@ID-204621.news.uni-berlin.de... > >>> > >>> > >>>>Hi Everyone, > >>>> > >>>>I am having trouble running perl scripts from my user directories. > >>>>Here is my userdir setup in my httpd.conf file > >>>> > >>>>UserDir public_html > >>>> > >>>><Directory /home/*/public_html> > >>>> AllowOverride FileInfo AuthConfig Limit Indexes > >>>> Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI > >>>> <Limit GET POST OPTIONS PROPFIND> > >>>> Order allow,deny > >>>> Allow from all > >>>> </Limit> > >>>> <LimitExcept GET POST OPTIONS PROPFIND> > >>>> Order deny,allow > >>>> Deny from all > >>>> </LimitExcept> > >>>></Directory> > >>>> > >>>>I have ExecCGI in there, but for some reason I can even run a simple > >>>>perl script such as the following > >>>> > >>>>#!/usr/bin/perl > >>>> > >>>> > >>>>print <<"DOC"; > >>>>content-type: text/html\n\n > >>>>print <html>\n > >>>>print <h1>Hello World</h1>\n > >>>>print </html>\n > >>>> > >>>> > >>>>DOC > >>> > >>> > >>> > >>>Why are you putting print and \n in a here doc? That should be; > >>> > >>>print <<DOC; > >>>Content-type: text/html > >>> > >>> > >>><html> > >>><h1>Hello World</h1> > >>></html> > >>>DOC > >>> > >>>A newline in a heredoc is a literal newline, you don't need to add \n, > > > > and > > > >>>the "print"'s are certainly not necessary. > >>> > >>>You may be able to run that script now, I don't know, you didn't tell us > >>>what kind of error you were getting. > >>> > >> > >>The error im getting is > >> > >>Internal Server Error > >> > >>The server encountered an internal error or misconfiguration and was > >>unable to complete your request. > >> > >>Please contact the server administrator, root@purehacker.com and inform > >>them of the time the error occurred, and anything you might have done > >>that may have caused the error. > >> > >>More information about this error may be available in the server error > > > > log. > > > >>Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4 Server > >> > >>All permissions are setup correctly though. > > > > > > > > Change the script as I suggested, you are not printing a proper header which > > will cause the Internal Sever Error message that you are seeing. > > > I did change as you suggested, and that was the error message I got. > The next step is to look in Apache's error_log - that should give you a good idea of what's going on. -- Brian Wakem |