There is nothing wrong with your equation. Let's think about it in a different way:
Your solution is
$$
v(x) = c_1 + c_2 x + c_3 \cos(\lambda x) + c_4 \sin(\lambda x)
$$
where $\lambda = \sqrt{\frac{P}{E I_x}}$.
And your boundary conditions state that
\begin{align}
v(0) &= c_1 + c_3 = 0\\
v(l) &= c_1 + c_2 l + c_3 \cos(\lambda l) + c_4 \sin(\lambda l) = 0\\
v'(0) &= c_2 + c_4 \lambda = 0\\
v'(l) &= c_2 - c_3 \lambda \sin(\lambda l) + c_4 \lambda \cos(\lambda l) = 0
\end{align}
An easy way to see what's going on is to write the system in its matrix representation:
$$
\begin{pmatrix} 1 & 0 & 1 & 0 \\
1 & l & \cos(\lambda l) & \sin(\lambda l)\\
0 & 1 & 0 & \lambda\\
0 & 1 & -\lambda \sin(\lambda l) & \lambda \cos(\lambda l)
\end{pmatrix}
\begin{pmatrix} c_1 \\ c_2 \\ c_3 \\ c_4\end{pmatrix} =
\begin{pmatrix} 0 \\ 0 \\ 0 \\ 0\end{pmatrix}
$$
Indeed, one posibility for solving the system is $c_1 = c_2 = c_3 = c_4 = 0$, which leads to the trivial solution. There is another posibility though, if the determinant of the matrix equals to zero, then there are nontrivial solutions to the linear equation.
Of course, the determinant of the matrix -which I will call $M$-, is dependent on $\lambda$, i.e.
$$
\det M(\lambda) = \lambda \big(\lambda l \sin(\lambda l) + 2 \cos(\lambda l) -2\big)
$$
hence if
$$\tag{*}
\lambda \big(\lambda l \sin(\lambda l) + 2 \cos(\lambda l) -2\big) = 0
$$
then there are non-trivial solutions to the Boundary Value Problem.
Lets take a look at $\lambda$. The greek letter is dependent on the bending modulus $E I_x$ of the bar, and the force $P$ exerted over it. Evidently, unless you add mass, exchange the chemical composition, or modify the area of the bar, the bending modulus is constant (some books denote it by $B$), and the only way to modify the value of $\lambda$ is to change the force acting on the bar. That said, lets return to the equation $(*)$. The most obvious solution for it is when $\lambda = 0$, ($P = 0$). This means a clamped bar, under no transversal force whatsoever. In such case, the bar is undeformed (i.e. $v(x) = 0$).
$\hskip1.5in$
The red arrow denotes the force $P$.
A good question would be if this is the only solution. To answer it, we must look again to equation $(*)$. If $\lambda \neq 0$, then the condition to have nontrivial solutions is that
$$
\lambda l \sin(\lambda l) + 2 \cos(\lambda l) -2 = 0
$$
which can be written as
$$
\lambda l \sin(\lambda l) - 4 \sin^2\big(\tfrac{\lambda l}{2}\big) = 0.
$$
This equation will not have a solution for all values of $\lambda > 0$. In fact, the only way to have a solution is if both sines are zero simultaneously (prove it), meaning that $\lambda = \frac{2\pi n}{l}$, where $n = 1,\,2,\,...\,$. In terms of the force, there are nontrivial solutions to the problem if
$$
P = \frac{4 \pi^2 n^2 E I_x}{l^2}.
$$
What to read of all this?
Suppose you have a clamped bar with no stress whatsoever ($P = 0$) and start applying pressure on one end by pushing the wall. You know that the only solution for $ 0 \le P < \frac{4 \pi^2 E I_x}{l^2}$ is the trivial one. When you reach the threshold $P = \frac{4 \pi^2 E I_x}{l^2}$, there is another two solutions
$$
v(x) = \pm A\Big(\cos\big(\tfrac{2\pi}{l} x\big) - 1\Big)
$$
where $A$ is a given amplitude.
$\hskip1.5in$
What sign will the solution take can only be determined in real life conditions (where inhomogeneity will play a role).
The first buckling will occur at $P_1 = \frac{4 \pi^2 E I_x}{l^2}$. In engineering terms, this will be the ammount of load a column can support before giving up (assuming linear behavior).
If we continue applying force, we will reach a second threshold $P_2 = \frac{8 \pi^2 E I_x}{l^2}$. The second buckling:
$\hskip1.5in$
And so on.
What's behind all this phenomena is the theory of Eigenvalues and Eigenvectors for ODE's, which you really should learn if you want to understand a large portion of mathematics and physics. If you want to learn more about this, you can look at Churchill and Brown Fourier Series and Boundary Value Problems for a good introduction to the subject.
For a thorough exposition of the buckling problem, I recommend you to read A Treatise on the Mathematical Theory of Elasticity by A. E. H. Love.
Finally, I urge you to do all calculations by yourself. I cannot claim that I doublechecked my algebra. The main idea is right though.