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

Laravel 6 proc_open #30054

Closed
tomswinkels opened this issue Sep 20, 2019 · 25 comments
Closed

Laravel 6 proc_open #30054

tomswinkels opened this issue Sep 20, 2019 · 25 comments

Comments

@tomswinkels
Copy link
Contributor

tomswinkels commented Sep 20, 2019

  • Laravel Version: 6
  • PHP Version: 7.3

Description:

After installing Laravel 6, i get the following error message:

The Process class relies on proc_open, which is not available on your PHP installation.

I don't have find anything in the docs about this?

@sepehrr
Copy link

sepehrr commented Sep 20, 2019

I faced with the same issue when I wanted to put my Laravel 6 application on a shared host(PHP 7.2) and faced the error:

The Process class relies on proc_open, which is not available on your PHP installation.

Problem happens on /vendor/facade/ingnition/src/Middleware/AddGitInformation.php
file and when $this->command("git log --pretty=format:'%H' -n 1"); is called. I solved my problem by editing AddGitInformation.php but I guess it would be better if Laravel6 not to depend on proc_open if possible.

@antonkomarev
Copy link
Contributor

antonkomarev commented Sep 20, 2019

I think this issue related to Symfony Process package.
https://github.com/symfony/process/blob/master/CHANGELOG.md#400

@MrKappa
Copy link

MrKappa commented Sep 24, 2019

For solving this issue you have to enable proc_open and proc_get_status functions in your php.
For doing so you've to edit your php.ini file, search for "disable_functions" and remove from that list proc_open and proc_get_status.

Mine actually looks like this:

disable_functions = passthru,exec,system,chroot,chgrp,chown,shell_exec,ini_alter,ini_restore,dl,readlink,symlink,popepassthru,stream_socket_server,fsocket,popen

After this edit you've to restart your php. If you aren't sure where is located your php.ini you can call php --ini and you'll see the loaded php.ini or the additional ini files loaded.

@driesvints
Copy link
Member

Heya, this seems to be related to Symfony and not Laravel.

@Hi7cl4w
Copy link

Hi7cl4w commented Oct 4, 2019

It is because of Flare error reporting service enabled in debug mode
There is a workaround for this.

Publish flare config file
php artisan vendor:publish --tag=flare-config

and in config/flare.php

Set

'collect_git_information' => false 
'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
    ],

@thusithawijethunga
Copy link

It is because of Flare error reporting service enabled in debug mode
There is a workaround for this.

Publish flare config file
php artisan vendor:publish --tag=flare-config

and in config/flare.php

Set

'collect_git_information' => false 
'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
    ],

This is working for Php 7.2, shared hosting. thanks

@enlajuega
Copy link

It is because of Flare error reporting service enabled in debug mode
There is a workaround for this.

Publish flare config file
php artisan vendor:publish --tag=flare-config

and in config/flare.php

Set

'collect_git_information' => false 
'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
    ],

Muchas gracias... esta solución sirvió de mucho... thank!!!

@JASH-JARIWALA
Copy link

It is because of Flare error reporting service enabled in debug mode
There is a workaround for this.

Publish flare config file
php artisan vendor:publish --tag=flare-config

and in config/flare.php

Set

'collect_git_information' => false 
'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
    ],

thanks man works for PHP 7.2

@vtkiet911
Copy link

It is because of Flare error reporting service enabled in debug mode
There is a workaround for this.

Publish flare config file
php artisan vendor:publish --tag=flare-config

and in config/flare.php

Set

'collect_git_information' => false 
'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
    ],

Thanks you very much! ♥

@hbouchefra
Copy link

It is because of Flare error reporting service enabled in debug mode
There is a workaround for this.

Publish flare config file
php artisan vendor:publish --tag=flare-config

and in config/flare.php

Set

'collect_git_information' => false 
'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
    ],

Thanks a lot from Amsterdam!

@nguyenbinh23
Copy link

i did all, but my shared host still not working

@ishendyweb
Copy link

ishendyweb commented Nov 11, 2019

@nguyenbinh23 What is the problem now? Is it still the same exception? can you share your ./config/flare.php file?

@nguyenbinh23
Copy link

i added ./config/flare.php in my cpanel shared host, and changed it like u but still not working

@ishendyweb
Copy link

Yes. Just share more information. Like what is the current exception? and what is the code inside your flare.php ?

@nguyenbinh23
Copy link

thanks sir, i waited 30min and my website worked @@

@AhmedHdeawy
Copy link

It is because of Flare error reporting service enabled in debug mode
There is a workaround for this.

Publish flare config file
php artisan vendor:publish --tag=flare-config

and in config/flare.php

Set

'collect_git_information' => false 
'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
    ],

thanks @ManuKN it works for php7.3

@eduardosnm
Copy link

eduardosnm commented Jan 8, 2020

It is because of Flare error reporting service enabled in debug mode
There is a workaround for this.

Publish flare config file
php artisan vendor:publish --tag=flare-config

and in config/flare.php

Set

'collect_git_information' => false 
'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
    ],

Work for me on shared hosting and PHP 7.3

@martenkoetsier
Copy link
Contributor

The solution by manukn works, but keep in mind that the configuration might be cached in /bootstrap/cache/config.php. If that file still contains a true value for flare.reporting.collect_git_information, the error remains.
Delete this cache file to remove the cache.

@esternwinluck
Copy link
Contributor

I solved this issue by deleting everything inside /bootstrap/cache

@Sharifur
Copy link

collect_git_information

save my day

@dennisvandenende
Copy link

dennisvandenende commented Feb 27, 2020

doesn't work for me:
My PHP:

PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.24-0ubuntu0.18.04.3, Copyright (c) 1999-2018, by Zend Technologies

composer require brexis/laravel-workflow
Using version ^1.3 for brexis/laravel-workflow
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing brexis/laravel-workflow (1.3.3):
In Process.php line 344:

  proc_open(): fork failed - Invalid argument
my config/flare.php

    'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
        'grouping_type' => null,
    ],

and my bootstrap/cache is empty (I empty this after every try)

What i did is just install the laravel boilerplate
then composer update.
Then I and wanted to add this laravel-workflow
and that is the moment i get this error.

running within WSL by the way.
Any suggestions?

************** UPDATE ************
I solved it with memory clearance. closed some files etc etc
In other cases the Procopen is caused by memory flawness
works now!

@nelsonrod10
Copy link

It is because of Flare error reporting service enabled in debug mode
There is a workaround for this.

Publish flare config file
php artisan vendor:publish --tag=flare-config

and in config/flare.php

Set

'collect_git_information' => false 
'reporting' => [
        'anonymize_ips' => true,
        'collect_git_information' => false,
        'report_queries' => true,
        'maximum_number_of_collected_queries' => 200,
        'report_query_bindings' => true,
        'report_view_data' => true,
    ],

Thanks!!, works for php 7.4

@hafizSiddiq7675
Copy link

Not working for me

@ishendywebdeveloper
Copy link

ishendywebdeveloper commented Mar 23, 2020

@hafizSiddiq7678 > Not working for me

Why? What have you tried so far? Can you share your flare config file?

@laravel laravel locked and limited conversation to collaborators Mar 23, 2020
@driesvints
Copy link
Member

Hey everyone,

I'm locking this issue because it either has gone off-topic, become a dumping ground for things which shouldn't be in an issue tracker or is just too old. Please try to discuss things further on one of the below channels:

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