I’m not a coder. I have done some coding back in the day when I had a Commodore 128 but all I was doing was typing the code from a book. I have also done some simple coding in high school and in University. It was many years ago and I was using Pascal and HTML but I wouldn’t consider myself being a coder. Don’t get me wrong, there is nothing wrong with being a coder and if I had the time, I would actually love to spend time coding and building software tools.

Our company have been outsourcing most of our web and application development using freelancers and agencies. You can read more about sites I use to hire freelancers or agencies in this article: TOP WEBSITES TO HIRE FREELANCERS OR EMPLOYEES

Since the start of my first business, I had to learn how to troubleshoot and debug code to support the website applications. When it comes to troubleshooting the issue, you don’t need to be a coder. You just need to be persistent and systematically figure out how to fix the problem. In my experience, it does come down to simply doing some Google research and finding the answers online. To be honest, there is always going to be a solution to a coding issue (bug) and it just depends how hard you look for the answer. I have always believed any problem can be solved and it all comes down to how much money or time one is willing to spend to solve the problem.

Today, I had to debug some code because our SMS solution called SMSme for the company Advertise Me wasn’t working. The system was built using PHP and MySQL years ago. When I tried logging into the dashboard it wouldn’t work. So the first debugging step is to check the system logs and see if there were any errors. The log looked clean and nothing was being reported. I decided to enable error reporting on the main page. To do this I added the below system:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

I added the above code to the PHP page called index.php

Debugging Code as a Non Coder Display PHP errors The Simple Entrepreneur Marco Tran

I used a tool called Notepad++ to edit the PHP code. It is one of the many tools I use on my computer and it’s on the list of My Must Install Windows Software List.

The PHP code is actually stored on a Virtual Private Server and the website application is hosted on the cloud. To change the code on the server, you need to transfer the files or edit the files directly. I use a tool called FileZilla to transfer the files via FTP. You can also find this tool on the same list I provided earlier.

Once I made the changes to display all the errors, I loaded the website again and it started displaying error messages:

Debugging Code as a Non Coder The Simple Entrepreneur Marco Tran

With these errors, you can then further debug the issues and narrow down the problem. After some debugging, I worked out the problem was in the syntax of the MySQL connection. The server that was running the website application was recently upgraded to the latest versions of PHP v7.4 and the code was deprecated (meaning it no longer supported). You can work out how to replace some of the code by simply figuring out the syntax which no longer works and replace it with a supported code.

Since I knew that the issue was related to the PHP version on the server, I simply moved the application to another server that had the older version of PHP v5.6. It was much easier to do this than to go through all the code and replace the deprecated syntax. Now, this is probably not the best approach because the PHP v5.6 is old, not secure and is no longer supported but I needed a quick fix since I had to send out the SMS messages. We do intend to have the website application rewritten and updated to the latest standards.

There are websites such as stackoverflow that allows you to submit your questions and experts will try to answer them so if you get stuck try this website. However, I found that some people on there are pretty ruthless and don’t like newbies – so be careful when asking the question. Make sure the question is detailed and is in the correct format.

Do you have any debugging tips you can share with non coders?

If this article helped you in any way and you want to show your appreciation, I am more than happy to receive donations through PayPal. This will help me maintain and improve this website so I can help more people out there. Thank you for your help.

blank

HELP OTHERS AND SHARE THIS ARTICLE


69Shares

LEAVE A COMMENT


Subscribe to my newsletter where I will share my journey in affiliate marketing, business, technology, fitness and life in general. Hopefully, this motivates you to also change your journey in life.

close

Subscribe to my newsletter where I will share my journey in affiliate marketing, business, technology, fitness and life in general. Hopefully, this motivates you to also change your journey in life.