Why does my fireplace shoot flames out the front until I open my backdoor? I have a natural gas fireplace with fake logs in it. I open the flue, turn on the gas for a couple seconds, and throw a match in. The flames kind of go up and out of the flue, but most of the flames go out of the fireplace, towards the front (almost burning the wall).
Then, when I open my backdoor, something "equalizes" and the flames start going perfectly straight up and out of the flue.
The flue connects to a chimney that goes up about two stories.
To give some context, I live in Texas where there's pretty high humidity, and right now the outside temperature is about 40 degrees F, and the inside temperature is about 75 degrees F.
EDIT
Thank you for all the helpful answers. I just want to clarify, once I open the backdoor one time, the flames go up the flue and through the chimney like they're supposed to and stay that way, even if I close the door again. The flames only come out of the front of the fireplace until I open and shut the door one time, and then everything works like it's supposed to.
 A: You need a "draft".  When you light the fireplace, initially the heated combustion products want to rise directly up the chimney, but after that occurs for a few seconds it results in a partial vacuum in the house, attempting to suck air back down the chimney.  This cause the fire to be blown/pulled outwards into the room.  (With a conventional wood-burning fireplace massive amounts of smoke may billow into the room.)
When you open the door (a window near the fireplace is better) the vacuum is eliminated and the heated combustion products can rise.
(There are a number of other subtleties to fireplaces.  For instance, a good design of a conventional fireplace has a constricted "throat" at the top of the firebox and a ledge above that.  This allows a natural circulation to occur in the chimney, with cold air coming down and mixing with the hot at the ledge.)
A: There seems to be a slightly lowered pressure inside the room the fireplace is in, which leads to air actually streaming down the chimney to equalize it, and this blows the flames into the room. When you open the door, you allow air draught to stream into the room and up the chimney, as it is supposed to, and that sucks the flames into the chimney. 
Chimneys, as I understand it, suck air up because of the buildup of pressure difference due to temperature and height difference, but this difference in pressure is pretty small, and can be messed up. For example, there are sometimes holes in the middle of house chimneys where you would stick a burning newspaper in to create an initial draft when lighting a fire. 
I am at a loss what might cause the lower pressure, though - perhaps there is a ventilation system in place which causes this, or the room is cooler than its surroundings? 
A: There's two possibilities that are immediately obvious. 
The first is that the pressure inside the house is slightly lower than the pressure outside the house before you light the fireplace. This would cause air to flow down the chimney into the house which would keep push the flame into the house instead of up the chimney. This would be easily testable if you could get a free-swinging door. If you opened it inward slightly, it would swing open as air rushed into the house to equalize the pressure. Since the door doesn't swing freely, it might be possible to feel the effect by opening the door slightly and feeling for a breeze coming into the house through the opening. If you get something like a sheet of paper and hold it, it would blow into the house (note -- since the house is warmer than the outside, if the pressure were exactly equal inside and out, one would expect the breeze to move outward -- pulling the paper towards the door -- because the temperature gradient would cause the air to flow outward). 
The second, related, possibility is that your house is really well sealed up and so the air moving up the chimney creates a low pressure zone in the house, pulling the flame back in. For the chimney to work correctly, there has to be some airflow. The flame will create some air moving up the chimney which will create a suction within the room/house. If your house is really well sealed, there's no air to replace the air being sucked up and out. When this happens, the pressure will equalize by pulling air down the chimney and pushing the flame into the house. 
You could always crack a window in the room to get enough replacement air for the flame to stay within the fireplace. This will cool the air in the house down slightly, which may seem to be the opposite of what you want. But fireplaces actually primarily warm the room/people through radiation and not through heating the air. This is why campfires outdoors can still warm you up even though it's very cold. 
 Safety Warning! 
Aside from possibly burning the mantle outside the fireplace, a poorly circulating fireplace can be dangerous. The combustion of methane (natural gas) may not be complete and could result in carbon monoxide products. If you do not have sufficient airflow to pull those products up the chimney and out of the house, they could build up within the house itself. Since carbon monoxide is lighter than air, it could build up on the upper floors of the house. Hopefully you have a carbon monoxide detector, but I would be very cautious about running your fireplace without proper air circulation.
A: You're not getting enough Make-Up Air. I strongly encourage you to install a CO detector in you home and reassess your HVAC situation (especially the 'V' part, ventilation). Lack of sufficient makeup-air in a house with gas fired equipment is dangerous. This is usually more of a problem with new-construction homes that are built to be nearly hermetic.


Make-up air replaces large volumes of air that are removed from homes by exhaust systems in order to maintain balanced air pressure and a healthy indoor environment. When the air is not replaced, excessive depressurization occurs, meaning the air pressure outside the home is greater than the air pressure inside. This unbalance can interfere with the proper operation of combustion equipment (i.e. water heaters), resulting in potential backdraft. It also can limit the operation of range hoods and exhaust systems by preventing the proper capture and exhaust of smoke, moisture and odors, resulting in poor indoor air quality. - nutone.com

A: This is a typical problem when starting up a fireplace, wood stove, or what-have-you. The air pressure inside your house at 75 degrees is lower than the outside air pressure at 40 degrees because warm air is less dense than cold air. Result? The higher-pressure air outside the house wants to flow down the chimney and into the lower-pressure area inside your house, with the result that the flames and smoke vent into the room rather than going up the chimney because the air is flowing down the chimney and into the room. The solution is simple: before lighting your fireplace/wood stove/whatever, open a nearby window or door. It doesn't have to be open much, maybe an inch or two - just enough to allow the pressure inside the house to equalize with the pressure outside the house. When I'm lighting our woodstove I build the fire, get everything set, then walk over to the door, open it about an inch (yep, even when it's -23 out :-), light a match, and fire 'er up! You only have to keep the door open a short while - I find that after about 30 seconds I can close the door again with no danger of the smoke being blown out into the room. I expect this will work fine for you too.
Share and enjoy.
A: To understand what's happening here, let's start with understanding what a fireplace is: A fireplace is a heat engine that does work by sucking the air from your room and ejecting it as hot fumes via the flue. Your backdoor serves as a kind of throttle.
What happens when you fire it up for the first time: the air in the flue forms a "cold plug". It's not very cold, as the air is at room temperature and it's not a real plug - but it's way colder than the hot fumes should be and it doesn't float up as they do. From the point of view of your heat engine - it's a plugged exhaust. So the flames have nowhere to go but your room (probably, you have another form of ventilation that serves as a flue for the moment). The engine is seized, too weak to pull more air in through the closed door and too weak to push the plug out.
So what happens when you open the door once? With inflow air unrestricted, the engine finally has enough power to push the cold air through the chimney and the machinery (that is: hot fumes flowing up the flue) cranks up to full speed.
When you close the door now, it won't change much: the obstruction is cleared: the flue is hot and the engine is revving: It has enough power to suck enough air through the closed door.
