Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-12232: FPM: segfault dynamically loading extension without opc…
…ache Also fixes incorrect assertion in ini init that php_dl is always temporary. Closes GH-12277
- Loading branch information
Showing
5 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--TEST-- | ||
FPM: gh12232 - loading shared ext in FPM config | ||
--SKIPIF-- | ||
<?php | ||
include "skipif.inc"; | ||
FPM\Tester::skipIfSharedExtensionNotFound('dl_test'); | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
require_once "tester.inc"; | ||
|
||
$cfg = <<<EOT | ||
[global] | ||
error_log = {{FILE:LOG}} | ||
[unconfined] | ||
listen = {{ADDR}} | ||
pm = static | ||
pm.max_children = 1 | ||
pm.status_path = /status | ||
catch_workers_output = yes | ||
php_admin_value[extension] = dl_test | ||
EOT; | ||
|
||
$code = <<<EOT | ||
<?php | ||
var_dump(extension_loaded('dl_test')); | ||
var_dump(ini_get('dl_test.string')); | ||
ini_set('dl_test.string', 'test'); | ||
var_dump(ini_get('dl_test.string')); | ||
EOT; | ||
|
||
$tester = new FPM\Tester($cfg, $code); | ||
$tester->start(); | ||
$tester->expectLogStartNotices(); | ||
$tester->request()->expectBody(['bool(true)', 'string(5) "hello"', 'string(4) "test"']); | ||
$tester->request()->expectBody(['bool(true)', 'string(5) "hello"', 'string(4) "test"']); | ||
$tester->terminate(); | ||
$tester->expectLogTerminatingNotices(); | ||
$tester->close(); | ||
|
||
?> | ||
Done | ||
--EXPECT-- | ||
Done | ||
--CLEAN-- | ||
<?php | ||
require_once "tester.inc"; | ||
FPM\Tester::clean(); | ||
?> | ||
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters