Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-10-2003
Materialised
 
Posts: n/a
Default Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4

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?

  #2 (permalink)  
Old 11-10-2003
Brian Wakem
 
Posts: n/a
Default Re: Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4


"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


  #3 (permalink)  
Old 11-10-2003
Materialised
 
Posts: n/a
Default Re: Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4

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.

  #4 (permalink)  
Old 11-10-2003
Brian Wakem
 
Posts: n/a
Default Re: Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4


"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


  #5 (permalink)  
Old 11-10-2003
Materialised
 
Posts: n/a
Default Re: Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4

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.

  #6 (permalink)  
Old 11-10-2003
Brian Wakem
 
Posts: n/a
Default Re: Apache/2.0.48 (Unix) mod_perl/1.99_10 Perl/v5.6.1 PHP/4.3.4


"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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:26 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0