Edited title: Site crashes after attempt to install webprofiler module with proc_functions disabled in PHP.

I tried to install the devel modules and after each install my site crashes and i can only get a HTTP-error 500.

I have to restore my database to get the site working again.
When i install each module separately, they all work, until i install the last one, the webprofiler, then the crash occurs.

I got the following errormessages out of my DB, watchdog-table:

After the install the last errormessage is:
a:5:{s:5:"%type";s:52:"Symfony\Component\Process\Exception\RuntimeException";s:8:"@message";s:87:"The Process class relies on proc_open, which is not available on your PHP installation.";s:9:"%function";s:48:"Symfony\Component\Process\Process->__construct()";s:5:"%file";s:84:"/home/pkgnum/domains/onsnuenen.nl/public_html/vendor/symfony/process/Process.php";s:5:"%line";i:144;}

when i go to my site again after this happened, i get the HTTP-error 500. There are 2 errormessages after that in the log:

a:5:{s:5:"%type";s:7:"Warning";s:8:"@message";O:25:"Drupal\Core\Render\Markup":1:{s:9:" * string";s:60:"uasort(): Array was modified by the user comparison function";}s:9:"%function";s:50:"Drupal\shortcut\Entity\ShortcutSet->getShortcuts()";s:5:"%file";s:98:"/home/pkgnum/domains/onsnuenen.nl/public_html/core/modules/shortcut/src/Entity/ShortcutSet.php";s:5:"%line";i:120;}

and
a:5:{s:5:"%type";s:52:"Symfony\Component\Process\Exception\RuntimeException";s:8:"@message";s:87:"The Process class relies on proc_open, which is not available on your PHP installation.";s:9:"%function";s:48:"Symfony\Component\Process\Process->__construct()";s:5:"%file";s:84:"/home/pkgnum/domains/onsnuenen.nl/public_html/vendor/symfony/process/Process.php";s:5:"%line";i:144;}

Any ideas what i am doing wrong? Do you need more information, let me know.

Erwin van Maasakkers

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Erwinm_nl created an issue. See original summary.

willzyx’s picture

@Erwinm_nl looks like an enviroment problem.
Check in your php.ini disable_functions parameter. Probably proc_* functions are disabled

Erwinm_nl’s picture

Hi Willzyx,

I think you are right....i hope my hoster will fix it :-(
I think it should not lead to a crash though...and it should not crash the site like this (a restore of the database is necessary), so an errorhandler should be in place, but thats my opinion. I don't think i have enough experiance to do this, so it's more like a suggestion and i can only have a lot of respect for everyone who creates modules like this.

Erwinm_nl’s picture

Title: Site crashes after installing devel-webprofiler » Site crashes after attempt to install webprofiler module with proc_functions disabled in PHP
Issue summary: View changes
lussoluca’s picture

Assigned: Unassigned » lussoluca
Status: Active » Needs review
Issue tags: +DevDaysMilan
FileSize
1023 bytes

I've added a new catch to overcome the lack of proc_open function.

willzyx’s picture

another option is check if the proc_open function exist before use Process.
+1 in any case for me

lussoluca’s picture

another option is check if the proc_open function exist before use Process.

That check is already be done in the Process class and then the exception is raised, so I think we can rely on that.

 if (!function_exists('proc_open')) {
            throw new RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');
        }

  • lussoluca committed 07f185d on 8.x-1.x
    Issue #2749431 by lussoluca: Site crashes after attempt to install...
lussoluca’s picture

Status: Needs review » Closed (fixed)

Committed and pushed to 8.x-1.x
Thanks!