We help IT Professionals succeed at work.
Get Started

Can't get rid of echos by commenting out

Richard Korts
Last Modified: 2018-10-12
I have a situation where I use fpdf to generated pdfs. In one specific case, it was generating a BLANK pdf. So I put some echos in (php) so I could start to track where it was going wrong.

As soon as I put the echos in, it worked fine.

FYI, this is NOT the first time this has happened to me (that is, putting echos in & the problem disappears).

Since I don't want the echos in the live environment, I commented them out in the php using //.

Uploaded them to the server (only 2 programs), ran test again, echos still there, process worked.

Cleared the cache (in Firefox), ran the test again, echos still show.

Since they just flash by in a split second, decided to make it live this way since it now works.

Anyone have ANY idea why this crazy business happens like this?

Here is one of the echos, commented out, in the code now:

//if ($_SESSION['form'] == "Pearland" && $_SESSION['user'] == 2) {
	//echo "got to start of switch with Pearland<br>";

Open in new window

Watch Question
Most Valuable Expert 2020
Most Valuable Expert 2018
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE