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

Magento 2.4.6 issues, blank page and deploy error #8

Open
s1mplex1337 opened this issue Apr 17, 2024 · 7 comments
Open

Magento 2.4.6 issues, blank page and deploy error #8

s1mplex1337 opened this issue Apr 17, 2024 · 7 comments

Comments

@s1mplex1337
Copy link

Doesn't seem work on Magento 2.4.6 on a cloudlinux instance with php8.1, unfortunately. Upon running "bin/magento fpc:deploy" it gives the following error:

`PHP Warning:  Module "igbinary" is already loaded in Unknown on line 0
grep -r "FPC.php" /var/www/vhosts/mydomain.com/httpdocs/pub/index.php || sed -i '2 i include "/var/www/vhosts/mydomain.com/httpdocs/vendor/mage/fpc/Mage/FPC/FPC.php";' /var/www/vhosts/mydomain.com/httpdocs/pub/index.php
array(1) {
  [0]=>
  string(94) "include "/var/www/vhosts/mydomain.com/httpdocs/vendor/mage/fpc/src/Mage/FPC.php";"
}

There is an error in /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Command/Command.php at line: 301
Return value of "Mage\FPC\Console\Deploy\Interceptor::execute()" must be of the type int, "null" returned.#0 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run()
#1 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(138): Mage\FPC\Console\Deploy\Interceptor->___callParent()
#2 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Interception/Interceptor.php(153): Mage\FPC\Console\Deploy\Interceptor->Magento\Framework\Interception\{closure}()
#3 /var/www/vhosts/mydomain.com/httpdocs/generated/code/Mage/FPC/Console/Deploy/Interceptor.php(23): Mage\FPC\Console\Deploy\Interceptor->___callPlugins()
#4 /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Application.php(1040): Mage\FPC\Console\Deploy\Interceptor->run()
#5 /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#6 /var/www/vhosts/mydomain.com/httpdocs/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#7 /var/www/vhosts/mydomain.com/httpdocs/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun()
#8 /var/www/vhosts/mydomain.com/httpdocs/bin/magento(23): Symfony\Component\Console\Application->run()
#9 {main}`

Tried different approaches wit app folder and composer. Adding to index or bootstrap or ngingx. Just a blank page after that and above error. Any idea what this could be? PHPRedis is installed.

@Genaker
Copy link
Owner

Genaker commented Apr 18, 2024 via email

@s1mplex1337
Copy link
Author

Hey thanks, so just found this, maybe just for my install, maybe it helps someone else too:

in the file /vendor/mage/fpc/Mage/FPC/FPC.php when using composer installation, then comment the 1st $config as described but also the 2nd config for composer had one ../ too many.

So it should then look like this:

//For app folder
    // $config = require __DIR__ . '/../../../../app/etc/env.php';
    //For Composer Folder ToDO: remove src from the composer to make app = to vendor
    $config = require __DIR__ . '/../../../../../app/etc/env.php';

@Genaker
Copy link
Owner

Genaker commented Apr 18, 2024 via email

@s1mplex1337
Copy link
Author

s1mplex1337 commented Apr 18, 2024

I just installed from composer and changed this line in FPC.php so it works for me now:

$config = require DIR . '/../../../../../app/etc/env.php';
it's 5 folders up not 6. But could be different I guess, however my magento 2.4.6 install is pretty standard I think.

and in the index.php file i added this manually:
include "/var/www/vhosts/mydomain.com/httpdocs/vendor/mage/fpc/Mage/FPC/FPC.php";

I have not tried the app folder manual install.

@Genaker
Copy link
Owner

Genaker commented Apr 18, 2024 via email

@amelojunior
Copy link

@Genaker What tool did you use to measure the FPC generation time?

@Genaker
Copy link
Owner

Genaker commented May 1, 2024 via email

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

3 participants