[SOLVED] Â How to catch fatal error before that happened? |
8/9/2020 5:14:36 PM |
PHPRunner General questions | |
![]() Hello everybody trigger_error( $message, E_USER_ERROR );
|
|
M
|
MikeT 8/9/2020 |
Maybe write some custom code in AfterAppInit() that checks if the db is online and aborts if not(?). |
![]() |
Myr0n author 8/10/2020 |
Maybe write some custom code in AfterAppInit() that checks if the db is online and aborts if not(?).
|
![]() |
Admin 8/10/2020 |
Database connection may happen before any other event so adding code to events may not help. However, if you create a new Server Database Connection on Output Directory screen in PHPRunner and check your database connection there - it may help. |
![]() |
Myr0n author 8/10/2020 |
Database connection may happen before any other event so adding code to events may not help. However, if you create a new Server Database Connection on Output Directory screen in PHPRunner and check your database connection there - it may help. Also, this error happens on the web server. Any IT guy, who would say that "the problem is your tablet or laptop wifi" is incompetent.
|
![]() |
Admin 8/10/2020 |
I'm glad we are on the same page. |
![]() |
Myr0n author 8/11/2020 |
I'm glad we are on the same page. I'm not talking about creating any files. Proceed to "Output Directory" screen in PHPRunner, create a new Server Database Connection and then in that code check the connection and display an error message if there is no connection. https://xlinesoft.co...ry_settings.htm
$connectTEST = mysqli_connect($host, $user, $pwd, $sys_dbname);
|
![]() |
Myr0n author 8/11/2020 |
This is a better way to do it: //
|