Here is a counterexample. Let $D$ be an uncountable set with the discrete topology and let $W=D\times [0,1]/D\times\{0\}$ be the cone on $D$; we will write $0\in W$ for the cone point. Let $X$ have the same underlying set as $W$ but have the following coarser topology: an open set $U\subseteq W$ is open in $X$ iff either $0\not\in U$ or $U$ contains all of $\{d\}\times[0,1]$ for all but countably many $d\in D$.
It is easy to see that $X$ is locally path-connected. However, I claim that continuity on paths does not determine continuity on $X$. It suffices to give a set $A\subset X$ whose preimage under any path is closed but which is not closed in $A$ (since then you can consider $\varphi:X\to \{0,1\}$ which is the characteristic function of $A$, with $\{0,1\}$ topologized such that $\{1\}$ is closed and $\{0\}$ is not). An example of such a set is $A=D\times\{1\}$. Indeed, $A$ is not closed since $0\in\overline{A}$. However, any path $f:[0,1]\to X$ intersects $\{d\}\times(0,1]$ for only countably many values of $d$ (for instance, because the image of $f$ is contained in the closure of the countable set $f([0,1]\cap\mathbb{Q})$). Since $S\times\{1\}$ is closed in $X$ for any countable subset $S\subset D$, it follows that $f^{-1}(A)$ is closed.
For more discussion (including a counterexample that is additionally a sequential space), see my answer at Do there exist general conditions underwhich we can conclude that continuity on a topological space is detected by $\mathbb{R}$?.