Friday, 9 August 2019

PHP application behaving differently in production environment without a code change

We have a set of applications built using PHP(5.6), MySQL and Apache. These applications are hosted on the same server, they serve different purposes and communicates with each other. Some of these applications are written in Codeigniter and some in custom PHP. The applications are legacy and used by the client for more than 10 years. They are having a test server and production server with the same configurations. Recently they started reporting some issues in one of the applications, all having the same behavior. The issues look like

  • Missing labels near input fields, the label text is fetched from the database.
  • Some variables wrongly printed on some dynamically generated reports, but not such implementations in code.
  • Buttons become invisible.

We started replicating these issues in test server with production database replica but none are reproducible and the codebase is the same in both the environments. A production level debugging also happened from our side to make sure that the code and data are correct, but everything seems to be ok. We have checked with the client if they have made any changes in the server configuration level and they said recently FastCGI was installed in Apache for the Production environment but not in the Test environment. I have checked the SVN for PHP files belonging to these errors but these files are not modified in recent times and all these functionalities were working normally before. I am really not sure if the introduction of FastCGI is causing all these problems, but all your suggestions and thoughts will really be appreciated. Thanks

Edit: I have directly modified the production code by removing an unnecessary space to resolve the first issue and it started working , I reverted the same and it is still working. I have now installed FastCGI in test server but it to behave like production, it will take some time because FastCGI involves caching. All these issues are related with UI, when echoing something.



from PHP application behaving differently in production environment without a code change

No comments:

Post a Comment