Cms: PHP Info

Created on 3 Sep 2019  路  12Comments  路  Source: craftcms/cms

Description

Similar to #2843 Utilities > PHP Info is throwing an Internal Server Error error.
The specific error from stack trace is yii\base\ErrorException: Array to string conversion in /XXX/vendor/craftcms/cms/src/utilities/PhpInfo.php:66

Steps to reproduce

  1. Go to Utilities > PHP Info

Additional info

  • Craft version: 3.3.0.1
  • PHP version: 7.1.30
  • Database driver & version: MySQL 5.7.26
  • Plugins & versions:

craftcms/redactor: 1.10
ether/simplemap 3.5.2
mikestecker/craft-videoembedder: 1.1.3
nystudio107/craft-eagerbeaver: 1.0.4
sebastianlenz/linkfield: 1.0.19
verbb/super-table: 2.2.1
rias/craft-position-fieldtype 1.0.14
topshelfcraft/supersort: 3.0.1
whoisjuan/craft-color-mixer: 1.0.5
marionnewlevant/twig-perversion: 2.1.0
ournameismud/fractal: 1.0.8
solspace/craft3-freeform: 2.5.26
ether/seo: 3.6.2
ether/tags: 1.0.5
spicyweb/craft-embedded-assets: 2.0.11
clearbold/craft-campaignmonitor-lists: 1.1.7

There are additionally several custom plugins in use for bespoke functionality

Full (redacted) stack log for error https://gist.github.com/cole007/25975e6c8d081d549e4a2d3b23c1141d

Most helpful comment

And fixed for the next release.

All 12 comments

PhpInfo.php line 66 is just this:

https://github.com/craftcms/cms/blob/069f389944401cc8eb9fecddd69e408c5b03a912/src/utilities/PhpInfo.php#L66

So the actual issue must lie somewhere internally to PHP or a PHP extension; maybe ask your host about it.

I am seeing the same issue since upgrading Craft (3.2.5.1 => 3.3.0.1).

It's caused by the environment variable "argv" being an array.

@brandonkelly I think the environment suggestion isn't quite accurate. I am having the same issue on multiple the environments which have functioned appropriately up until upgrading to 3.3. The only difference being Craft and its dependencies were updated. I can revert back to 3.2.10 and it works as expected.

Can anyone experiencing this issue put in this in a ini.php file:

<?php phpinfo();

Put it in your public HTML folder, then load it in a browser. i.e. http://yoursite.com/ini.php

Save that entire page as HTML, then send it over to [email protected] and reference this ticket, please.

@angrybrad I sent support the PHP info. I wanted to post additional information poking into this issue. Like @mhayes14 said, argv is an array. If I turn off register_argc_argv in my php.ini, the page works as expected. However, this option is generally "On" by default.

In Craft 3.2.10 and prior, the value for $_SERVER['argv'] appears similar to:

Array( [0] =&gt; p=admin/utilities/php-info)

But upgrading to 3.3, the line throws the error.

Can confirm setting register_argc_argv = Off in a php.ini file fixes this problem (hosting on Digital Ocean with Server Pilot)

Craft v3.3.6
PHP 7.2.23
MySQL 5.0.12

@cole007 Thanks!! I just set that to On and I鈥檓 able to reproduce the error now.

And fixed for the next release.

Just updated to 3.3.11 - and still seeing this. Do I need to do anything else (restart any services or whatever?) - or should I send you good folks a phpinfo dump?

@bossanova808 Create a normal phoinfo() file, and search the output in your browser for Array. What key(s) are outputting that?

$_SERVER['argv'] | Array ( )
$_ENV['argv'] | Array ( )

Looks like maybe you just need to do the same for that second one eh?

@bossanova808 Alright that should be fixed as well now.

To get the fix early, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "dev-develop#7b5108a399366b0bea57f3b0c774a7355e58d0c7 as 3.3.11",
  "...": "..."
}

Then run composer update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michel-o picture michel-o  路  3Comments

lukebailey picture lukebailey  路  3Comments

mccombs picture mccombs  路  3Comments

angrybrad picture angrybrad  路  3Comments

darylknight picture darylknight  路  3Comments