SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    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?

    Thanks!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    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.


Bookmarks

Posting Permissions

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