I have question. I have some app on facebook and getting this error
我有问题。我在Facebook上有一些应用程序并收到此错误
Fatal error: Uncaught OAuthException: An active access token must be used to query
information about the current user. thrown in
/home/xxx/public_html/domain/lib/base_facebook.php on line 1024
but no matter at this time.. the matter is that, is it possible to change/hide this "xxx
" name? you understand? for example, instead this I would have /public_html/domain/...
OR completely hide the path ??
但无论此时......问题是,是否可以更改/隐藏此“xxx”名称?你明白?例如,相反,我会/ public_html / domain / ...或完全隐藏路径?
thanks in advance =)
在此先感谢=)
2 个解决方案
#1
6
The recommended action would be to disable the public display of all PHP errors when you are in production mode.
建议的操作是在生产模式下禁用所有PHP错误的公开显示。
To do that, edit your php.ini
file and set display_errors
to 0
. You can still set the error_reporting
level to something suitable and all errors will be logged to the error_log
file, but the actual errors themselves are not visible to the end user.
为此,编辑php.ini文件并将display_errors设置为0.您仍然可以将error_reporting级别设置为合适的值,并将所有错误记录到error_log文件中,但实际错误本身对最终用户不可见。
Otherwise, there is no way to modify PHP's built in error messages to hide the path. Doing so would render the error message much less helpful.
否则,无法修改PHP的内置错误消息来隐藏路径。这样做会使错误消息更有帮助。
See display_errors and error_reporting PHP directives.
请参阅display_errors和error_reporting PHP指令。
EDIT: In the case of the exact error message in your question, you could handle the error (try/catch) and then display a more friendly error that helps you but also doesn't expose your path. The reason it is displaying like that is because an exception that was thrown was uncaught.
编辑:在您的问题中的确切错误消息的情况下,您可以处理错误(尝试/捕获),然后显示一个更友好的错误,可以帮助您,但也不会暴露您的路径。它显示的原因是因为抛出的异常未被捕获。
#2
2
No. If you don't want the complete debug backtrace in case of an uncaught exception, you'll need to catch it every time. There are no shortcuts here.
不。如果您不希望在未捕获的异常情况下进行完整的调试回溯,则每次都需要捕获它。这里没有捷径。
#1
6
The recommended action would be to disable the public display of all PHP errors when you are in production mode.
建议的操作是在生产模式下禁用所有PHP错误的公开显示。
To do that, edit your php.ini
file and set display_errors
to 0
. You can still set the error_reporting
level to something suitable and all errors will be logged to the error_log
file, but the actual errors themselves are not visible to the end user.
为此,编辑php.ini文件并将display_errors设置为0.您仍然可以将error_reporting级别设置为合适的值,并将所有错误记录到error_log文件中,但实际错误本身对最终用户不可见。
Otherwise, there is no way to modify PHP's built in error messages to hide the path. Doing so would render the error message much less helpful.
否则,无法修改PHP的内置错误消息来隐藏路径。这样做会使错误消息更有帮助。
See display_errors and error_reporting PHP directives.
请参阅display_errors和error_reporting PHP指令。
EDIT: In the case of the exact error message in your question, you could handle the error (try/catch) and then display a more friendly error that helps you but also doesn't expose your path. The reason it is displaying like that is because an exception that was thrown was uncaught.
编辑:在您的问题中的确切错误消息的情况下,您可以处理错误(尝试/捕获),然后显示一个更友好的错误,可以帮助您,但也不会暴露您的路径。它显示的原因是因为抛出的异常未被捕获。
#2
2
No. If you don't want the complete debug backtrace in case of an uncaught exception, you'll need to catch it every time. There are no shortcuts here.
不。如果您不希望在未捕获的异常情况下进行完整的调试回溯,则每次都需要捕获它。这里没有捷径。