As it turns out, it appears that running Linux commands via PHP is not going to work. While I can understand the reasons for that, it does present a problem with the company I'm in.
We have a deployment script that's written in PHP (written by my predecessor though I could modify it to an extent) and involves executing Linux commands such as rsync. Whenever our dev team pushes to a specific branch in our code repo, it normally triggers a hook that calls the PHP script which, given that it passes security checks, proceeds to call Linux commands which copy the files to the specified directory via rsync.
Turns out that it appears not to work here partly due having a completely different folder structure (we used cPanel with SSH access before) and it appeared that we can't run Linux commands straight from PHP since the pre-deployment checks for dependencies simply stalls at the point where it says "which <dependency>".
I was wondering what would be the best approach for this. Off the top of my head, I was thinking of having one of our other servers do the pulling which then FTPs to the Sentora server and drop the files using that. I'm sure there's a better way of doing this though and would rather not have one of our other servers acting as a third wheel.
We have a deployment script that's written in PHP (written by my predecessor though I could modify it to an extent) and involves executing Linux commands such as rsync. Whenever our dev team pushes to a specific branch in our code repo, it normally triggers a hook that calls the PHP script which, given that it passes security checks, proceeds to call Linux commands which copy the files to the specified directory via rsync.
Turns out that it appears not to work here partly due having a completely different folder structure (we used cPanel with SSH access before) and it appeared that we can't run Linux commands straight from PHP since the pre-deployment checks for dependencies simply stalls at the point where it says "which <dependency>".
I was wondering what would be the best approach for this. Off the top of my head, I was thinking of having one of our other servers do the pulling which then FTPs to the Sentora server and drop the files using that. I'm sure there's a better way of doing this though and would rather not have one of our other servers acting as a third wheel.