opkg update opkg list php*
opkg install php7 php7-cgi
For configuration please see the wiki-page for the particular web server: http.overview, e.g.
If you encounter PHP errors, like undefined functions, you need take a look into the
php.ini file. Search for the appropriate extension line(s), and uncomment them (remove the ; sign). If the problem persists, you probably need to install the appropriate extension too. If PHP runs out of memory, you can increase the amount of memory which the script can consume:
memory_limit = 8M ; Maximum amount of memory a script may consume. post_max_size = 8M
Do not specify more memory than is available, and remember that other processes need memory too. Please note, some things will probably never run on the router. Especially under Backfire 10.03. PHP compiled without the SimpleXML extension, and libxml is missing too. If they are necessary, you need to recompile your own PHP. Without this extensions, some software, like Joomla 1.6 will never run. If you do manage to achieve to run, serious software solutions will run extremely slow, and will consume too much memory.