Since Mathematica is contained in Raspberry Pi 2, I can do the following in the terminal:
echo "2+2" | /usr/local/bin/math -batchinput -batchoutput
4 correctly. But when I try it with php:
<?php $math="echo '2+2' | /usr/local/bin/math -batchinput -batchoutput"; $handle = popen($math, "r"); $str=fread($handle,200); echo $str; ?>
It says that
Mathematica cannot find a valid password.
I find the license for Mathematica, in
Does this mean that Mathematica needs another license for interface with php?
I have solved this by adding an active key and password for the user
www-data, which will stored in