I am not able to see the logs in my site

adler96

Member
Messages
117
Reaction score
2
Points
18
My site nightearth.com is failing for some reason (I am getting an Internal Server Error). I have tried to check the logs, but they are empty. How can I get the logs working?
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
i tried to look up your account but am getting issues on my end,
but i did ask a staff member to review your post
 

adler96

Member
Messages
117
Reaction score
2
Points
18
My site is on https://x12.x10hosting.com:2222/. It is working now. I kept changing things on the live website as some things seemed to break it but I couldn't figure out what. In the end, it started working again with the original code, so I have no idea of what happened.

Being able to see the error logs would be really convenient.
 

adler96

Member
Messages
117
Reaction score
2
Points
18
Yes, the site is working now. Not sure if it was anything I did, or anything on the x10 side.

The error log in that URL still appears empty nonetheless.
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
if your site is working again without errors then there is no errors to log.
if that makes sense.
do you see any logs at all such as visitors.?
or nothing at all even after a few days.
 

adler96

Member
Messages
117
Reaction score
2
Points
18
Ok, I've fixed the issue with that page. I've enabled the display_errors flag, so I've been able to see the error in the browser. So it is now working on the nightearth site after I've uploaded the fix.

I've left the issue on purpose on the other site: https://www.typicaldish.com/top.php - Invoking this should leave traces in the error log, but it does not.
 

mrburnsx

Community Advocate
Community Support
Messages
372
Reaction score
36
Points
28
Ok, I've fixed the issue with that page. I've enabled the display_errors flag, so I've been able to see the error in the browser. So it is now working on the nightearth site after I've uploaded the fix.

I've left the issue on purpose on the other site: https://www.typicaldish.com/top.php - Invoking this should leave traces in the error log, but it does not.
Is the log_errors setting enabled? It should be by default, but its worth a check
 

adler96

Member
Messages
117
Reaction score
2
Points
18
No logs at all. There were no errors logged either when there was a syntax error in my code.
 

Eric S

Administrator
Staff member
Messages
1,056
Reaction score
145
Points
63
I can view the following page without any errors or issues :


What errors are you seeing?
 

adler96

Member
Messages
117
Reaction score
2
Points
18
Right now none. I used to have a short-hand open tag ("<?") which php was ignoring with the configuration in x10hosting. But I have fixed it.
Let me just create a copy of that page, with an error:


Invoking this script should make an error visible in the error log. But it does not.
 

ctyrd

Active Member
Messages
956
Reaction score
80
Points
28
The system logging is more of a statistic error, not a scripting error. I only have 404 errors in the logs. 500 error system stops. So no logging.

Code:
2023-04-25 05:10:38.337536 [INFO] [3705859] [198.251.73.73:57447#APVH_www.ctyrd.org:443] File not found [/home/********/domains/ctyrd.org/private_html/sitemap.xml]

PHP error logging may need to be enabled via htaccess and creating your own php error log.

Code:
# enable PHP error logging
php_flag  log_errors on
php_value error_log /home/********/domains/ctyrd.org/private_html/PHP_errors.log
 
Last edited:

mrburnsx

Community Advocate
Community Support
Messages
372
Reaction score
36
Points
28
The system logging is more of a statistic error, not a scripting error. I only have 404 errors in the logs. 500 error system stops. So no logging. http://www.typicaldish.com/cathouse.php

Code:
2023-04-25 05:10:38.337536 [INFO] [3705859] [REDACTED_IP:57447#APVH_www.ctyrd.org:443] File not found [/home/********/domains/ctyrd.org/private_html/sitemap.xml]

PHP error logging may need to be enabled via htaccess and creating your own php error log.

Code:
# enable PHP error logging
php_flag  log_errors on
php_value error_log /home/********/domains/ctyrd.org/private_html/PHP_errors.log
I get scripting errors in my error log without having to do that. I’d redact your IP though from the log if that’s yours.
 

ctyrd

Active Member
Messages
956
Reaction score
80
Points
28
I get scripting errors in my error log without having to do that. I’d redact your IP though from the log if that’s yours.
No not my IP. So your getting php errors in directadmin User Statistics log files? I added
Code:
<?php include 'footer.php';?>
to my index file, no file footer.php and no php error in User Statistics log files. But I did get php error here:
php error returned:
Code:
[25-Apr-2023 11:05:54 America/Chicago] PHP Warning:  include(footer.php): Failed to open stream: No such file or directory in /home/********/domains/ctyrd.org/public_html/index.php on line 83
 
Last edited:

mrburnsx

Community Advocate
Community Support
Messages
372
Reaction score
36
Points
28
No not my IP. So your getting php errors in directadmin User Statistics log files? I added
Code:
<?php include 'footer.php';?>
to my index file no file footer.php and no php error in log. But I did get error here: https://ctyrd.org/logs/php_errors.log

php error returned:

Code:
[25-Apr-2023 11:05:54 America/Chicago] PHP Warning:  include(footer.php): Failed to open stream: No such file or directory in /home/********/domains/ctyrd.org/public_html/index.php on line 83
Yes, this was in my DirectAdmin User Statistics error log for the domain when I did the same thing you did.

Code:
2023-04-25 12:50:57.948258 [NOTICE] [3037364] [T0] [127.0.0.1:57360#APVH_www.sprintswac.tk:443] [STDERR] PHP Warning:  include(footer.php): Failed to open stream: No such file or directory in /home/username/domains/sprintswac.tk/public_html/test_file.php on line 1
2023-04-25 12:50:57.948271 [NOTICE] [3037364] [T0] [127.0.0.1:57360#APVH_www.sprintswac.tk:443] [STDERR] PHP Stack trace:
2023-04-25 12:50:57.998354 [NOTICE] [3037364] [T0] [127.0.0.1:57360#APVH_www.sprintswac.tk:443] [STDERR] PHP   1. {main}() /home/username/domains/sprintswac.tk/public_html/test_file.php:0
2023-04-25 12:50:57.998405 [NOTICE] [3037364] [T0] [127.0.0.1:57360#APVH_www.sprintswac.tk:443] [STDERR] PHP Warning:  include(): Failed opening 'footer.php' for inclusion (include_path='.:/opt/alt/php82/usr/share/pear:/opt/alt/php82/usr/share/php:/usr/share/pear:/usr/share/php') in /home/username/domains/sprintswac.tk/public_html/test_file.php on line 1
2023-04-25 12:50:57.998411 [NOTICE] [3037364] [T0] [127.0.0.1:57360#APVH_www.sprintswac.tk:443] [STDERR] PHP Stack trace:
2023-04-25 12:50:57.998417 [NOTICE] [3037364] [T0] [127.0.0.1:57360#APVH_www.sprintswac.tk:443] [STDERR] PHP   1. {main}() /home/username/domains/sprintswac.tk/public_html/test_file.php:0
 

adler96

Member
Messages
117
Reaction score
2
Points
18
There is nothing inside /domains/typicaldish.com/logs, and nothing from DirectAdmin either
 
Top