Postingan

Menampilkan postingan dengan label installation

How to Fix the Typical "My PHP Script Does Not Work" Problem

Gambar
A PHP script that "does not work" because of an error will emit error messages such as "use of undefined variable", "an error in MySQL query", "permission denied", "parse error", etc. If you do not see an error when you should, it could mean that PHP is configured to suppress errors; a common practice in production environments. Developers who use AMP stacks unknowingly have PHP setup this way, and when they run into "does not work" problems and see no errors, they start asking silly questions. The environment in which you develop code must be setup differently. Here is what you need to do in order to make PHP more verbose about errors. display_errors = On The most common reason for not seeing an error is that that the display_errors » setting is off. Set its value to on so that the PHP displays the errors as part of the output. error_reporting = E_ALL | E_STRICT The error_reporting » setting determines t...