How can I start appium server from php

The problem
I want to start appium server through php web. by using
shell_exec(‘cd /usr/local/lib/node_modules/appium/build/lib && /usr/local/bin/node main.js -a 127.0.0.1 -p 4723 2>&1’);

Environment
Appium version (or git revision) that exhibits the issue: 1.8.1
Last Appium version that did not exhibit the issue (if applicable):
Desktop OS/version used to run Appium: mac os high sierra 10.13.6
Node.js version (unless using Appium.app|exe): v.8.11.3
Mobile platform/version under test: iphone 6s apple
Real device or emulator/simulator: real device
Appium CLI or Appium.app|exe: appium cli
Details
when I try to start appium at port 4723 it’s say that this port is unavailable so i think it already start server. but when I check by inspect at New session window in appium GUI with that port it turn out this error vvv.
the capability set is work I check that before with port that start in terminal.
So I can’t start appium port in this way or if anyone has any idea about how to start appium from php.
Thank in advance.

Link to Appium logs