We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1fa196c + 5aeccb5 commit 40472acCopy full SHA for 40472ac
bootstrap
@@ -17,8 +17,11 @@ function start_webserver() {
17
case 0:
18
// exec the command
19
$HANDLER = getenv('_HANDLER');
20
- chdir('/var/task');
21
- exec("PHP_INI_SCAN_DIR=/opt/etc/php-7.1.d/:/var/task/php-7.1.d/ php -S localhost:8000 -c /var/task/php.ini -d extension_dir=/opt/lib/php/7.1/modules '$HANDLER'");
+ $handler_components = explode('/', $HANDLER);
+ $handler_filename = array_pop($handler_components);
22
+ $handler_path = implode('/', array_merge(['/var/task'], $handler_components));
23
+ chdir($handler_path);
24
+ exec("PHP_INI_SCAN_DIR=/opt/etc/php-7.1.d/:/var/task/php-7.1.d/ php -S localhost:8000 -c /var/task/php.ini -d extension_dir=/opt/lib/php/7.1/modules '$handler_filename'");
25
exit;
26
27
// return the child pid to parent
0 commit comments