Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Fatal error: Object of class \Magento\Framework\Profiler\Driver\Standard\Stat() could not be converted to string #43

Open
olegf2a opened this issue Sep 18, 2018 · 1 comment

Comments

@olegf2a
Copy link

olegf2a commented Sep 18, 2018

Fatal error appears function phpinfo() is used, function phpinfo() is used in the library for establishing a connection via SFTP. Library uses phpinfo() to check PHP settings.
for example phpseclib\Crypt\RSA
function __construct() { $this->configFile = dirname(__FILE__) . '/../openssl.cnf'; if (!defined('CRYPT_RSA_MODE')) { switch (true) { .... case extension_loaded('openssl') && file_exists($this->configFile): ... ob_start(); @phpinfo(); $content = ob_get_contents(); ob_end_clean();

fatal

@LiamKarlMitchell
Copy link

LiamKarlMitchell commented Sep 3, 2019

Work around could set MAGE_PROFILER_STAT to null before new RSA() etc.
$_SERVER['MAGE_PROFILER_STAT'] = null;

Disabling Mirasvit Profiler module from Magento 2 did not appear to fix this.

bin/magento module:disable Mirasvit_Profiler

Removing it entirely did.

composer remove mirasvit/module-profiler

Unknown as to why it causes a crash when running @phpinfo from Magento cron job cli.

Related: phpseclib/phpseclib#1400

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

No branches or pull requests

2 participants