Stupid Mistake

Every once in a while, we make mistakes.  It can happen to anyone of us. Hearts may break because of one’s stupid mistake.

This is the story of one of my stupidest mistakes. EVER.

I was bored one Saturday  so I thought of doing some weekend fun. My idea was to code my personal web project which uses WP as its backend.

<sarcasm> Yay! So fun! </sarcasm>

So I was doing my thing, coding, making things and then FTP-ing the shit into the server.

Suddenly, I encountered:

PHP Fatal error: Call to undefined function get_header()

Looks scary right? How can that function be gone when I’m just living my life inside a WP theme. I did not touch the core files.

After some investigation, I found the culprit. (Oh yeah FBI-ish)

Man, I thought I did some programming error but boy oh boy, it turned out to be just something STUPID.

I UPLOADED MY THEME’S index.php TO THE ROOT OF THE SITE.

So yeah. It was a stupid mistake. Now I’m assuming you have a local copy of your root’s index.php so just delete the (wrong) index.php that you uploaded and upload the right thing.

So what happened? Well, basically  the index.php of WP which loads the wp-blog-header.php (which loads the templates and all the necessary shit) was overwritten.

Things I learned:

  1. When FTP-ing, make sure you’re on the right PATH. (check your destination)
  2. Don’t watch The Voice of the Philippines while coding.

With that, I will leave you a very fitting video!

I can’t take my heart will break
‘Cause I made a stupid mistake

HAHAHAHAHAHA!

Happy coding!

KOBE NEEDED FRIENDS

<!DOCTYPE html>

<html>

<head>
<title>My Rant</title>
</head>

<body>
asd sdgjds;lgj s’dgkd’skdflahtgopieuptqm,smfdsgjagdsojgpsjhpfjhpjd

agdspjgs[dpjh[djh[jd[hjd

dsj;sfjhfdjhfdjhl;dfjh;dfjhpoyiewptoydjs;gmd;mgf;hj\;hojodpsjgsdkhgsdg

sojgpdsjgpfdjhpdjfhpdfjhpjdfphjdfpjhpdfjhpjfhpdjhpdfjhdfjhpfdjhpjfdphjdfpjhpdfjhpdjhpdjhpdjhpdjhpdjhpfjhpdfjhpdjh dpsgj f hg[p jfhg[p [pjfdh pjd dfhjfdhjdf[hpsjpoiuwpqoi][q[]xocjks;vm dfgj ;djg

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
</body>

</html>

My FB Like Button Issue

So I’ve been dealing with Facebook’s like button error for a while. FB offers an easy way of putting a Like button in your WordPress theme by using a configurator which will give you codes once you input some needed info. I got it from here https://developers.facebook.com/docs/reference/plugins/like/ and I thought I just messed up some codes because when I click the button, it gives me this error:

“Sorry, this post contains a suspicious URL: Unknown error”.

Upon doing some checks I got it all sorted out. Ugh.

By default ec2 gives a public DNS something like ec2-x-x-x-x.us-west-2.compute.amazonaws.com and Facebook treats it as a suspicious URL.Well, of course it does look suspicious. Look how long the URL is.

I tried other “valid” URLs and they worked.

Stupid me.