SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Provo, UT
    1 Post(s)
    0 Thread(s)

    PHP includes are failing to open occasionally

    I have noticed in my error_log file lately that my include file is failing to be included for some of my users. This is the error that is showing up:

    PHP Warning: include(): Failed opening 'adsense/resultsSkyscraper.php' for inclusion

    Does anyone know why it would work most of the time but occasionally fail?

    Convert your dollars into silver coins.

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    France, deep rural.
    17 Post(s)
    1 Thread(s)
    If I could find no commonality between the exceptional cases you reported, the first place I'd look is how the public files are accessing the include directory.

    Is /adsense a child of the include directory named in your php ini file, or is it set per directory (.htaccess), per server instance (httpd.conf) or per script and relying on some magic constant appearing from somewhere.

    That ironed out and discounted, and if you are including per script and the inclusion of /adsense files is dependent upon some conditional assessment, then make sure those conditions are bomb-proof (preferring === to == for example).

    These are the things I would tend to look at first.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts