Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: fileparse(): need a valid pathname

by haj (Vicar)
on Jul 06, 2018 at 18:46 UTC ( [id://1218064]=note: print w/replies, xml ) Need Help??


in reply to fileparse(): need a valid pathname

I'd guess that your web server software doesn't provide the environment variable SCRIPT_FILENAME. That variable is not documented in the CGI 1.1 RFC, so maybe you need to check the documentation of your web server whether they changed their behaviour.

Technically, $ENV{SCRIPT_FILENAME} is supposed to be the name of your program in "file space", as opposed to $ENV{SCRIPT_NAME} which is part of the RFC and is the name of the same program in "URL space". Depending on your web server configuration, you might succeed by simply writing my $dir=dirname($0); because $0 is the file name of your program.

Log In?
Username:
Password:

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

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

    No recent polls found