Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught Symfony\Component\Process\Exception\LogicException: The Process class relies on proc_open, which is not available on your PHP installation. #895

Open
willyfuu opened this issue Feb 22, 2023 · 4 comments

Comments

@willyfuu
Copy link

willyfuu commented Feb 22, 2023

Hello there,

I install PHP-FFMpeg on aapanel with apache/LAMP(PHP 8.0)

Installed ffmpeg using "sudo apt install ffmpeg"
then check with "which ffmpeg" and "which ffprobe"
ffmpeg path= /usr/bin/ffmpeg
ffprobe path= /usr/bin/ffprobe

I run this command "composer require php-ffmpeg/php-ffmpeg" -> "/www/wwwroot/mydomain/"

I upload video.mp4 -> "/www/wwwroot/mydomain/"

and create index.php to test, here the code:

<?php

require 'vendor/autoload.php';

$ffmpeg = FFMpeg\FFMpeg::create(array(
    'ffmpeg.binaries'  => '/usr/bin/ffmpeg',
    'ffprobe.binaries' => '/usr/bin/ffprobe',
    'timeout'          => 3600, // The timeout for the underlying process
    'ffmpeg.threads'   => 12,   // The number of threads that FFMpeg should use
));

$video = $ffmpeg->open('video.mp4');
$video
    ->save(new FFMpeg\Format\Video\WebM(), 'export-webm.webm');

and i receive this error:

Fatal error: Uncaught Symfony\Component\Process\Exception\LogicException: The Process class relies on proc_open, which is not available on your PHP installation. in /www/wwwroot/mydomain/vendor/symfony/process/Process.php:146 Stack trace: #0 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/Alchemy/BinaryDriver/ProcessBuilderFactory.php(168): Symfony\Component\Process\Process->__construct() #1 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/Alchemy/BinaryDriver/AbstractBinary.php(136): Alchemy\BinaryDriver\ProcessBuilderFactory->create() #2 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OptionsTester.php(63): Alchemy\BinaryDriver\AbstractBinary->command() #3 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OptionsTester.php(43): FFMpeg\FFProbe\OptionsTester->retrieveHelpOutput() #4 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(231): FFMpeg\FFProbe\OptionsTester->has() #5 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(200): FFMpeg\FFProbe->probe() #6 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpeg.php(93): FFMpeg\FFProbe->streams() #7 /www/wwwroot/mydomain/index.php(13): FFMpeg\FFMpeg->open() #8 {main} thrown in /www/wwwroot/mydomain/vendor/symfony/process/Process.php on line 146

Can anyone assist me?

Thanks

@willyfuu
Copy link
Author

Nevermind, i've found the solution

@andy-yeung
Copy link

what is the solution?

@mostafa-norouzi
Copy link

what is the solution?

I changed my PHP version to 8.2 and error disappeared!

@m55614903
Copy link

解决方案是什么?

去 php.ini 把 proc_open 打开,比如LNMP安装的环境有一行是禁用的功能,其中默认就有proc_open,删掉就行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants