php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #68230
Patch php-5.6.1-owlx-tests-openssl.diff revision 2014-10-15 08:09 UTC by gm dot outside+php at gmail dot com

Patch php-5.6.1-owlx-tests-openssl.diff for Testing related Bug #68230

Patch version 2014-10-15 08:09 UTC

Return to Bug #68230 | Download this patch
Patch Revisions:

Developer: gm.outside+php@gmail.com

--- php-5.6.1.orig/ext/openssl/tests/ServerClientTestCase.inc	2014-10-01 09:17:38 +0000
+++ php-5.6.1/ext/openssl/tests/ServerClientTestCase.inc	2014-10-15 08:01:47 +0000
@@ -48,7 +48,30 @@ class ServerClientTestCase
 
     private function spawnWorkerProcess($code)
     {
-        $cmd = sprintf('%s "%s" %s', PHP_BINARY, __FILE__, WORKER_ARGV_VALUE);
+        $custom_ini = php_ini_loaded_file();
+        $custom_scan = php_ini_scanned_files();
+	$extension_dir = ini_get('extension_dir');
+
+        if ($custom_ini) {
+            $custom_ini = "-c '$custom_ini'";
+        }
+
+        if ($custom_scan && strlen($custom_scan) > 0) {
+            $files = explode(',', $custom_scan);
+            foreach ($files as $file) {
+                    $custom_ini = "$custom_ini -c '$file'";
+            }
+        }
+
+        if ($extension_dir && strlen($extension_dir) > 0) {
+            $custom_ini .= " -d 'extension_dir=$extension_dir'";
+	}
+
+        if ($custom_ini) {
+           $cmd = sprintf('%s %s "%s" %s', PHP_BINARY, $custom_ini, __FILE__, WORKER_ARGV_VALUE);
+	} else {
+           $cmd = sprintf('%s "%s" %s', PHP_BINARY, __FILE__, WORKER_ARGV_VALUE);
+        }
 
         $this->workerHandle = proc_open($cmd, [['pipe', 'r'], ['pipe', 'w'], STDERR], $pipes);
         $this->workerStdIn = $pipes[0];
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 12:01:27 2024 UTC