Level 8
I already found solution. I put xvfb-run -a before the command.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Running the command:
$process = new Process(['phantomjs','/temp/scraper.js'])
returns the following errors:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-forge'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
When I run the same command directly in command prompt, everything is fine.
What is the difference? php exec also doesn't work. return_var is 1.
How can I solve this?
I already found solution. I put xvfb-run -a before the command.
Please or to participate in this conversation.