By doughboy
My server is pretty straightforward. Centos, PHP, Nginx, Apache, etc. Two days ago I started getting an error in my logs that it could not find a file that was there plain as day. After I deleted, then replaced the file, and restarted Apache things worked.
Today I started getting an error that it couldn’t find a PHP function in a class that extended another class. I renamed both files to old, then uploaded the original file and things started working again.
Permissions do not appear to have been changed and neither has the ownership changed.
These files in question haven’t been update/touched in months.
Looking for ideas as to what might be going on.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hey,
From what you’re describing, it sounds like you’re experiencing a rather peculiar issue. Files and functions “disappearing” or becoming “unrecognized” despite being present and unchanged for months can indeed be baffling. Given the stack you’re working with (CentOS, PHP, Nginx, Apache), there are a few areas we can explore to troubleshoot this issue:
OPcache Issues: OPcache improves PHP performance by storing precompiled script bytecode in shared memory, thus eliminating the need for PHP to load and parse scripts on each request. However, if there are issues with the cache, it could lead to PHP not recognizing changes to files or, in rare cases, functions. Clearing the OPcache (opcache_reset();
) or temporarily disabling it could help determine if this is the cause. This might also be related to the available RAM on the server.
Inodes Running Out: If your server is running out of inodes, it could lead to strange filesystem behavior, including the inability to recognize existing files. You can check inode usage with df -i
. Here is a guide on how to check your disk usage as well:
https://www.digitalocean.com/community/questions/28-no-space-left-on-device-error
Let me know how it goes!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.