Photo of Nathan Shubert-Harbison Nathan Shubert-Harbison

Main content

My battle with Spotlight

After an extremely frustrating week of debugging the strangest of PHP issues I’ve encountered, I’ve finally uncovered the problem. The tl;dr is when I wrote a file using file_put_contents(), other files in the same directory were having their access time updated. I was concerned PHP was doing far too much work and accessing other files, but I couldn’t figure out why. Turns out, it was just Spotlight indexing them. Read more about it on my Stack Overflow post if you’re curious. Frustrating to spend so much time on a bug like this one, but glad to have it sorted out.