Skip to content

Commit

Permalink
Add the argc_argv flag for the cgi exec #553
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeelio committed Feb 18, 2020
1 parent 8300a69 commit 4980631
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/Services/CronService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ public function getCronPath(): string
{
$finder = new PhpExecutableFinder();
$php_path = $finder->find(false);
$php_exec = str_replace('-fpm', '', $php_path);

// If this is the cgi version of the exec, add this arg, otherwise there's
// an error with no arguments existing
if (str_contains($php_exec, '-cgi')) {
$php_exec .= ' -d register_argc_argv=On';
}

$path = [
'cd '.base_path(),
'&&',
str_replace('-fpm', '', $php_path),
$php_exec,
'artisan schedule:run',
];

Expand Down

0 comments on commit 4980631

Please sign in to comment.