Posted by Jerry Stuckle on 04/26/06 19:36
tony@tony.com wrote:
> In article <444f6b58$0$31641$e4fe514c@news.xs4all.nl>,
> since_humans_read_this_I_am_spammed_too_much@spamyourself.com says...
>
>>...
>
>
> Hi Erwin
>
>
>>Win 98? Wow. :-)
>
>
> yes I like to have a firewall on my internet connection.
>
>
>
>>Did you try to use putenv() ??
>
>
> yes the trouble with putenv() is it doesnt seem to work at all under
> wondows. (I have PHP version 5.0.2)
>
> It works fine on my linux box but is just ignored by Billy Goats beasty.
>
> I'm trying to make a persistent change that stays there until I change it
> back again using PHP without having to use DOS batch files (Which would
> as you suggest work - but putting it in a file on the disk would void my
> reason for wanting this in the first place).
>
> tony
>
You can't do it. Win98 only allows a process to change the environment for that
process and it's children. Once the process ends, the environment goes back to
what it was.
It works from a batch file because the process interpreting the batch file is
command.com - the same one which is running your window. But to process a PHP
file, command.com has to start a child process (php.exe). And php.exe can only
change it's environment and those of its children.
About the only thing you might be able to do is run the php program and from
there start a new command.com process. The new one will have the environment
variables you want.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|