Skip to main content
Topic: Php errors (Read 2468 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Php errors

When php errors occur, the directory structure is displayed to the user. Is there any way to block this? Seems that may not be the best for security.  Thanks!

 

Re: Php errors

Reply #1

Can you add
Code: [Select]
display_errors = Off
to your php.ini ?

Re: Php errors

Reply #2

Quote from: Spuds – Can you add
Code: [Select]
display_errors = Off
to your php.ini ?

Well, that was my first thought.  Here is what a user posted:


Screenshot_2018-05-28-08-14-17.png


Here is phpinfo in ACP, to verify the correct file:

screenshot.jpg



And here is the excerpt from that file:


Code: [Select]
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = Off


Though it has been unchanged since 7.2 install months ago.  Am I still doing something wrong?   :o


Secondarily I'd like to troubleshoot the error message itself.  Not sure what's going on there. 

Re: Php errors

Reply #3

Oh, thats just a error that ElkArte "caught" and is simply displaying the error the system reported, not really php exposure.

The only way that I know of to stop that from exposing the path would be to silence '@' the error where its occurring, but we need to see if there is a way to hide paths in the future since using the error silencer is not recommended if it can be avoided.

As to why it happened, don't know, but failure to "stat" a file can occur for lots'o reasons.  Its is usually something on the OS side of things where the file was temporally not accessible to "stat" even though it exists and is readable.  There is a workaround in 1.1.4 for this same error message for a problem in filecache cache.

Was this error seen during an attachment upload or other?

Re: Php errors

Reply #4

The error was indeed resulting from an attachment upload.  To be completely inclusive, the site also uses the attachment resize mod.  So far I have no reliable data to troubleshoot.  It's happened to one guy a few times.  I can't replicate it (yet).  Could be a thing on his end.