Justfindit.se Magazine

    About      Contact      Give us a tip    
    TV Media Journalism      Internet      The World      Cities      Travel      Reportage      Lifestyle      Technology      Science      Cocktails & Wine      Economy/Business      Books      Websites      Interview      True story    
 
Written by: IT Team on March 5, 2022.

Determined debugging

Determined debugging. We will reveal two details that obviously can cause some problems in different situations now when PHP is changed from PHP 7.4 to PHP 8.0.

Working with websites requires full attention whole time. It is not like before when web designers and web developers created static html websites. Working with PHP is a turbulent world.


Just the change from PHP 7.4 to PHP 8.0 or newer generated many problems. We have not discovered all problem sources and we have not searched for some detailed information but we have followed a company in their work.


Why did we do that and what is a determined debugging? Our goal was to actually understand what is going on. Why does e.g. a WordPress site stop working? Why our database connection stops working?


We will reveal two details that obviously cause the problems in this specific situation.



Strict mode and Execute in database


Strict mode - Inserting to and updating a database table requires values in all fields. It is not allowed to have empty variables when doing this. Also, using the implode function was not possible with an empty string. During the debugging process we discovered that problem was solved when we disabled this imploding.


Determined debugging. No more cell names in execute(). Now it should be used just like this: $result->execute();


The Execute function in database is another detail. Before it was possible to use it with variables connected to the cell names in database tables. Now it should be used just like this: $result->execute();


But how is it possible to discover all those details without some concrete error messages? Well, the most important thing is to understand the script flow in the files. Then it is possible to decide where and how to put some points for determining the place where the problem source is. If we do this properly then we can reach our goal relatively fast.


The company we joined in this debugging process is Begacom IT Business and their experience was fascinating. They did this both in tailor made scripts and in WordPress plugins. We can just say: Well done!





Back to the to previous page


  ® All Rights reserved Justfindit.se Magazine 2014.