Consider $GL_2$ as the affine group scheme with coordinate ring ${\mathbb Z}[x_1,x_2,x_3,x_4,y]/(\det\left(\begin{array}{cc}x_1& x_2\\ x_3& x_4\end{array}\right)y1)$. The group scheme $PGL_2$ is then given by the subring $S$ of $GL_1$invariants, which is the subring generated by all monomials of the form $x_ix_iy^2$. In this way, we define $PGL_2( R )=Hom(S,R)$ for any ring $R$. By Hilbert 90 we know that the sequence $$ 0\to GL_1( R )\to GL_2( R )\to PGL_2( R )\to 1 $$ is exact if $R$ is a field. From that one can derive that it stays exact if $R$ is factorial. But what for a general commutative ring with unit? Is it always exact? If not, is there a handy description of all rings for which it is?

The answer is no. Here is an explicit example. Let $R=\mathbb{Z}[\sqrt{5}]$. Consider the matrix $$\left(\begin{array}{cc}1+\sqrt{5}& 2\\ 2& 1\sqrt{5}\end{array}\right).$$ It represents an element of $PGL_2(R)$ that is not in the image of $GL_2(R)$. The motivation for this example is that the ideal $(2,1+\sqrt{5})$ is not principal in $R$ and this should be relevant because the next term in the long exact sequence is $H^1(R,\mathbb{G}_m)$ (and so the sequence written in the question will be exact whenever this $H^1$ vanishes). I would love to see a more conceptual proof of the failure of $GL_2(R)\to PGL_2(R)$ to be surjective. 


For a topological perspective, take $R$ to be the tensor product of $\mathbb R$ with the coordinate ring of $PGL_2$. surjectivity would imply that the map of topological spaces $GL_2(\mathbb R)\to PGL_2(\mathbb R)$ has a right inverse, which it does not because the induced map of fundamental groups $\mathbb Z\to \mathbb Z$ is $x\mapsto 2x$. Or you can argue similarly over $\mathbb C$, where the map of fundamental groups is $\mathbb Z\to \mathbb Z/2$. 

