Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: "NoNe SuCh" in perl core??

by hossman (Prior)
on Feb 15, 2005 at 23:59 UTC ( [id://431387]=note: print w/replies, xml ) Need Help??


in reply to "NoNe SuCh" in perl core??

I've never noticed this before, but your post poked my curiousity, so I looked into it.

I can't explain what that environment variable is for, But I think I can explain why you are getting that in your logs.

According to some results i found when searching for "invalid character" and "exportstr", bash (or at least some versions of bash) will not allow you to have certain characters in the names of environment variables. if you try to set/export an variable with an invalid cahracter, you get a message like the one you posted (32 is SPACE)

I haven't been able to confirm this (because my version of bash doesn't seem to mind env variables with spaces in them) but i believe on the box you found this error:

  1. sh is a symlink to bash
  2. perl -le '%ENV=("foo bar" => 1); print `env`;' should produce a similar warning.

The issue being that in perl you can happily set an environment variable with a space in the name (because it's just a hash) but when you go to exec a process (using sh, which is just bash) bash rejects that variable.

Sooooooo...

Based on the location of that my_setenv in perl.c, it looks like it only gets used when perl is embeded, and since you mentioned it was in your apache log, i would guess you are using mod_perl -- so my hunch is: you have a mod_perl script/handler which uses either backticks or system() to invoke an external app. When that happens, bash is complaining about this environment varaible.

Replies are listed 'Best First'.
Re^2: "NoNe SuCh" in perl core??
by thor (Priest) on Feb 16, 2005 at 03:26 UTC
    All I have to say is "holy crap"! ++ for hossman!

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

Re^2: "NoNe SuCh" in perl core??
by DrHyde (Prior) on Feb 16, 2005 at 10:06 UTC
    I can't replicate this:
    cantrelld@c0025:~$ ls -l `which sh` lrwxrwxrwx 1 root root 4 Nov 17 09:54 /bin/sh -> bash cantrelld@c0025:~$ perl -le '%ENV=("foo bar" => 1); print `env`;' foo bar=1 cantrelld@c0025:~$ perl -v This is perl, v5.8.4 built for i386-linux-thread-multi

      Neither can I. As I said...

      I haven't been able to confirm this (because my version of bash doesn't seem to mind env variables with spaces in them)

      The question is: which version of bash do you have, and which version does saintmike have; if they are the same, then I'm probably wrong.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found