1

We are trying to run a php page which will run a python script using splinter. Although the python script is running and opening the browser throw the terminal, the php page starts the script using:

$output = shell_exec('/usr/bin/python2.7 script.py ' . '2>&1');

Traceback (most recent call last):
File "script.py", line 5, in with Browser() as browser:
File "build/bdist.linux-x86_64/egg/splinter/browser.py", line 63, in Browser
File "build/bdist.linux-x86_64/egg/splinter/driver/webdriver/firefox.py", line 47, in __init__
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 77, in __init__ self.binary, timeout),
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__ self.profile.add_extension()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 91, in add_extension self._install_extension(extension)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 269, in _install_extension addon_details = self._addon_details(addon)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 369, in _addon_details raise AddonFormatError(str(e), sys.exc_info()[2]) selenium.webdriver.firefox.firefox_profile.AddonFormatError: ('/usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt', ) "

but it wont open the browser. How can we fix it? Thanks.

Marc B
  • 356,200
  • 43
  • 426
  • 500
  • Possible duplicate of [PHP: exec() doesn't run in the background even with ">/dev/null 2>&1 &"](http://stackoverflow.com/questions/12476882/php-exec-doesnt-run-in-the-background-even-with-dev-null-21) – Calimero Dec 02 '15 at 14:35
  • That's not a PHP problem. It's a python problem. You're missing a library, or have the wrong version of a library. – Marc B Dec 02 '15 at 14:35

0 Answers0