I am running Ubuntu 16.04 LTS Desktop and the lampp stack (apache2, php7.0, mysql). I am attempting to execute phantomjs -v from PhP and it says that it can not find `GLIBCXX_3.4.9', yet when I execute via console it runs and outputs the version (2.1.1) just fine.
The factors I have ruled out:
Permissions
Info:
PHP: Version 7.1.10
OS: 16.04.1-Ubuntu
Error:
/phantomjs-2.1.1-linux-x86_64/bin/phantomjs: /opt/lampp/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by phantomjs-2.1.1-linux-x86_64/bin/phantomjs)
PhP Exec:
$cmd = "/phantomjs-2.1.1-linux-x86_64/bin/phantomjs -v";
$my_output = shell_exec($cmd.' 2>&1; echo $?');
echo $my_output."<br><br>".get_current_user()."<br><br>".$cmd;
Edit: This is not a libstdc++ error. As I've said I can run it in console fine, it is only when I try to run it in PhP that I have an error.
libstdc++6 is already the newest version (5.4.0-6ubuntu1~16.04.5).
contempt@contempt-MacBookPro:/opt/lampp/lib$ strings libstdc++.so.6 | grep GLIB
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBC_2.3
GLIBC_2.4
GLIBC_2.2.5