Hi folks,
i am fedup. i spent hours to get the errors to display in the server. no lunck. i am on a shared hosting space. below script only shows internal server error when run. but no extra info shown in either chrome > inspect nor in error_log in the file manager in same folder. i need to trouble shoot a large script. but its painfull without error detail.
in above simple script, it has a missing double quote. but it only shows internal server error. where can find the error detail stating about the missing quote ?
a search for php-error.log which suppose to be created in above script either does not show any such file in cpanel file manager.
Parse errors are quite difficult to throw error messages for. PHP canât easily tell whether your typo there is to not close the quotes on the end of your echo statement, or that you intended to include the closing-PHP tag in your display (because perhaps your site is showing how to program PHP), and in that case the error is that you have no closing-PHP tag.
Once you have multiple levels of opening and closing curly-braces and program logic, itâll get worse, so itâs a good idea to get into good habits, and use an editor that supports syntax-colouring to help you out. You can see in your original post that the code display leaves the closing tag in red, when it should really be black at that point, and a decent editor (I use Notepad++) would do similar. Theyâre not perfect, but they help.
That will try to write to the /tmp folder at the root, so if itâs shared hosting you may not have access to that folder. Try ââŚ/php-error.logâ instead and see if the file is written in your home folder.
If not, Iâd suggest asking your hosting company. The error should be written to a log somewhere but itâs difficult to say where.
but this files is not created. i even did a search for this file in file manager with search all files option. its not found. that mean this file php-error.log not created after the error.
I think you do not have your PHP environment set for maximum error reporting otherwise there would have been an error or warning about the php_error.log not being created.