Skip to content

The dump process failed with exitcode 2 #80

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

Closed
nam-co opened this issue Mar 9, 2016 · 4 comments
Closed

The dump process failed with exitcode 2 #80

nam-co opened this issue Mar 9, 2016 · 4 comments

Comments

@nam-co
Copy link

nam-co commented Mar 9, 2016

Hi freekmurze thanks for the upgrade, it works perfect now, but… I need your help once again

Im trying to run a shell command from a controller, I tried both Artisan::call('backup:run’); AND $output = shell_exec('php7.0-sp artisan backup:run');

but I get the same error:
Starting backup...
Dumping database appDB...
Backup failed because The dump process failed with exitcode 2 : Misuse of shell builtins.
Backup completed!

Hope you can help me regards
Michael

@freekmurze
Copy link
Member

If it can run on the cli, it should work in the controller as well. From a package standpoint there's no difference in calling it from cli or calling the command from your controller. I the problem is caused by something specific to your setup.

Could you verify that your php process has the right permissions to call binaries such as mysqldump?

@nam-co
Copy link
Author

nam-co commented Mar 9, 2016

Hi, the command php7.0 artisan backup:run works perfectly, the problem is using the call from the controller

Sent from my iPhone

On Mar 9, 2016, at 1:24 PM, Freek Van der Herten [email protected] wrote:

Could you verify that your php process has the right permissions to call binaries such as mysqldump?


Reply to this email directly or view it on GitHub.

@Cengkaruk
Copy link

Hi.
Same error with Postgres database.

Thanks

@freekmurze
Copy link
Member

@nam-co Please check with your hosting provider if PHP has the right permissions to execute mysqldump when called from a web request. You could try to put the artisan call in a queued job so it'll get called from the command line.

@adzymaniac currently only MySQL databases are supported

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