6/24/2023 0 Comments FormreturnIt's important to recognize that a syntax error or parse error happens during the compile or parsing step, which means that PHP will bail before it's even had a chance to execute any of your code. If you have access to php.ini, you can find it under the error_log entry. In shared hosting, it may be in a dedicated folder or on the same folder as the offending script. It fails at compile time, meaning that it'll use the values in php.ini, which if you hadn't changed, may not allow the display of errors. With syntax errors, the script doesn't even get to runtime. That means that the script hadn't even run! That usually happens when you have a syntax error! These two lines will do the same effect as altering the php.ini entries as above! Awesome! I still get a blank page/500 error! In the desired script, we can alter the php.ini entries in runtime! Meaning, it'll run when the script runs! Sweet! error_reporting(E_ALL) But fear not! We have other options! Runtime configuration Usually shared hosts do not allow the alteration of their php.ini file, and so, that option is sadly unavailable. Check! Whoa whoa! No check! I can't change my php.ini! When in doubt, set it to E_ALL to display all the errors. Check!Įrror_reporting (as of PHP 5.3) is set by default to E_ALL
0 Comments
Leave a Reply. |