Apache Debugging Postmortem
Have you ever encountered software breakdown when working with Wordpress? It is frustrating especially when you do not know where to start debugging and logs are not helping enough. Wordpress usually run on LAMP (Linux, Apache, MySQL, and PHP). These tools allow you to run blogs, portfolios, e-commerce, and company websites. Breakdown of one of these tools deteriorates your efforts to finish the project you are working on. Let’s dive through how I encountered software breakdown and the way I solved the error.
Issue Summary
On the 10th of October 2023, from 9:40pm to 10:12pm, my efforts to start Apache on my terminal were void. I could only get 500 error. I found myself encountering frustration, confusion, and not forgetting, time loss since I had a deadline to beat. The root cause of this error was the server not accessing the class-wp-locale.php file.
Timeline (EAT)
Root cause and Resolution
At around 9:40pm, I tried to run a certain Wordpress project I was working on, but my efforts were void. I kept getting 500 error every time I tried to run Apache. First, I run curl localhost to get exactly which file was having the error and got it was lack of html in apache. Then I used strace -o apache -p and the address of apache2 in my container to monitor the system call. Afterwards, I opened the apache file and started to check the path projecting error 500, which was /var/www/html/wp-includes/class-wp-locale.phpp. As you can notice, the php extension was having double p making the server not to read the file. So, I navigated to /var/www/html/ directory, opened the wp-settings.php file, and edited class-wp-locale.phpp to class-wp-locale.php. My apache started running upon after I have debugged the error.
领英推荐
Corrective and Preventive Measures
During the analysis of the crash, the following tasks were developed in order to prevent another occurrence and improve recovery time.
Conclusion
Software breakdowns are normal and you should not feel frustrated once you encounter them. The best way to deal with them is to check for the root cause, debug it, and your software will be up running again.