Re: /dev/null problems

2001-06-14 Thread Doug MacEachern

On 28 Mar 2001, Matthew Kennedy wrote:

> Hello,
> 
> >From the mod_perl guide:
> 
>   syntax error at /dev/null line 1, near "line arguments:"
>   Execution of /dev/null aborted due to compilation errors.
>   parse: Undefined error: 0
>   There is a chance that your /dev/null device is broken. Try:
>   % sudo echo > /dev/null
> 
> This is exactly the problem I have been getting when starting Apache
> mod_perl, however the suggested fix does not work for me. We're on a
> HPUX 11 machine. Is there another way to solve this problem? As I
> understand it, if /dev/null is being used as the $0 argument to the
> handler, perhaps I could somehow explicitly set it to another (empty)
> file? How would I go about that?

you can use this patch.  -e0 used to be the default, but caused some
problems related to suexec or something.

--- src/modules/perl/mod_perl.c~Wed Jun 13 22:17:51 2001
+++ src/modules/perl/mod_perl.c Thu Jun 14 10:02:15 2001
@@ -670,7 +670,7 @@
 #ifdef WIN32
 argv[argc++] = "nul";
 #else
-argv[argc++] = "/dev/null";
+argv[argc++] = "-e0";
 #endif
 
 MP_TRACE_g(fprintf(stderr, "perl_parse args: "));





Re: /dev/null problems

2001-03-29 Thread Stas Bekman

>
> Not answering your mod_perl question here, but I believe this
> suggestion in the guide isn't useful advice in any event --
> this isn't 'echo'ing to /dev/null as su (root); rather it's 'echo'ing
> a line as su, and you (normal user) are redirecting that output to
> /dev/null.
>
> I.e., the grouping of that command is like so (yeah, I know, this is
> in no way intended to be real shell syntax, just to show the
> semantics...):
>
> (sudo echo) > /dev/null
>
> rather than:
>
> sudo (echo >/dev/null)
>
> Not sure what is trying to be accomplished by either of these, but in
> the interests of clarity in the guide, I think this ought to be either
> corrected or removed entirely.  I'll volunteer to make the changes, if
> someone can clarify exactly what the intended result is.
>
> Stas? What do you say? Am I missing something here?

I don't remember why the 'sudo' is there, the file is crw-rw-rw, so there
is no need for sudo at all. I've removed the sudo part.

>
> 
>
>
> On 28 Mar 2001, Matthew Kennedy wrote:
>
> > Hello,
> >
> > >From the mod_perl guide:
> >
> >   syntax error at /dev/null line 1, near "line arguments:"
> >   Execution of /dev/null aborted due to compilation errors.
> >   parse: Undefined error: 0
> >   There is a chance that your /dev/null device is broken. Try:
> >   % sudo echo > /dev/null
> >
> > This is exactly the problem I have been getting when starting Apache
> > mod_perl, however the suggested fix does not work for me. We're on a
> > HPUX 11 machine. Is there another way to solve this problem? As I
> > understand it, if /dev/null is being used as the $0 argument to the
> > handler, perhaps I could somehow explicitly set it to another (empty)
> > file? How would I go about that?
> >
> > Does anyone have any suggestions?
> >
> > Thanks,
> >
> > Matt
> >
>
> --
> =-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
> Steve Reppucci   [EMAIL PROTECTED] |
> Logical Choice Software  http://logsoft.com/ |
>
>



_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: /dev/null problems

2001-03-28 Thread Steve Reppucci


Not answering your mod_perl question here, but I believe this
suggestion in the guide isn't useful advice in any event -- 
this isn't 'echo'ing to /dev/null as su (root); rather it's 'echo'ing
a line as su, and you (normal user) are redirecting that output to 
/dev/null.

I.e., the grouping of that command is like so (yeah, I know, this is
in no way intended to be real shell syntax, just to show the
semantics...):

(sudo echo) > /dev/null

rather than:

sudo (echo >/dev/null)

Not sure what is trying to be accomplished by either of these, but in
the interests of clarity in the guide, I think this ought to be either
corrected or removed entirely.  I'll volunteer to make the changes, if
someone can clarify exactly what the intended result is.

Stas? What do you say? Am I missing something here?




