diff options
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-x | scripts/TestUtil.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py index acbe750e4b5..251ad754ff1 100755 --- a/scripts/TestUtil.py +++ b/scripts/TestUtil.py @@ -560,15 +560,21 @@ def phpSetup(clientConfig = False, iceOptions = None, iceProfile = None): # # If ICE_HOME points to the installation directory of a source build, the # PHP extension will be located in $ICE_HOME/php. For an RPM installation, - # PHP is already configured to load the extension. (We could also execute - # "php -m" and check if the output includes "ice".) + # the extension should already be in PHP's default extension directory so + # we don't need to set extension_dir. + # + # We start PHP with "php -n". The -n option causes PHP to ignore its + # default configuration file(s). We do this to suppress any warnings + # that PHP might generate when it can't find its default extensions after + # we modify extension_dir. Even if we don't define extension_dir, we still + # need to add "extension = IcePHP.<ext>". # extDir = os.path.join(iceHome, "php") incDir = extDir if not os.path.exists(os.path.join(extDir, ext)): if iceHome == "/usr": - extDir = None # Assume PHP is already configured to load the extension. + extDir = None # Assume the extension is already in PHP's extension_dir. # # On SLES11, the PHP run time files are installed in /usr/share/php5, but # this directory is not in the default include path when you specify an @@ -587,7 +593,7 @@ def phpSetup(clientConfig = False, iceOptions = None, iceProfile = None): tmpini.write("; Automatically generated by Ice test driver.\n") if extDir: tmpini.write("extension_dir=\"%s\"\n" % extDir) - tmpini.write("extension=%s\n" % ext) + tmpini.write("extension=%s\n" % ext) if incDir: tmpini.write("include_path=\"%s\"\n" % incDir) if iceProfile != None: |