PHP Fix “Warning: Cannot modify header information – headers already sent”

If you’re here, it’s probably because you are looking for answers to why you are seeing the error Warning: Cannot modify header information - headers already sent being generated from your code. There are many reasons that this can happen. Answers below…

Continue reading “PHP Fix “Warning: Cannot modify header information – headers already sent””

Why shouldn’t I use mysql_* functions in PHP?

I’ve seen this question so many times. There are many tutorials out there explaining why we should be using mysql_ functions in PHP. I remember a time in PHP, when this was the only way to interact with your MySQL databases.

Continue reading “Why shouldn’t I use mysql_* functions in PHP?”

Why Does “Notice: Undefined Variable” or “Notice: Undefined index” all of a sudden show up in my PHP Code?

It’s a beautiful day, you make it to work and all of a sudden, out of no where, see PHP Notices like Notice: Undefined Variable, Notice: Undefined index, or Notice: Undefined offset. These errors might look something like the example below:

Notice: Undefined variable: variable_name in /index.php on line 3
Notice: Undefined index: index_name in /index.php on line 3
Notice: Undefined offset: 1 in /index.php on line 3
Continue reading “Why Does “Notice: Undefined Variable” or “Notice: Undefined index” all of a sudden show up in my PHP Code?”

Tutorial – How To Change The WordPress “Read More” Anchor in Your Post

I recently had come across a challenge in this very WordPress site. I needed to change the “Read More” anchor tag in my posts so that I could leverage certain functionality I wanted to implement. The standard “Read More” anchor looks something like this <span id="more-{id}"></span>. I wanted to add some content inside of the <span> tag. Here’s how I did it.

Continue reading “Tutorial – How To Change The WordPress “Read More” Anchor in Your Post”

Tutorial – Setting Up BigCommerce Stencil Template Testing/QA Environment

I’ve been helping out some friends of mine move their existing BigCommerce Blueprint template to the BigCommerce’s new theme engine called Stencil. To ensure that I did a good job moving the theme over to Stencil, I needed to give my friends the ability to test the new theme without compromising their existing site. Hence, we need a good ole fashion QA environment, not running from my localhost on my computer. This tutorial will cover the steps I took to enable a BigCommerce Stencil theme Testing/QA environment I can share with my friends.

Continue reading “Tutorial – Setting Up BigCommerce Stencil Template Testing/QA Environment”

How Did Browser Cookies Get Their Name?

One thing software developers do very well is name things. Typically, after an engineer gets done developing a piece of software or a concept, they look around for a name. Quite literally, they look around at objects that are sitting near them and adopt that as the name for their new widget. If you’ve been developing anything recently, you will see many funny names. For example, I had no clue this actually existed, but I searched for “bananajs” and guess what!? Github hosts a project called BananaJS. You get my point? We know that there are many funny names for libraries, but I’ve always been intrigued by that text file the browser uses to store data about your session, the Browser Cookie! How did browser cookies get their name?

Continue reading “How Did Browser Cookies Get Their Name?”

Solution – Requests to /.well-known/apple-app-site-association

As I’ve been monitoring my incoming requests, I’ve noticed that there has been a huge number of requests to my website related to the page /.well-known/apple-app-site-association.

Continue reading “Solution – Requests to /.well-known/apple-app-site-association”

Solution – Mac OS 10.14 Mojave – 48)Address already in use: AH00072: make_sock: could not bind to address [::]:80

Apache stopped working for me all of a sudden when I upgraded my Mac to Mojave. I attempted to shut down all of my Apache processes running but still had no luck.

What I found was I had to disable OSX’s built-in Apache Servers:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

After doing that, I restarted and everything was working again!

sudo apachectl -k restart