in reply to mkpath (and rmtree) throw strange error when used in CGI

So what's in the error log of your web server? That's the easiest way to find out about the "malformed header"s.

I bet it's either an issue with missing permissions, or wrong relative paths.

  • Comment on Re: mkpath (and rmtree) throw strange error when used in CGI

Replies are listed 'Best First'.
Re^2: mkpath (and rmtree) throw strange error when used in CGI
by ibmman (Novice) on Feb 10, 2009 at 22:12 UTC
     [Tue Feb 10 17:08:48 2009] [error] [client 129.21.196.233] malformed header from script. Bad header=mkdir /home/abc5565/media/T051 as an example- but the directories DO get created where they should be, and they're accessible (though I was trying to set them as 777 and it seems they get 755 regardless of if I specify mode=>0777 to mkpath).
      So some part of your script actually prints out something before the header is printed. Maybe a left-over debugging statement?

      Or do you have any environment variables with debug in the name?