A Conversation for The H2G2 Programmers' Corner

PHP and IIS

Post 1

Pastey

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.

smiley - rose


PHP and IIS

Post 2

Pastey

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?

smiley - rose


PHP and IIS

Post 3

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

Firewall? smiley - erm


PHP and IIS

Post 4

Pastey

Nah, the firewall is at the junction where the 'net comes into the office, this doesn't (shouldn't) go near that point.smiley - erm

smiley - rose


PHP and IIS

Post 5

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

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. smiley - erm


PHP and IIS

Post 6

Pastey

No, no software firewall, I've had that problem with ZA aswell.

smiley - rose


PHP and IIS

Post 7

Ion the Naysayer

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

Post 8

Pastey

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.smiley - erm

smiley - rose


PHP and IIS

Post 9

Ion the Naysayer

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

Post 10

Pastey

I'll check those next time I'm in the office Ion, thanks smiley - smiley

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.

smiley - rose


PHP and IIS

Post 11

Ion the Naysayer

No prob.

If none of those help, I'll try to come up with more suggestions...


Key: Complain about this post