Nightmare of PHP programmer: include_once fails

For a moment it was looking like our project got haunted. Suddenly we started getting errors from the libraries being included twice, function exists and class exits kind of error. First few times it was written off as a “honest” mistake and fixed on spot, but it continued to happen again and again. Of course, it was only showing up on production sites, none of the test sites had this issue. Some digging in the code and pulling hairs out lead to the issue: include_once was failing us. Yes, it was doing include of the same file again! One little detail – that only happened when we used...
read more