It'd likely be more helpful if you actually showed the text you're getting... without that, I just have to imagine it.
Most likely problem in CGI when dealing with the filesystem is write/execute permission. Remember that the CGI app is usually not running as your user, but as whatever apache drops privileges to (apache and nobody are common choices, but could be anything). So if that user doesn't have permission to make the directory, it will fail.
What you are probably seeing is mkpath's failure. According to the docs, it'll use Carp::croak - so trap it with eval:
But that's just a guess.unless (eval { mkpath($dir); 1 }) { show_error_page("Couldn't create $dir: $@"); }
In reply to Re: mkpath (and rmtree) throw strange error when used in CGI
by Tanktalus
in thread mkpath (and rmtree) throw strange error when used in CGI
by ibmman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |