PHP error log missing.

Posted August 2, 2021 201 views
PHPLoggingUbuntu 20.04

So I have been using phperrorlog to know what is working and what is not and all, but then one day it was deleted so I head to get it back by doing some stuff and messing around to get it back and all, and I did after sometime later on it deleted itself to and I did what I did long ago to get my phperrorlog back, and this time it is not working and I have no clue on how to fix this please help me.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi @unieworld,

Check if you have enough space on your Droplet. Additionally, you seem to have log rotate which rotates your logs at a certain time.

As for the PHP error_log not working now, can you share your php.ini configuration so that I can see if anything looks off or not?

Additionally, what I’ll suggest is creating a file infofor.php and inside adding the following:

<?php phpinfo(); ?> 

Once you do load the PHP file and see in there if you have error_log enabled or not.

The only way I found a way to fix this was to, reinstalling PHP and APACHE since something in there went wrong for me and I have no clue how but it happened so I just reinstalled them and it was all fixed, the best option I can say for this kind of problem there might be somewhat a way batter option out there but this is what I found for my self.

  • Hi @unieworld,

    I see. In this case the error log was connected to PHP rather than Apache so maybe installing/reinstalling PHP would’ve solved the issue as well but anyway, I’m glad to hear you fixed the problem!