Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Might there be some bug in glob under apache?

by markseger (Beadle)
on Feb 14, 2012 at 21:25 UTC ( #953774=note: print w/ replies, xml ) Need Help??


in reply to Re: Might there be some bug in glob under apache?
in thread Might there be some bug in glob under apache?

Where would you suggest doing error checking? I thought either glob succeeds and returns a list or fails and doesn't. If it succeeds it will print a non-zero number and if it fails it would return zero. It does seem to me it is failing but how would I get more clarity as to why?

As for bugs being furthest from my mind, I guess my finding solid bugs in both HiRes::Time and Compress::Zlib have reinforced my belief that no code is perfect nor can be tested in all environments.

-mark


Comment on Re^2: Might there be some bug in glob under apache?
Replies are listed 'Best First'.
Re^3: Might there be some bug in glob under apache?
by Anonymous Monk on Feb 14, 2012 at 21:45 UTC

    Where would you suggest doing error checking? I thought either glob succeeds and returns a list or fails and doesn't. If it succeeds it will print a non-zero number and if it fails it would return zero. It does seem to me it is failing but how would I get more clarity as to why?

    One way

    $ perl -le " print glob 'foo/*'; warn sprintf q/ERRRR(%d)(%s)(%d)(%s)/ +, $!,$!,$^E,$^E; " ERRRR(22)(Invalid argument)(5)(Access is denied) at -e line 1. $ perl -le " print glob 'nonexist/*'; warn sprintf q/ERRRR(%d)(%s)(%d) +(%s)/, $!,$!,$^E,$^E; " ERRRR(2)(No such file or directory)(3)(The system cannot find the path + specified) at -e line 1. $ ls -loanh foo ls: reading directory ado: Permission denied total 0 $ ls -loanh nonexist ls: nonexist: No such file or directory

    As for bugs being furthest from my mind ...

    .oO{{{ Something is wrong, but I don't know what, or how to check, must be a bug in my tools }}} -- Ah yes, and you are the first person to have noticed this bug since 1994. Sure.; also known as superstition :)

      Oh I see, you mean to verify the directory is there, etc. I should have said the very first thing I did was to 'su apache', after granting it login in /etc/passwd. Then I ran my script manually form a shell and it ran jusyt fine. So the directory exists AND is readable by the apache user BUT the glob returns a 0 when invoked as a web page.

      Still feels like a funky apache interaction thing.

      -mark

        Still feels like a funky apache interaction thing.

        Well, I did mention chroot and selinux, so check those too (I don't know how)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://953774]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2015-07-29 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls