Session var read by form C++ CGI prog ?
| From: | John Bryan | Date: | Tue, 02 Sep 2003 17:40:39 +0000 |
| Subject: | Session var read by form C++ CGI prog ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-161456@lists.php.net to get a copy of this message | ||
I need to use something like a session variable to make a variable available to an existing
form-invoked C++ program which takes as input a file being uploaded. Is this even do-able ?? If
so, what am I missing here ???
The C++ prog used to use the REMOTE_USER env var set by the web server but we are no longer doing
authentication via the webserver itself, so this one does not get set, and I need to set something
myself. The C++ prog would had been grabbing this by getenv("REMOTE_USER").
I was trying some php to set a session var 'UPATH' but the UPATH variable doesn't
seem to be visible to MyCppProg.exe :
--snip--
<?php
$_SESSION['UPATH'] = 'foobar';
?>
<form enctype="multipart/form-data" action="MyCppProg.exe"
method="post">
File to Upload: <input name="file" type="file"> <input
type="submit" value="Send">
</form>
--snip--
I am new to php, have been digging around on the web, and not making a lot of headway quickly
enough, so I'm asking.
Thanks,
JB