A Conversation for The H2G2 Programmers' Corner
PHP and IIS
Pastey Started conversation Mar 4, 2003
Possibly not strict programming, but hey you're likely to know.
I've got IIS running on a win2k box and PHP4. I need to get it to upload files, but it's not doing it. I've checked the code, and checked IIS as much as I know, but not being very good at IIS I'm not saying I've got it right, so how do you configure IIS to let PHP upload files to it?
The files are to be uploaded using a form from the users computer on the intranet, so opening up security settings isn't really a worry.
PHP and IIS
Pastey Posted Mar 4, 2003
Okay, here's an update, when running the page on a browser on the computer that has the server and scripts on it, it works. Accessing the page on another computer on the network, and it doesn't work.
Any ideas?
PHP and IIS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted Mar 4, 2003
PHP and IIS
Pastey Posted Mar 4, 2003
Nah, the firewall is at the junction where the 'net comes into the office, this doesn't (shouldn't) go near that point.
PHP and IIS
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted Mar 4, 2003
So there's no software firewall on the machine running the scripts, then? I only ask because ZoneAlarm has caused me similar problems in the past. If the machine running the scripts is running under XP, you should check the settings in Windows' default inbuilt firewall too...
Otherwise, I have nothing really useful to contribute here.
PHP and IIS
Ion the Naysayer Posted Mar 4, 2003
Sounds like either IIS security settings or path problems...
It's hard to diagnose without knowing your settings and seeing the code.
PHP and IIS
Pastey Posted Mar 4, 2003
Yeah, but I don't think it's the code. I open IE on the machine running the server, it all works perfectly. I open IE on any other machine on the network, it doesn't work.
PHP and IIS
Ion the Naysayer Posted Mar 5, 2003
I assume you've checked to make sure you haven't referenced localhost or 127.0.0.1 anywhere...
Does the IIS user account have write access to the directory where the files are to be uploaded? It could be the script is running as SYSTEM on the local machine but as the IIS user account when accessed remotely.
Is PHP configured to run under the script engine or is it set up as a CGI executable? If PHP is configured as a CGI executable, the directory that has the PHP files in it must have Execute permissions (but be careful because accidents can happen if you let people upload files to a directory with execute access, not to mention what happens if you have a disgruntled user).
Hope some of this is helpful...
PHP and IIS
Pastey Posted Mar 6, 2003
I'll check those next time I'm in the office Ion, thanks
Security isn't too much of a concern because it's pretty much a stand alone network, and all the users have the abilty to load files onto it anyway, this script just puts them in the right place and adds information about them to a database.
PHP and IIS
Ion the Naysayer Posted Mar 6, 2003
No prob.
If none of those help, I'll try to come up with more suggestions...
Key: Complain about this post
PHP and IIS
- 1: Pastey (Mar 4, 2003)
- 2: Pastey (Mar 4, 2003)
- 3: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (Mar 4, 2003)
- 4: Pastey (Mar 4, 2003)
- 5: Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) (Mar 4, 2003)
- 6: Pastey (Mar 4, 2003)
- 7: Ion the Naysayer (Mar 4, 2003)
- 8: Pastey (Mar 4, 2003)
- 9: Ion the Naysayer (Mar 5, 2003)
- 10: Pastey (Mar 6, 2003)
- 11: Ion the Naysayer (Mar 6, 2003)
More Conversations for The H2G2 Programmers' Corner
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."