Question: I have this metric:
$$ds^2=-dt^2+e^tdx^2$$
and I want to find the equation of motion (of x). for that i thought I have two options:

1. using E.L. with the Lagrangian: $L=-\dot t ^2+e^t\dot x ^2 $.
2. using the fact that for a photon $ds^2=0$ to get: $0=-dt^2+e^tdx^2$ and then: 
$dt=\pm e^{t/2} dx$.

The problem is that (1) gives me $x=ae^{-t}+b$ and (2) gives me $x=ae^{-t/2} +b$.

Answer: 
If your solution is not a null geodesic then it is wrong for a massless particle.

The reason you go astray is that Lagrangian you give in (1) is incorrect for massless particles. The general action for a particle (massive or massless) is:

$$ S = -\frac{1}{2} \int \mathrm{d}\xi\ \left( \sigma(\xi) \left(\frac{\mathrm{d}X}{\mathrm{d}\xi}\right)^2 + \frac{m^2}{\sigma(\xi)}\right), $$

where $\xi$ is an arbitrary worldline parameter and $\sigma(\xi)$ an auxiliary variable that must be eliminated by its equation of motion. Also note the notation

$$ \left(\frac{\mathrm{d}X}{\mathrm{d}\xi}\right)^2\equiv \pm g\_{\mu\nu} \frac{\mathrm{d}X^\mu}{\mathrm{d}\xi}\frac{\mathrm{d}X^\nu}{\mathrm{d}\xi}, $$

modulo your metric sign convention (I haven't checked which one is right for your convention). Check that for $m\neq 0$ this action reduces to the usual action for a massive particle. For the massless case however, you get

$$ S = -\frac{1}{2} \int \mathrm{d}\xi\ \sigma(\xi) \left(\frac{\mathrm{d}X}{\mathrm{d}\xi}\right)^2. $$

The equation of motion for $\sigma$ gives the constraint

$$ \left(\frac{\mathrm{d}X}{\mathrm{d}\xi}\right)^2 = 0, $$

for a null geodesic. This is necessary and consistent for massless particles, as you know.

The equation of motion for $X^\mu$ is (**EDIT**: Oops, I forgot a term here. Note that $g\_{\mu\nu}$ depends on $X$ so a term involving $\partial\_\rho g\_{\mu\nu}$ comes into the variation. Try working it out for yourself. I'll fix the following equations up later):

$$ \frac{\mathrm{d}}{\mathrm{d}\xi}\left(\sigma g\_{\mu\nu}\frac{\mathrm{d}X^{\mu}}{\mathrm{d}\xi}\right)=0, $$

but you can change the parameter $\xi\to\lambda$ so that $\sigma \frac{\mathrm{d}}{\mathrm{d}\xi} = \frac{\mathrm{d}}{\mathrm{d}\lambda}$, so the equation of motion simplifies to

$$ \frac{\mathrm{d}}{\mathrm{d}\lambda}\left(g\_{\mu\nu}\frac{\mathrm{d}X^{\mu}}{\mathrm{d}\lambda}\right)=0, $$

which you should be able to solve to get something satisfying the null constraint.
I) Well, in 1+1 dimensions the light-cone (based at some point) is just two intersecting curves, which are precisely determined by the condition

$$\tag{1} g\_{\mu\nu}\dot{x}^{\mu}\dot{x}^{\nu}~=~0,$$

and an initial condition cf. OP's second method. However, this eq. (1) will not determine light-like geodesics in higher dimensions. 

II) OP's first method, namely to vary the Lagrangian 

$$\tag{2} L~:=~ g\_{\mu\nu}(x)\dot{x}^{\mu}\dot{x}^{\nu} $$

is in principle also correct. It is a nice exercise to show that Euler-Lagrange equations are the [geodesic](http://en.wikipedia.org/wiki/Geodesic) equation. However, it seems that OP mistakenly identifies the parameter $\lambda$ of the geodesic with the $x^0$-coordinate. These are two different things! In 1+1 dimensions, we have two coordinates $x^0$ and $x^1$. There are two Euler-Lagrange equations. The complete solution for $\lambda\mapsto x^0(\lambda)$ and $\lambda\mapsto x^1(\lambda)$ will be *all* geodesics: time-like, light-like and space-like.

Since we are only interested in *light-like* geodesics, we would also have to impose eq. (1) in the Euler-Lagrange method. 

III) If one makes a coordinate transformation 

$$\tag{3} u~=~\exp(-\frac{x^0}{2})\quad\text{and}\quad v~=~\frac{x^1}{2}, $$

then OP's metric becomes

$$\tag{4} \frac{4}{u^2}(-du^2+dv^2)$$

which is e.g. also considered in [this](https://physics.stackexchange.com/q/64468/2451) Phys.SE post (up to an overall constant factor). Obviously, the light-like geodesics are of the form 

$$\tag{5} v-v\_0~=~ \pm (u-u\_0). $$