On 28 Mar 2001, Matthew Kennedy wrote:

> Hello,
> 
> >From the mod_perl guide:
> 
>   syntax error at /dev/null line 1, near "line arguments:"
>   Execution of /dev/null aborted due to compilation errors.
>   parse: Undefined error: 0
>   There is a chance that your /dev/null device is broken. Try:
>   % sudo echo > /dev/null
> 
> This is exactly the problem I have been getting when starting Apache
> mod_perl, however the suggested fix does not work for me. We're on a
> HPUX 11 machine. Is there another way to solve this problem? As I
> understand it, if /dev/null is being used as the $0 argument to the
> handler, perhaps I could somehow explicitly set it to another (empty)
> file? How would I go about that?
> 
> Does anyone have any suggestions?
> 
> Thanks,
> 
> Matt
> 

-- 
=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
Steve Reppucci   [EMAIL PROTECTED] |
Logical Choice Software  http://logsoft.com/ |





RE: /dev/null problems

2001-03-28 Thread Matthew Kennedy

On 28 Mar 2001 12:42:46 -0800, Rob Bloodgood wrote:
> 
> According to the sample:
> >   syntax error at /dev/null line 1, near "line arguments:"
> >   Execution of /dev/null aborted due to compilation errors.
> >   parse: Undefined error: 0
> 
> Which says to me that one of your (scripts/server-parsed pages/modules) has
> the string "line arguments:" in it, and there is a syntax error near there.

That "line arguments:" string will throw you off -- each time I tried
restarting the server I'd see different junk in it's place (debug
messages from various daemons mostly). It was almost as if /dev/null had
decided to be a FIFO for some reason.






Re: /dev/null problems

2001-03-28 Thread Matthew Kennedy

On 28 Mar 2001 21:33:51 +0100, G.W. Haywood wrote:
> Hi there,
> 
> Have you checked to make sure that your /dev/null is really broken?
> My feeling is that this is unlikely.  The symptom might indicate that
> something is not configured correctly but there's no information to 
> work with.


As Kee wrote in the thread, removing /dev/null and re-creating it worked
for me. I did check /dev/null before I fixed it -- it did seem to have
the right major/minor numbers.






RE: /dev/null problems

2001-03-28 Thread Rob Bloodgood

> >From the mod_perl guide:
>
>   syntax error at /dev/null line 1, near "line arguments:"
>   Execution of /dev/null aborted due to compilation errors.
>   parse: Undefined error: 0
>   There is a chance that your /dev/null device is broken. Try:
>   % sudo echo > /dev/null
>
> This is exactly the problem I have been getting when starting Apache
> mod_perl, however the suggested fix does not work for me. We're on a
> HPUX 11 machine. Is there another way to solve this problem? As I
> understand it, if /dev/null is being used as the $0 argument to the
> handler, perhaps I could somehow explicitly set it to another (empty)
> file? How would I go about that?

I've never seen this to be an actual /dev/null problem.  I've seen this in
HTML::EmbPerl and Apache::Registry, where the "/dev/null" is what gets put
in $0 when mod_perl has lost track of the original filename (and line 1
because it forget WHERE it was, too :-).

According to the sample:
>   syntax error at /dev/null line 1, near "line arguments:"
>   Execution of /dev/null aborted due to compilation errors.
>   parse: Undefined error: 0

Which says to me that one of your (scripts/server-parsed pages/modules) has
the string "line arguments:" in it, and there is a syntax error near there.

So (for example, on my Linux system):
find /home/httpd /etc/httpd/lib/perl -type f -exec grep -l 'line arguments:'
{} \;

the result should show you which file to fix.

HTH!

L8r,
Rob




Re: /dev/null problems

2001-03-28 Thread G.W. Haywood

Hi there,

On 28 Mar 2001, Matthew Kennedy wrote:

> >From the mod_perl guide:
> 
>   syntax error at /dev/null line 1, near "line arguments:"

> This is exactly the problem I have been getting when starting Apache

> Does anyone have any suggestions?

Have you checked to make sure that your /dev/null is really broken?
My feeling is that this is unlikely.  The symptom might indicate that
something is not configured correctly but there's no information to 
work with.

73,
Ged.