]> granicus.if.org Git - php/commitdiff
Fix Bug #23221 Pear installer - extension re-install segfault
authorTomas V.V.Cox <cox@php.net>
Fri, 10 Oct 2003 17:13:37 +0000 (17:13 +0000)
committerTomas V.V.Cox <cox@php.net>
Fri, 10 Oct 2003 17:13:37 +0000 (17:13 +0000)
pear/PEAR/Installer.php

index 257e00bbd11ec0b2b6447e1ff68d9703b37fc49c..184cc2572777e5d13eca590c8474ef460dfc8808 100644 (file)
@@ -1154,6 +1154,11 @@ class PEAR_Installer extends PEAR_Common
                 $this->log(1, "\nBuild process completed successfully");
                 foreach ($built as $ext) {
                     $bn = basename($ext['file']);
+                    list($_ext_name, ) = explode('.', $bn);
+                    if (extension_loaded($_ext_name)) {
+                        $this->raiseError("Extension '$_ext_name' already loaded. Please unload it ".
+                                          "in your php.ini file prior to install or upgrade it.");
+                    }
                     $dest = $this->config->get('ext_dir') . DIRECTORY_SEPARATOR . $bn;
                     $this->log(1, "Installing '$bn' at ext_dir ($dest)");
                     $this->log(3, "+ cp $ext[file] ext_dir ($dest)");