Xvfb: connection refused when running test script via browser on Fedora

I have a python script which will only be triggered by calling my.ip.address/test. It works fine if I run the PHP code via command line. However,if I access the test automation via browser using ...