Closed Issa-projects closed 6 months ago
Anyone?
Static builds of FrankenPHP can only use bundled extensions. Installing extra extensions using the OS package manager will not work, FrankenPHP will not be able to use them.
If you want to add extra extensions (or remove other extensions), you have to create a custom build: https://frankenphp.dev/docs/static/#custom-extensions
Another option (recommended), is to use the Docker images to install custom extensions: https://frankenphp.dev/docs/docker/#how-to-install-more-php-extensions
I will try that, thank you
@dunglas i couldn't manage to create frankenphp executable (like the one laravel octane creates) with the imagick and gmp extension. Can you please give me example docker file? I would really appreciate it
@Issa-projects Any news on that? I run into the same issue. It basically means that e.g. the popular Laravel package https://github.com/spatie/laravel-medialibrary is not working out of the box with FrankenPHP on Forge. Will have to go back to Roadrunner.
@SebastianSchoeps no, i could not figure it out. Please let me know if you find a solution. I have an open issue here https://github.com/dunglas/frankenphp/issues/664
@SebastianSchoeps i tried this aproach, but it is not working when i include gd:
git clone https://github.com/dunglas/frankenphp
cd frankenphp
docker buildx bake --load --set "*.platform=linux/amd64" --set static-builder.args.PHP_EXTENSIONS=bcmath,ctype,curl,dom,fileinfo,filter,gd,intl,gmp,iconv,imagick,mbstring,mysqli,mysqlnd,openssl,pdo,pdo_mysql,session,simplexml,ssh2,token
izer,xml,zlib static-builder
@Issa-projects I switched back to Roadrunner - that works out of the box...
In case anyone is running into issues with Color Thief, this is the reason why it doesn't work when using frankenphp.
What happened?
I am encountering an issue with Laravel Octane in conjunction with FrankenPHP. While my Laravel application is generally functioning well, I recently installed Imagick and GMP extensions on my Ubuntu 22.04 server using apt install php8.3-extension_name. The installation was successful, confirmed by running php -m, which displayed the newly installed extensions.
However, Laravel Octane continues to raise complaints about these extensions being absent.
Steps to Reproduce:
Installed Imagick and GMP extensions on Ubuntu 22.04 server. Confirmed successful installation via php -m. Created a PHP file to print loaded extensions. Executed the file from the Laravel project root using ./frankenphp php-cli file.php. The output revealed that Imagick and GMP extensions were missing, despite being installed. Expected Behavior:
Laravel Octane should recognize and acknowledge the presence of the installed Imagick and GMP extensions.
Actual Behavior:
Laravel Octane insists that Imagick and GMP extensions are not installed, despite evidence of successful installation.
Additional Information:
Laravel version: 10.46 PHP version: 8.3 FrankenPHP version: 1.1.0 Server OS: Ubuntu 22.04 This bug report aims to bring attention to the discrepancy between the successful installation of extensions and Octane's failure to recognize them. Any assistance in resolving this matter would be greatly appreciated.
Build Type
Laravel octane installation
Worker Mode
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output
No response