[Phpwm] Changing the scripts user
Jujhar Singh
jujhar at medilinkwm.co.uk
Tue Mar 17 13:30:41 UTC 2009
Mike,
For anonymous access, you can only execute the script as the IIS process
user.
Both Fastcgi and for ISAPI as a anonymous user in IIS php will only have
the permissions that have been allocated to the IUSR_<MACHINENAME>
account.
If your website is running in user authenticated mode (active directory,
ldap) then PHP will run as the user that has just logged in. Be warned
though, passwords will be sent in plain text so I'd recommend using SSL.
J
----------------------------------------------------------------------
Message: 1
Date: Tue, 17 Mar 2009 12:40:12 +0000
From: Mike Tipping <mike at etuna.co.uk>
Subject: [Phpwm] Changing the scripts user
To: West Midlands PHP User Group <phpwm at mailman.lug.org.uk>
Message-ID: <C5E54AAC.F948%mike at etuna.co.uk>
Content-Type: text/plain; charset="US-ASCII"
I have a script running on a clients windows (under IIS) server which is
trying to use file_get_contents() to access a csv file from yahoo
finance.
Works fine on my Linux test server but the windows user account that is
running the website on the clients server doesn't have the right to
access
external websites so the script fails.
And the client won't enable that right on the user.
Is there a way in the PHP script I can change the user that is running
the
script or get file_get_contents() to execute as a different user?
Cheers
Mike
More information about the Phpwm
mailing list