Jump to content

fopen fails where copy works fine / Windows


niksoftware

Recommended Posts

I am having a very difficult time working out what to look at next. I have a page and it will not fopen a new file or an existing one to write.

Even though I have a couple of other pages that copy into the same location without trouble.

 

My PHP is 5.2.13 on W2k3 IIS.

 

Here is the code that works;

     copy($myDir.$file, "\\\\Eeyore\\TempEDI\\".$file);

 

Here is the code that fails;

     $fileN = "\\\\Eeyore\\TempEDI\\alley.txt";
     $fh1 = fopen($fileN, 'wb');

 

 

I have tried with and without the new file already existing.

 

I have checked NTFS permissions and the Share permissions.

 

The webserver in use is remote to the files.

 

I have turned on File level object access auditing on the Eeyore server (also win2k3) and the fopen call does not even hit the Eeyore server, I can see all other access to the file and folder but nothing from the page in question.

 

Safe_mode and Opendirbase are both unset in php.ini.

 

All I want to do is make a text file and add some lines of text, this problem is absolutely infuriating.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.