CodeIgniter Forums
Interview Question - - Printable Version

+- CodeIgniter Forums (
+-- Forum: General (
+--- Forum: Lounge (
+--- Thread: Interview Question - (/showthread.php?tid=72568)

Interview Question - - pseudocoder - 01-06-2019


what are the main interview questions related to CodeIgniter ?

Recently, I was asked this question - " How do you know if your codeigniter app crashed, though client / user did not inform you about  ? "

I could not answer this much, but curious to know, is there any inbuilt system for this ? or any ideas to make such a system ?

RE: Interview Question - - ciadmin - 01-06-2019

A forum search for "interview" would have revealed:

... and possibly more. Some of these have replies too.
Always wise to search the forums before asking a question!

RE: Interview Question - - Pertti - 01-07-2019

A bit background, because PHP works slightly different from lets say Java or NodeJS, app itself does not crash. If one request fails, and another request is made to the server, PHP script is executed in fresh state, and most likely will keep meaningful results, and only part of the app fails.

So it's true that most of the time you might not even know some parts of app are not working.

CodeIgniter has built in error logging, that can help log any PHP errors, even if your app is gracefully failing (instead of showing raw PHP error message, it displays nice designed error messages).

Check for documentation on logging based on CodeIgniter version, pretty sure there are differences between 3 and 4.

I have not checked v4, but in v3 by default only very final breaking script file name and line number are written in the log file. I found it a bit unhelpful, so in the end I wrote my own extension to also includes stack trace to error log file.

Hope that helps.