The answer to the question in the title is no---just take functions of the form $e^{a x^2}$. However, the question in the text is different. The answer to {\it this} question is yes
under some smoothness condition since then all the functions involved are of the above form (up to constants). Without smoothness one can get pathological functions as solutions (reduce to the functional equation $\phi(x+y)=\phi(x) \phi(y)$ which is standard). I suspect that the question should be posed with $0$ included in the domain of definition when the simple algebraic approach mentioned above by did works for the weaker version stated in the question, i.e., without obtaining the specific form of the solution. By the way, this is historically a very significant example---it is essentially the mathematical part of the argument which Clark Maxwell used to deduce his famous law for the distribution of velocities in an ideal gas and can be regarded as the reason behind the ubiquity of functions of the above type, e.g., in probability theory (Gaussian distribution).