Category: symfony-process

SymfonyComponentProcessProcess unable to run audit2allow

I’m trying to execute audit2allow using SymfonyComponentProcessProcess. When I run exec(“audit2allow -a -M a2a”); in PHP, it works just fine, a2a.pp and a2a.te is produced. $process = new Process([‘audit2allow’, ‘-a’, ‘-M’, ‘a2a’]); $process->run(); if (!$process->isSuccessful()) { throw new ProcessFailedException($process); }…

SymfonyProcess package in Laravel (for python files)

I am trying to run python files in Laravel Project.Therefore, i use the SymfonyProcess package.My code looks like this: use SymfonyComponentProcessProcess; use SymfonyComponentProcessExceptionProcessFailedException; process = new Process([“python”,”C:xampphtdocsbackendScrapAnnouncementsScrap.py”]); $process->run(); When i use this line: throw new ProcessFailedException($process); my laravel project returns…