3
I’m starting development in PHP, and I’ve already started to have some incompatibilities in my codes. I say as a matter of something working locally and when I upload to the server, something goes wrong.
On the server, the PHP version is:
PHP Version 5.2.17
Locally, the PHP version is:
PHP Version 5.5.7
I would like to know the best recommendations to avoid code incompatibilities when running locally and when running on the server, apart from the php version, because I know that it is essential to have the same version on both. Required settings of php.ini and etc.
A problem that I came across lately gave me a lot of headache (I found that it was simple after asking a question here on the forum and find out what caused the error), simply mine PHP
location did not generate error when a function header();
was called after some code html
, or the file was configured with encoding UTF8 com BOM
.
Even the error_reporting = E_ALL
being enabled in this way (I don’t know if it has anything to do with this type of error), the error was not shown. So what I want to know are the necessary settings that will leave the local server as "close" as possible to a dedicated server.