summaryrefslogtreecommitdiff
path: root/scripts/TestUtil.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2014-11-06 13:26:58 -0800
committerMark Spruiell <mes@zeroc.com>2014-11-06 13:26:58 -0800
commit817a210712b81cfafcf90cda21ba3ada6d6435c5 (patch)
tree830f2a837922350e29d29f80f6a77f7b9b8e29a9 /scripts/TestUtil.py
parentLots of small changes and cleanups as suggested by IntelliJ. (diff)
downloadice-817a210712b81cfafcf90cda21ba3ada6d6435c5.tar.bz2
ice-817a210712b81cfafcf90cda21ba3ada6d6435c5.tar.xz
ice-817a210712b81cfafcf90cda21ba3ada6d6435c5.zip
ICE-5848 - PHP extension not loading
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-xscripts/TestUtil.py14
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: