fbpx
Tech-Fit Technologies - WP Errors
How to Fix Warning: Cannot modify header information – headers already sent Error Message in WordPress

After transferring my WordPress site to a new server, I received this error when trying to log in to the WP-Admin panel

Warning: Cannot modify header information – headers already sent by (output started at /home/nnnick/public_html/nickroshon.com/wp-content/plugins/wp-security-scan/scanner.php:63) in /home/nnnick/public_html/nickroshon.com/wp-includes/pluggable.php on line 890

I had no idea what that means, but without being able to log in to the Admin panel it was a little hard to get rid of it. At first I thought about just going in and deleting the plug-in referenced above and seeing if that would work (it did work, although there were many other plugins that were also causing this error, as well as the theme itself, which I didn’t want to delete!). Given I didn’t want to delete all of my plugins as well as the theme itself, I began exploring other options.

Upon doing a Google search for this error, I found many helpful articles, but none that were quite helpful enough – they give tips, but some of the details were a bit fuzzy. This post on WPContempo, as well as these two posts on the WordPress.org forums (1) and (2) were helpful, and explained that:

You likely have an extra white-space or line at the beginning or end of your WP-Config file. Open your WP-Config file and delete an extra white-space at the beginning or end of the file, then delete it.

That is mostly correct, but a little unclear and didn’t totally fix my problem. Here is the dumbed down explanation.

  1. You probably do have extra lines at the beginning or end of a file, although it isn’t necessarily your WP-Config file. If your error message looks like mine above, it is in a specific file related to a plugin, theme, or another add-on to your WordPress install, although it’s possible your WP-Config file also has extra white space too. During the transfer of your site, some of your files (for whatever unknown reason) grew a few mysterious empty lines at the beginning or end, which screws everything up…  
  1. To find the files with the extra lines, look at the error message itself, as it will tell you exactly which file is causing the issue. At the example at the top of this post, “Warning: Cannot modify header information – headers already sent by (output started at /home/whatwhat/public_html/mydomain.com/wp-content/plugins/wp-security-scan/scanner.php:63) in /home/whatwhat/public_html/mydomain.com/wp-includes/pluggable.php on line 89″ the part bolded is the cause of your problem. It is telling you the Scanner.php file has an extra space on line 63, which happened to be the last line of the file (and sure enough, it was blank).
  2. To fix it, either connect to your site via FTP, or through the File Manager in your cPanel (note: connecting via FTP is better as the cPanel may add extra lines itself, although I had no problem doing this through the cPanel myself). Within either your FTP or cPanel File Manager, navigate to the location of the file causing the problem (public_html/mydomain.com/wp-content/plugins/wp-security-scan/) in this example, and then open the file name referenced (scanner.php). Look for the line number after the colon, again in this example line 63. Remove the extra lines starting at that line number, and then save the file and close it.
  3. Try reloading your WP-Admin page. Chances are you’ll see the same error message again, only a new file is causing the problem…repeat steps 2-3, looking for that exact file and line number and removing spaces. With one of my rather customized blogs I had to do this probably 10 times before I could get rid of all the error messages, but eventually, I had corrected all of them, and am now able to log in to my WP-Admin just fine!

And that’s it – I hope this was helpful to others out there that may have had some problems like me. It is definitely something you can figure out, even if you’re not an expert programmer – you just need a little patience as it is a tedious process of hunting for extra spaces and lines.

Hard work always wins

There’s a saying that goes, “the man on top of the mountain did not fall there” I don’t know whoever wrote it but that man knew something about hard work. The man you see on top of the mountain worked hard to get to climb the mountain.

In life I’ve learnt one very important thing, hard work pays. In this post I’ll give examples of actual people I have come across in life, some I would know personally and some I don’t but they all have that thing in common.

So I have noticed there are 4 kinds of people, the wise, the hard-working, the talented and the lazy. In this week’s post I’ll discuss just 2 of those 4. If you wonder which one you are you may try and categorize yourself as you read this. 

The lazy man

The lazy man is that one you always find complaining, always wants things to be done for them and resting is one of his main priority in life. Yes people are born in poor homes, yes people grow up suffering, yes people don’t get equal opportunities in starting off their lives but the lazy man is the one who rides o;  that, doesn’t do anything about it. 

I’ll give illustrations of the lazy man, in a school or class setting, when there’s a topic you have been given in the exam room and almost everyone gets average marks because you didn’t understand it in class, the lazy man is ready to complain, is ready to tear the teacher or lecturer apart because he gave them something they didn’t learn, but how does that help him? In no way, so all the lazy man does will be complain about that teacher and when the topic comes again in the final exam guess what happens, the lazy man fails it again, surprise surprise.We ought not to be the lazy man.

Giving another illustration of the lazy man, we are not all talented equally and we don’t all have smart minds that catch concepts easily, we weren’t all always given an opportunity to be in class or to go to school but the lazy man will wait for life to happen that way because, in their minds, that’s how it is given to them, no try and do something about your situation and don’t be like the lazy man.

The natural or the talented man

This is one man I am in my own aspect and regard but as we all know, we all have a talent given to us by the almighty but sheer practice almost always beats raw talent. 

It’s never too late to change where you stand right now, academia may not be your forte, focus on yours, play the soccer even more, practice more, play that musical instrument even more, train that vocal cord even more, study the art of coaching, lift those weights, practice those hooks and uppercuts if boxing is what you love but don’t just wait for things to happen, just start doing today.

Find your plug and stay connected

I was speaking to Neo Kuaho the other day, director of YDIDI, and it was a conversation that just started when I asked how he was doing and how his weekend was, we did a bit of catching up then he told me he’d been busy since Friday doing talks and motivational speeches here and there so I told him it’s something that I actually want to do and he said, “Just start my brother, you will see this as you go, just start.”

While that got me excited he pulled a video from the internet that talks about the science behind speaking and motivating, I haven’t watched it yet, I definitely will, but I just passed a comment and said, “so this is your thing right?” And he said he’s always feeding himself with either motivation or the Word.

He went on to speak on how important it is for us to stay connected to our spirituality, whatever religion we may fall under, we must stay plugged in. Then he gave an example of the smartphone, when you charge it on a laptop or power bank, yes it may charge but not as much/fast as it may when you plug it into the main source of power. He spoke about the immensity of the power that is locked within a human, power that even science fails to explain, how against gravity a human can levitate. 

Again giving an example of a smartphone that today, it has over a thousand times more computational power than the computational power that was used to send the first man to the moon, but what do we use it for? Send messages and receive calls. That’s the same example he gave for us humans that the power within us, within our spirits, minds and bodies is far above what we have explored, I also share in my previous post. This can be unlocked if we stay connected to our spiritual life.

My take home.

This resonated with me as a Christian, Jesus in John 15 v 7-8 says “If you abide in me and my words abide in you, you will ask what you desire, and it shall be done for you. (Verse 8) By this My Father is glorified, that you bear much fruit; so will be My disciples.” Our (Christians) source of being is Jesus and even as we stay plugged in to Him, to His word and to the Holy Spirit, heaven knows what power we can unlock that is working within us, Ephesians 1 vs 19 and what is the exceeding greatness of His power toward us who believe, according to the working of His mighty power.

We must stay plugged in.

First step to problem solving

First step to solving a problem, which is the most important step and is usually overlooked, is problem identification. This my sound like a simple thing but when facing a challenge it usually not easy to stop and think, “What could be the actual cause of the problem?” For instance, you’re driving your car into your garage and you notice a flat tyre, first instinct is to change it, right? You go ahead and you change it and as you’re reversing you feel your tyre puncture again, this time you realize you haven’t solved the problem because you haven’t truly identified it, and so unless you first find out what caused the flat tyre, all your attempts may be futile, you notice a nail or sharp object lying around.

Removing might be a quick fix too but knowing how it got there might be the actual problem, kids might have been playing with it and the likes, unless you get to that root, you’ll change tyres till you die, ok that’s an exaggeration but you get the picture. This step goes to almost if not every problem you may face, first identify it.

Today I was trying to upload a big file to a server and that’s not supposed to be a huge task, 500mb max and I was doing so via the cpanel and it kept cancelling midway, I tried different methods of uploading the file, used an ftp client and it kept stopping midway as well so this tussle went on for about 3 hours straight trying to figure why the ftp client is stopping midway and why the cpanel won’t continue but I kept at it, at times thinking it was probably my internet connection that wasn’t fast enough, but the speed shouldn’t be an issue for an FTP client.

3 hours later and 6 GB of data wasted I later on decided to check how much space is left on the server only to discover only 100MB are left and here I was trying to fit 500MB of a zip file into it, to think I hadn’t bothered to check the server log files and after I did they show that there wasn’t enough space for my file. I was basically trying to fit an elephant in a puppy’s kennel, lesson learnt the hard way.

Problem identification goes for every kind of challenge or problem, for a person tries to commit suicide for example, stopping them might be a good idea but once they’re alone again they might try and do it again, getting to the root of why they tried to do so and fixing that first would be the first step. Problems can be social issues, offices politics, technical issues such as a bug in your code, a certain ailment or sickness, the list can go on, problem identification is still important.

Most of the time what we end up facing is the effect or the result of the problem and we usually try and solve that. How important this first step is, we must take a moment to think, “What is the actual cause of this problem” before we wake up and realize how much money, time, resources and effort we have wasted we should take time to think or investigate until we can truly identify what the actual problem that caused the effect that you now eventually feel.

A person is defined by what they do

There’s nothing that beats habit and practice. You can’t say you want to be a strong weightlifting champion like Schwarzenegger and you spend your days on end doing anything but exercising, it won’t happen. Best thing to do is to get up and start doing instead of just talking, do it. Just go for it! If you’re willing to change, saying you will change won’t actually make you change, doing the things that will change you will bring about that change.

I remember one time in high school I was always an average chess player because I used to play it sometimes, I decided I wanted to improve and from that time I started spending a minimum of 3 hours everyday for a period of about 3 months playing and practicing with some players who were way better than me and after a few months I ended up managing to beat one of the best, who had been the best chess players in the country, I remember we played 2 games and he won the first, I won the second, I never played him again because I want to keep it at that for the rest of my life that the number 1 in the country drew 1-1 with me so I can say I’m number one material. The point is if I had never practiced I would have stayed the losing guy but because I did I managed to improve.

So what are you waiting for? Get up, less saying and more doing.

Don't wait. Just go for it - idea.
Act now on your idea!!

Whenever you get an idea you need to act on it as soon as possible. Waiting will not yield any results. From the minute you get it and you think you’re onto something, that’s the time you’re supposed to act. One thing we have to realize is that when humans were created they were made into thinking beings, so to anyone on the face of the planet, ideas are bound to come. The one difference between those who succeed and those who don’t is how soon they decide to act on their ideas.

The great inventors of old began working on their ideas early, even when it wasn’t fully mature. For example, the Wright brothers Orville and Wilbur, made the aeroplane because the idea of a flying machine was in their head, though it wasn’t fully formed, the fact that they started working on it is the reason why we have the Boeing 707 and the Blackbird (fastest plane ) today, who knows the world could be depending on that idea you’re sitting on. Interestingly the Blackbird SR-71 is still the fastest plane ever made since the 1950s, before the computing power we currently have today. Goes to show the depths a human mind can go.

How we started

In starting this company, Tech-Fit Technologies, we were fresh out of University with little to no industry experience bar the 1 year attained during our internships and me (Sindiso) and a friend of mine (Busa) decided, we didn’t have to be sitting around and waiting for jobs to come when we had combined knowledge of electronic engineering and computer science in our heads and we decided to start a company. We definitely knew something about programming, software development, networking and web development, though it wasn’t the deepest knowledge in it but we knew, we had an idea and that was in 2016.

Fast forward 3 years later, 2019 and we a fully functioning company with primary focus on Web development, digital marketing and company branding, we make elegant and professional websites now and have helped a lot of companies gain customers, establish their brands and make a lot of money. The likes of Mashonisa Loans, Silk Beauty Salon, McGeralds and many more but if we hadn’t started back then in 2016 who knows where it may have been.

Great examples

I can give more examples, from the likes of Mark Zuckerberg who knew he had a great idea (debatable) but in the creation of facebook he was certain he was onto something that’s why he didn’t wait until finishing varsity, he started executing it right there and here we are today with Facebook. Steve jobs wanted a smaller computer, he went on and started working on it. Bill Gates was studying law yet he had interest in the computing industry, he didn’t wait, he just went for it. The list can go on and on and to the likes of Amancio Ortega (founder of Zara), Warren Baffet, Jeff Bezos they all those billionnairs had an idea, though not fully formed they worked on it.

I could have given more examples but the idea is this, everything you see on this earth started with an idea. It is safe to say the world is made up of ideas but ideas are nothing if you don’t put work to them. Nike says “Just do it”, Dan Pena says it in a harsher way but you could be sitting on the next solution to change the world, next billion dollar idea but you wouldn’t know unless you take asction . Don’t hesitate, work on it. That’s why we at Tech-Fit Technologies say – Don’t wait, just go for it.



Terms & Conditions

WhatsApp chat