I'm having a very strange issue, where PHP include and require statements fails after a number of executions.

The site is running on IIS 7/Windows 2008 R2 and the site's content is stored in a remote share on another Windows Server 2008 R2.

PHP is version 5.3. The same thing does not happen when using version 5.2.

A test page with a require statement would work fine and after a number of refreshes it would start failing with the following error (in this case a warning, if it where a require statement it would throw a fatal error).

Warning: require(./site-header.php): failed to open stream: No such file or directory in \mynas\myshare\mysite\index.php on line 17 Fatal error: require(): Failed opening required './wp-blog-header.php' (include_path='.;C:\php\includes') in \mynas\myshare\mysite\index.php

Recycling the application poool would clear the condition for a little while until it happens again.

It is worth noticing that the issue does not show at all if the include is absolute.

Would appreciate any hints in how to troubleshot this issue.

  • Are you a sysadmin or are you programming on a shared host?
    – random
    Commented May 19, 2011 at 18:35
  • I'm the sysadmin
    – ademar
    Commented May 19, 2011 at 18:45
  • When you are getting the error is the nas available from explorer? There are a couple of possible things that would cause this, one is reaching/exceeding maximum number of supported connections to the nas, the other is the nas being temporarily unavailable for some other reason (network issue, disk issue whatever). Commented May 19, 2011 at 21:30
  • I've considered those probables but note that a different PHP version does not exhibit the issue, there is also ASP/ASP.NET apps running in the same server without any issues. I'm also aware of MaxCmds,MaxWorkItems and MaxMpxCT params.
    – ademar
    Commented May 20, 2011 at 4:31
  • I'm suspecting of FastCGI and some SMB 2.x quirk
    – ademar
    Commented May 20, 2011 at 4:41


You must log in to answer this question.

Browse other questions tagged .