mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
- WS
This commit is contained in:
parent
8fc1043685
commit
d376ba48ea
1 changed files with 29 additions and 29 deletions
|
@ -163,53 +163,53 @@ function write_information()
|
||||||
{
|
{
|
||||||
global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options;
|
global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options;
|
||||||
|
|
||||||
// Get info from php
|
// Get info from php
|
||||||
$info_file = realpath(dirname(__FILE__)) . '/run-test-info.php';
|
$info_file = realpath(dirname(__FILE__)) . '/run-test-info.php';
|
||||||
@unlink($info_file);
|
@unlink($info_file);
|
||||||
$php_info = '<?php echo "
|
$php_info = '<?php echo "
|
||||||
PHP_SAPI : " . PHP_SAPI . "
|
PHP_SAPI : " . PHP_SAPI . "
|
||||||
PHP_VERSION : " . phpversion() . "
|
PHP_VERSION : " . phpversion() . "
|
||||||
ZEND_VERSION: " . zend_version() . "
|
ZEND_VERSION: " . zend_version() . "
|
||||||
PHP_OS : " . PHP_OS . " - " . php_uname() . "
|
PHP_OS : " . PHP_OS . " - " . php_uname() . "
|
||||||
INI actual : " . realpath(get_cfg_var("cfg_file_path")) . "
|
INI actual : " . realpath(get_cfg_var("cfg_file_path")) . "
|
||||||
More .INIs : " . (function_exists(\'php_ini_scanned_files\') ? str_replace("\n","", php_ini_scanned_files()) : "** not determined **"); ?>';
|
More .INIs : " . (function_exists(\'php_ini_scanned_files\') ? str_replace("\n","", php_ini_scanned_files()) : "** not determined **"); ?>';
|
||||||
save_text($info_file, $php_info);
|
save_text($info_file, $php_info);
|
||||||
$info_params = array();
|
$info_params = array();
|
||||||
settings2array($ini_overwrites,$info_params);
|
settings2array($ini_overwrites,$info_params);
|
||||||
settings2params($info_params);
|
settings2params($info_params);
|
||||||
$php_info = `$php $pass_options $info_params $info_file`;
|
$php_info = `$php $pass_options $info_params $info_file`;
|
||||||
@unlink($info_file);
|
@unlink($info_file);
|
||||||
define('TESTED_PHP_VERSION', `$php -r 'echo PHP_VERSION;'`);
|
define('TESTED_PHP_VERSION', `$php -r 'echo PHP_VERSION;'`);
|
||||||
|
|
||||||
$unicode = `$php $pass_options $info_params -r 'echo ini_get("unicode_semantics");'`;
|
$unicode = `$php $pass_options $info_params -r 'echo ini_get("unicode_semantics");'`;
|
||||||
define('TESTED_UNICODE', strcasecmp($unicode,"on") == 0 || $unicode == 1);
|
define('TESTED_UNICODE', strcasecmp($unicode,"on") == 0 || $unicode == 1);
|
||||||
|
|
||||||
// check for extensions that need special handling and regenerate
|
// check for extensions that need special handling and regenerate
|
||||||
$php_extensions = '<?php echo join(",",get_loaded_extensions()); ?>';
|
$php_extensions = '<?php echo join(",",get_loaded_extensions()); ?>';
|
||||||
save_text($info_file, $php_extensions);
|
save_text($info_file, $php_extensions);
|
||||||
$php_extensions = explode(',',`$php $pass_options $info_params $info_file`);
|
$php_extensions = explode(',',`$php $pass_options $info_params $info_file`);
|
||||||
$info_params_ex = array(
|
$info_params_ex = array(
|
||||||
'session' => array('session.auto_start=0'),
|
'session' => array('session.auto_start=0'),
|
||||||
'zlib' => array('zlib.output_compression=Off'),
|
'zlib' => array('zlib.output_compression=Off'),
|
||||||
'xdebug' => array('xdebug.default_enable=0'),
|
'xdebug' => array('xdebug.default_enable=0'),
|
||||||
);
|
);
|
||||||
foreach($info_params_ex as $ext => $ini_overwrites_ex) {
|
foreach($info_params_ex as $ext => $ini_overwrites_ex) {
|
||||||
if (in_array($ext, $php_extensions)) {
|
if (in_array($ext, $php_extensions)) {
|
||||||
$ini_overwrites = array_merge($ini_overwrites, $ini_overwrites_ex);
|
$ini_overwrites = array_merge($ini_overwrites, $ini_overwrites_ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
@unlink($info_file);
|
||||||
@unlink($info_file);
|
|
||||||
|
|
||||||
// Write test context information.
|
// Write test context information.
|
||||||
echo "
|
echo "
|
||||||
=====================================================================
|
=====================================================================
|
||||||
CWD : $cwd
|
CWD : $cwd
|
||||||
PHP : $php $php_info
|
PHP : $php $php_info
|
||||||
Extra dirs : ";
|
Extra dirs : ";
|
||||||
foreach ($user_tests as $test_dir) {
|
foreach ($user_tests as $test_dir) {
|
||||||
echo "{$test_dir}\n ";
|
echo "{$test_dir}\n ";
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
=====================================================================
|
=====================================================================
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue