Sunday, 2 May 2010

PHP file_exists function bug and Domain Migration

First of all, no, this is not a Bug report. Just a friendly title to someone who might be asking themselves the same thing.

The other day i was reported that our Intranet website was not working properly. I looked at the PHP code to see if everything was in order and runned a few tests with variable placing inside the file_exists and the function was returning false when the file actually existed. Why is this i asked?! Eventually i found out, there was no bug or change in the code.

We had at our corporate environment migrated the domain and Intranet was running smoothly for 2 weeks. At the end of the 2 weeks the old domain was shutdown. Only by the third day this Intranet communication came to me, but the answer was that in the IIS manager for the Intranet Server, whe still had issues with the "Directory Security", pointing to a user from the old domain.

The file_exists was trying to access the path with a user that was no longer valid, returning false on the function as it had no permissions.

Hope it helps

Taken from:

1 comment: