2007-07-29 10:01:55 UTC
I found an easy way to make all the cookies work. One warning though is that this is uni-directional (the sends the current cookies to PHP, but PHP cannot set new cookies or modify cookies).
To make cookies work:
1) In upload.cgi, find the line open(POST, "...");
2) Add the line:
$cookie = $ENV{'HTTP_COOKIE'};
Before the open(POST, "..."); line
3) Change the open(POST, "..."); line from
open(POST, "|$post_prog -c\"$content_type\" $php_uploader");
to
open(POST, "|$post_prog -c\"$content_type\" -H\"Cookie: $cookie\" $php_uploader");
This tells POST to send the cookie header to PHP and you will have complete access to the cookies in PHP!