I have a website with which I want to record the ip’s of those who visit it. Now, I think I have some code that will do the job (I got this from here): What I want this to end up doing is saving the ip address and the date of everyone who visits my website to a log.txt file.
Tag: logging
What is the use of ‘flock’ in PHP [closed]
I am working on Codeigniter 3 for a month, and i want to make my own logging app, that logs the entry of the users and their actions on the website.So i digged deep into the codes related to logging …
laravel log system with logstash
I have a laravel application that I want to store my logs into my logstash and see them in kibana i searched a lot over the net to find a solution for it but I didnt find any good source for it, is there any package to use laravel logs into logstash ??? by the way I have my logstash
Apache / PHP error_log location in Docker
My PHP script has an error. For example, this shows this on the screen: Warning: require(/var/www/foo.php): failed to open stream: Where can I find this in the logs? I tried docker logs containerName, but it only shows access logs. E.g., 192.168.2.1 – – [17/Mar/2019:10:00:00 +0000] “GET / HTTP/1.1” 200 505 “-” “Mozilla/5.0 (Windows NT 6.1; Win64; x64)… It doesn’t show
How to log errors in the same directory of the script
What the question is about: need each script to log its errors in the same directory that the script is located, need to achieve this through pure configuration. By script I am not referring to included files, I’m referring to the files of the executing web pages. Example 1 A syntax error of: Has to log to: Example 2 A
error log truncated in laravel 5.3
i have this entry in my laravel 5.3 log 2016-12-22 17:23:37] local.ERROR: GuzzleHttpExceptionClientException: Client error: POST https://api.sparkpost.com/api/v1/transmissions resulted in a …
What is the best way to read last lines (i.e. “tail”) from a file using PHP?
In my PHP application I need to read multiple lines starting from the end of many files (mostly logs). Sometimes I need only the last one, sometimes I need tens or hundreds. Basically, I want something as flexible as the Unix tail command. There are questions here about how to get the single last line from a file (but I
What’s more efficient – storing logs in sql database or files?
I have few scripts loaded by cron quite often. Right now I don’t store any logs, so if any script fails to load, I won’t know it till I see results – and even when I notice that results are not correct, I can’t do anything since I don’t know which script failed. I’ve decided to store logs, but I
php return 500 error but no error log
I am having an issue when I have a php application that is returning an internal server error (500) however nothing is showing up in the error log. Now I know there are error with what I am trying to …