summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--php/CHANGES4
-rw-r--r--php/INSTALL403
-rw-r--r--php/Makefile69
-rwxr-xr-xphp/Makefile.mak43
-rwxr-xr-xphp/allTests.py30
-rw-r--r--php/config/Make.rules227
-rw-r--r--php/config/Make.rules.mak92
-rw-r--r--php/config/Make.rules.msvc46
-rw-r--r--php/config/TestUtil.py237
-rwxr-xr-xphp/config/makedepend.py35
-rwxr-xr-xphp/configure.gzbin349926 -> 0 bytes
-rw-r--r--php/icephp.dsw29
-rw-r--r--php/src/IcePHP/.depend6
-rw-r--r--php/src/IcePHP/Communicator.cpp (renamed from php/src/ice/communicator.cpp)14
-rw-r--r--php/src/IcePHP/Communicator.h (renamed from php/src/ice/ice_communicator.h)6
-rw-r--r--php/src/IcePHP/Config.h (renamed from php/src/ice/ice_common.h)37
-rw-r--r--php/src/IcePHP/Init.cpp (renamed from php/src/ice/ice.cpp)21
-rw-r--r--php/src/IcePHP/Makefile39
-rw-r--r--php/src/IcePHP/Makefile.mak45
-rw-r--r--php/src/IcePHP/Marshal.cpp (renamed from php/src/ice/marshal.cpp)12
-rw-r--r--php/src/IcePHP/Marshal.h (renamed from php/src/ice/ice_marshal.h)6
-rw-r--r--php/src/IcePHP/Profile.cpp (renamed from php/src/ice/profile.cpp)8
-rw-r--r--php/src/IcePHP/Profile.h (renamed from php/src/ice/ice_profile.h)6
-rw-r--r--php/src/IcePHP/Proxy.cpp (renamed from php/src/ice/proxy.cpp)43
-rw-r--r--php/src/IcePHP/Proxy.h (renamed from php/src/ice/ice_proxy.h)8
-rw-r--r--php/src/IcePHP/Util.cpp (renamed from php/src/ice/util.cpp)9
-rw-r--r--php/src/IcePHP/Util.h (renamed from php/src/ice/ice_util.h)6
-rw-r--r--php/src/Makefile24
-rw-r--r--php/src/Makefile.mak19
-rw-r--r--php/src/ice/.cvsignore3
-rw-r--r--php/src/ice/config.m457
-rw-r--r--php/src/ice/php_ice.dsp169
-rw-r--r--php/src/ice/php_ice.h62
33 files changed, 1000 insertions, 815 deletions
diff --git a/php/CHANGES b/php/CHANGES
index 8f7bd621ae3..2eb792a43c9 100644
--- a/php/CHANGES
+++ b/php/CHANGES
@@ -3,6 +3,10 @@ NOTE: Please keep changes in the appropriate section for HEAD or 3.1.
Changes since version 3.1.1 (HEAD)
---------------------------
+- The supported platforms for IcePHP are now Linux and Windows XP.
+ The process for building IcePHP on Linux has also changed; see the
+ INSTALL file for details.
+
- Added UnexpectedObjectException. This exception is raised if you
use Slice classes and client and server are compiled with mismatched
Slice definitions. Alternatively, this exception is raised if you
diff --git a/php/INSTALL b/php/INSTALL
index 56ab08c496f..08b4c429c43 100644
--- a/php/INSTALL
+++ b/php/INSTALL
@@ -2,275 +2,36 @@
Requirements
=========================================================================
-- PHP 5.1.4 (http://www.php.net/downloads.php)
+- PHP 5.2.0 (http://www.php.net/downloads.php)
- Ice for C++ @ver@ Development Kit
=========================================================================
-Building PHP with the Ice extension (Linux/Solaris/HP-UX/MacOS X/AIX)
+Building PHP with the Ice extension (Linux)
=========================================================================
-PHP's build system can create several versions of the PHP interpreter.
-There are the command-line interface (CLI) and Common Gateway
-Interface (CGI) interpreters, both of which are standalone
-executables. In addition, the build system can package the interpreter
-as a shared library for use as a Web server module.
+This source distribution only supports building IcePHP as a dynamic
+PHP extension; the product of the build is a shared library that you
+must configure PHP to load.
-To further complicate matters, PHP extensions (such as the Ice
-extension) can be either static or dynamic. A static extension is
-compiled into the interpreter, whereas a dynamic extension is created
-as a standalone shared library that is installed in PHP via
-configuration directives.
+Follow the steps below to build IcePHP:
-The Ice extension for PHP supports both static and dynamic
-configurations. The only supported way to compile the Ice extension is
-as part of the larger PHP build process. Unfortunately, PHP's build
-system does not completely accommodate extensions written in C++,
-therefore some manual intervention is required on certain platforms.
+1. Edit config/Make.rules and review the build settings. For example,
+ you may want to enable OPTIMIZE. If your PHP installation resides
+ in a non-standard location, modify the PHP_HOME setting to contain
+ the installation directory.
-If you are compiling PHP as a Web server module, please be aware that
-you will likely also need to install the Web server's development kit.
-For example, the apxs utility is required to build PHP for Apache, and
-this utility is not typically included in an Apache run time
-installation. You must either build Apache from source, or install an
-additional package that contains Apache's development tools.
+2. Set the ICE_HOME environment variable to the directory containing
+ your Ice installation. For example, if Ice is installed in
+ /opt/Ice-@ver@, set ICE_HOME as follows:
+ $ export ICE_HOME=/opt/Ice-@ver@
-Adding the Ice extension
-------------------------
+ If you installed Ice using RPMs, set ICE_HOME as shown below:
-After downloading and extracting the PHP5 source code, you must
-incorporate the Ice extension sources into the PHP5 source tree.
-There are two ways to do this:
+ $ export ICE_HOME=/usr
-1) Copy the extension source directory.
-
- $ cd <icephpdir>
- $ cp -r src/ice <phpdir>/ext
-
-2) Create a symbolic link to the extension:
-
- $ cd <phpdir>/ext
- $ ln -s <icephpdir>/src/ice ice
-
-
-Updating configure
-------------------
-
-In order to make the PHP build system aware of the Ice extension, the
-configure script must be updated. The IcePHP distribution includes
-a replacement script that you can install:
-
-$ cd <phpdir>
-$ cp <icephpdir>/configure.gz .
-$ gunzip configure.gz
-
-Alternatively, you can regenerate the configure script yourself if you
-have the necessary utilities installed on your system:
-
-$ cd <phpdir>
-$ rm -rf configure autom4te.cache
-$ ./buildconf --force
-
-
-Running configure
------------------
-
-Set the CC and CXX environment variables to the names of your C and
-C++ compilers, respectively.
-
-You are now ready to configure PHP. To include support for a static
-Ice extension, use the --with-ice option to specify the location of
-the Ice installation:
-
-$ ./configure --with-ice=$ICE_HOME ...
-
-If you want to build a dynamic Ice extension, use this version of the
---with-ice option:
-
-$ ./configure --with-ice=shared,$ICE_HOME ...
-
-Note that additional configuration options may be generally necessary.
-Please refer to the PHP documentation for more information.
-
-
-Source patches
---------------
-
-The following changes are necessary on AIX:
-
-- Edit the file <phpdir>/Zend/zend_language_parser.c and remove line
- 2582, indicated below:
-
- int
- yyparse ()
- ; /* REMOVE THIS LINE */
-
-- Edit the file <phpdir>/Zend/zend_ini_parser.c and remove line 1078,
- indicated below:
-
- int
- yyparse ()
- ; /* REMOVE THIS LINE */
-
-
-Platform-specific Issues
-------------------------
-
-Please refer to the relevant section for your platform below before
-proceeding any further.
-
-
-Build PHP
----------
-
-Finally, run make:
-
-$ make
-
-Note that if the Ice extension's config.m4 file is changed, then you
-must repeat the steps above to regenerate the configure script, then
-execute configure again (or use config.nice instead).
-
-See the PHP documentation for more details on the PHP build process.
-
-
-=========================================================================
-Additional Requirements for Linux with GCC
-=========================================================================
-
-If you are building the Ice extension in a dynamic configuration,
-edit the file <phpdir>/Makefile and add the following definition:
-
- EXTRA_CXXFLAGS = -DCOMPILE_DL_ICE
-
-
-=========================================================================
-Additional Requirements for Solaris with Sun CC
-=========================================================================
-
-1. Edit the file <phpdir>/libtool, search for the line beginning with
- "archive_cmds=", and change \$LD to \$CXX in the value of both
- archive_cmds and archive_expsym_cmds.
-
-2. Edit the file <phpdir>/Makefile and add -D__sparc__ to CFLAGS.
-
-3. If you are building the Ice extension in a dynamic configuration,
- edit the file <phpdir>/Makefile and add the following definition:
-
- EXTRA_CXXFLAGS = -DCOMPILE_DL_ICE
-
-4. If you are building the Ice extension in a static configuration,
- edit the file <phpdir>/Makefile and make the following changes:
-
- - If the command-line interpreter is being built, search for the
- definition of the BUILD_CLI variable and change "$(CC)" to
- "$(CXX)".
-
- - If the CGI interpreter is being built, search for the definition
- of the BUILD_CGI variable and change "$(CC)" to "$(CXX)".
-
- - If a Web server module is being built, search for the line
- beginning with "libphp5.la:", and change "$(CC)" to "$(CXX)" in
- that rule, as well as in the rule for "libs/libphp5.bundle"
- below.
-
-Note that PHP 5 cannot be compiled using Sun CC 5.3.
-
-
-=========================================================================
-Additional Requirements for HP-UX with aCC
-=========================================================================
-
-The Ice extension currently cannot be used in a dynamic configuration.
-To build the Ice extension in a static configuration:
-
-- Edit the file <phpdir>/libtool, search for the line beginning with
- "archive_cmds=", and change \$LD to \$CXX.
-
-- Edit the file <phpdir>/Makefile and make the following changes:
-
- - Append "-lxnet" to EXTRA_LIBS, as shown below:
-
- EXTRA_LIBS = -lm -lnsl -lIce -lSlice -lIceUtil -lxnet
-
- - Add a definition for EXTRA_CXXFLAGS. For 32-bit platforms, use the
- following setting:
-
- EXTRA_CXXFLAGS = -AA +Z -mt +DA2.0N
-
- For 64-bit platforms, use this setting:
-
- EXTRA_CXXFLAGS = -AA +Z -mt +DD64
-
- - Modify EXTRA_LDFLAGS_PROGRAM to append "$(EXTRA_CXXFLAGS) -Wl,+s"
-
- - If the command-line interpreter is being built, search for the
- definition of the BUILD_CLI variable and change "$(CC)" to
- "$(CXX)".
-
- - If the CGI interpreter is being built, search for the definition
- of the BUILD_CGI variable and change "$(CC)" to "$(CXX)".
-
- - If a Web server module is being built, search for the line
- beginning with "libphp5.la:", and change "$(CC)" to "$(CXX)" in
- that rule, as well as in the rule for "libs/libphp5.bundle" below.
-
-
-=========================================================================
-Additional Requirements for MacOS X
-=========================================================================
-
-Edit the file <phpdir>/libtool, search for the line beginning with
-"archive_cmds=", and change \$CC to \$CXX.
-
-If you are building the Ice extension in a static configuration, edit
-the file <phpdir>/Makefile and make the following changes:
-
-- If the command-line interpreter is being built, search for the
- definition of the BUILD_CLI variable and change "$(CC)" to "$(CXX)".
-
-- If the CGI interpreter is being built, search for the definition of
- the BUILD_CGI variable and change "$(CC)" to "$(CXX)".
-
-- If a Web server module is being built, search for the line beginning
- with "libphp5.la:", and change "$(CC)" to "$(CXX)" in that rule, as
- well as in the rule for "libs/libphp5.bundle" below.
-
-If you are building the Ice extension in a dynamic configuration,
-edit the file <phpdir>/Makefile and add the following definition:
-
- EXTRA_CXXFLAGS = -DCOMPILE_DL_ICE
-
-
-=========================================================================
-Additional Requirements for AIX with VisualAge 6.0
-=========================================================================
-
-The Ice extension currently cannot be used in a dynamic configuration.
-To build the Ice extension in a static configuration:
-
-- Edit the file <phpdir>/Makefile and make the following changes:
-
- - Add a definition for EXTRA_CXXFLAGS. For 32-bit platforms, use the
- following setting:
-
- EXTRA_CXXFLAGS = -brtl -qrtti=all -qstaticinline -D_LARGE_FILES
-
- For 64-bit platforms, use this setting:
-
- EXTRA_CXXFLAGS = -brtl -qrtti=all -qstaticinline
-
- - If the command-line interpreter is being built, search for the
- definition of the BUILD_CLI variable and change "$(CC)" to
- "$(CXX)".
-
- - If the CGI interpreter is being built, search for the definition
- of the BUILD_CGI variable and change "$(CC)" to "$(CXX)".
-
- - If a Web server module is being built, search for the line
- beginning with "libphp5.la:", and change "$(CC)" to "$(CXX)" in
- that rule, as well as in the rule for "libs/libphp5.bundle" below.
+3. Run make.
=========================================================================
@@ -295,80 +56,82 @@ distribution results in undefined behavior.
To use a later version of Visual C++, you must obtain (or build) PHP5
with the desired compiler, and use the same compiler to build the Ice
-extension.
+extension. Refer to the PHP documentation for instructions on building
+PHP5 from source.
Follow these instructions to build the Ice extension:
1) Download and extract the PHP5 sources so that the PHP header files
- are available.
+ are available. (It is not necessary for you to build PHP5 from
+ sources.)
-2) Download and extract the PHP5 binary distribution for Windows.
+2) Open a command window.
-3) Have a suitable Ice development environment.
+3) Set the ICE_HOME environment variable to the location of your Ice
+ installation. For example:
-4) Configure the include and library paths in Visual C++ for PHP and
- Ice. Assuming that you've extracted the PHP5 sources into C:\PHP5,
- the binary distribution into C:\PHP5-Win32, and installed Ice into
- C:\Ice, then the following paths must be configured:
+ > set ICE_HOME=C:\Ice-@ver@-VC60
- Include:
- C:\PHP5
- C:\PHP5\main
- C:\PHP5\Zend
- C:\PHP5\TSRM
- C:\Ice\include
+4) Change to the IcePHP source directory.
- Library:
- C:\PHP5-Win32\dev
- C:\Ice\lib
+5) Open config\Make.rules.mak, review the comments, and make any
+ necessary changes.
- If you are using Visual C++ 6.0, then you must also be sure to
- include the appropriate paths for STLport.
+6) Start NMAKE:
-4) Open the workspace icephp.dsw, select the Debug or Release
- configuration, and build php_ice.dll. Note that the Ice extension
- must be compiled using the same Debug/Release configuration as PHP
- itself. If you are linking against the dynamic libraries included
- in the binary PHP distribution, you must use the Release
- configuration when compiling the Ice extension.
+ > nmake /f Makefile.mak
+
+7) Upon successful completion, the IcePHP extension is created as
+ bin\php_ice.dll (Release) or bin\php_iced.dll (Debug).
=========================================================================
-Installing a Dynamic Extension
+Installing the Extension
=========================================================================
-If you are using the dynamic Ice extension, you must move the
-extension's shared library into PHP's extension directory. This
-directory is determined by the PHP configuration directive
-"extension_dir". You can determine the default value for this
-directive by running the command-line version of PHP with the -i
-option.
+To install the Ice extension, you must move the extension's shared
+library into PHP's extension directory. This directory is determined
+by the PHP configuration directive "extension_dir". You can determine
+the default value for this directive by running the command-line
+version of PHP with the -i option:
+
+> php -i
+...
+extension_dir => C:\php5 => C:\php5
+...
-After compiling the dynamic extension on Linux and Solaris, the shared
-library can be found in the "modules" subdirectory of the PHP source
-tree. If you've compiled the dynamic Ice extension on Windows, the
-DLL is located in bin/debug/php_ice.dll or bin/release/php_ice.dll,
-depending on the build configuration you selected.
+After successfully building the extension on Linux, the shared library
+can be found in lib/IcePHP.so. On Windows, the DLL is located in
+bin/debug/php_ice.dll or bin/release/php_ice.dll, depending on the
+build configuration you selected.
-Once you've copied the dynamic extension to PHP's extension directory,
-you will need to enable the extension in PHP configuration. In php.ini,
-use the following directive on Linux and Solaris:
+Once you've copied the extension to PHP's extension directory, you
+will need to enable the extension in your PHP configuration. In the
+php.ini file, use the following directive on Linux:
-extension = ice.so
+extension = IcePHP.so
On Windows, use this directive:
extension = php_ice.dll
+You can use the "php -i" command to determine the proper directory in
+which to place the php.ini file:
+
+> php -i
+...
+Configuration File (php.ini) Path => C:\WINDOWS
+...
+
=========================================================================
Dependencies
=========================================================================
-Whether you build a dynamic or static Ice extension, PHP will need
-to be able to locate the Ice run-time libraries "Ice", "Slice",
-"IceUtil" and "bzip2" (Windows) or "libbz2" (Unix). In general, these
-libraries must reside in a directory of the user's PATH.
+PHP will need to be able to locate the Ice run-time libraries "Ice",
+"Slice", "IceUtil" and "bzip2" (Windows) or "libbz2" (Unix). In
+general, these libraries must reside in a directory of the user's
+PATH.
For Web servers, the libraries may need to reside in a system
directory. For example, on Linux you can add the directory containing
@@ -381,7 +144,7 @@ examining the output of the "php -m" command, or by calling the
phpinfo() function from a script.
Note that if you want to use IceSSL from the Ice extension, then PHP
-will also need access to the shared library for IceSSL.
+will also need access to the shared libraries for IceSSL and OpenSSL.
Finally, the Ice extension will need to execute the Ice preprocessor
(icecpp), therefore this binary must reside in an accessible directory.
@@ -391,26 +154,32 @@ Finally, the Ice extension will need to execute the Ice preprocessor
SELinux Notes
=========================================================================
-On Fedora Linux and a number of other Linux distributions, SELinux
-augments the traditional Unix permissions with a number of new features.
-In particular, SELinux can prevent the httpd daemon from opening
-network connections and reading files without the proper SELinux types.
+SELinux augments the traditional Unix permissions with a number of
+new features. In particular, SELinux can prevent the httpd daemon from
+opening network connections and reading files without the proper
+SELinux types.
If you suspect that your IcePHP application does not work due to
-SELinux restrictions, we recommend to first try with SELinux disabled.
-As root, run:
+SELinux restrictions, we recommend that you first try it with SELinux
+disabled. As root, run:
# setenforce 0
to disable SELinux until the next reboot of your computer.
-If you want to run httpd with IcePHP and SELinux enabled, you need to:
- - allow httpd to open network connections:
+If you want to run httpd with IcePHP and SELinux enabled, you must do
+the following:
+
+- Allow httpd to open network connections:
+
# setsebool httpd_can_network_connect=1
- (use the -P option to make this setting persistent across reboots)
- - make sure any .ice file used by your PHP scripts can be read by
+
+ (add the -P option to make this setting persistent across reboots)
+
+- Make sure any .ice file used by your PHP scripts can be read by
httpd. The enclosing directory also needs to be accessible. For
example:
+
# chcon -R -t httpd_sys_content_t /opt/MyApp/slice
See this FAQ for more information on SELinux:
@@ -428,8 +197,7 @@ or later, and the Ice for C++ tests must be built in the directory
specified by the ICE_HOME environment variable.
The test scripts require that the CLI version of the PHP interpreter
-be available in your PATH, and assume that the Ice extension was
-built in a static configuration.
+be available in your PATH.
To run all of the tests, do the following:
@@ -439,10 +207,3 @@ You can also run tests individually by changing to the test directory
and running this command:
$ python run.py
-
-In order to run the tests using a dynamic Ice extension, you will
-need to edit the php.ini files in each test directory and add the
-following configuration directives:
-
-extension_dir=<phpdir>/modules
-extension=ice.so
diff --git a/php/Makefile b/php/Makefile
new file mode 100644
index 00000000000..860765b4ff0
--- /dev/null
+++ b/php/Makefile
@@ -0,0 +1,69 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = .
+
+include $(top_srcdir)/config/Make.rules
+
+SUBDIRS = src
+
+INSTALL_SUBDIRS = $(install_libdir) $(install_slicedir)
+
+install::
+ @if test ! -d $(prefix) ; \
+ then \
+ echo "Creating $(prefix)..." ; \
+ $(call mkdir,$(prefix)) ; \
+ fi
+ @for subdir in $(INSTALL_SUBDIRS); \
+ do \
+ if test ! -d $$subdir ; \
+ then \
+ echo "Creating $$subdir..." ; \
+ mkdir -p $$subdir ; \
+ chmod a+rx $$subdir ; \
+ fi ; \
+ done
+
+$(EVERYTHING)::
+ @for subdir in $(SUBDIRS); \
+ do \
+ echo "making $@ in $$subdir"; \
+ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \
+ done
+
+install::
+ @if test -d slice ; \
+ then \
+ cd slice ; \
+ for i in * ; \
+ do \
+ if test ! -d $(install_slicedir)/$$i ; \
+ then \
+ echo "Creating $(install_slicedir)/$$i..." ; \
+ mkdir $(install_slicedir)/$$i ; \
+ chmod a+rx $(install_slicedir)/$$i ; \
+ fi ; \
+ cd $$i ; \
+ for f in *.ice ; \
+ do \
+ echo "Installing $$i/$$f" ; \
+ $(INSTALL_DATA) $$f $(install_slicedir)/$$i ; \
+ chmod a+r $(install_slicedir)/$$i/$$f ; \
+ done ; \
+ cd .. ; \
+ done \
+ fi
+
+install::
+ $(call installdata,ICE_LICENSE,$(prefix))
+ $(call installdata,LICENSE,$(prefix))
+
+test::
+ @python $(top_srcdir)/allTests.py
diff --git a/php/Makefile.mak b/php/Makefile.mak
new file mode 100755
index 00000000000..372f49d2f0a
--- /dev/null
+++ b/php/Makefile.mak
@@ -0,0 +1,43 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = .
+
+!include $(top_srcdir)\config\Make.rules.mak
+
+SUBDIRS = src ruby
+
+INSTALL_SUBDIRS = $(install_rubydir) $(install_slicedir)
+
+install::
+ @if not exist $(prefix) \
+ @echo "Creating $(prefix)..." & \
+ mkdir $(prefix)
+
+ @for %i in ( $(INSTALL_SUBDIRS) ) do \
+ @if not exist %i \
+ @echo "Creating %i..." & \
+ mkdir %i
+
+$(EVERYTHING)::
+ @for %i in ( $(SUBDIRS) ) do \
+ @echo "making $@ in %i" & \
+ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1
+
+install::
+ @if exist slice \
+ @echo "making $@ in slice" & \
+ cmd /c "cd slice & $(MAKE) -nologo -f Makefile.mak $@" || exit 1
+
+install::
+ copy ICE_LICENSE $(prefix)
+ copy LICENSE $(prefix)
+
+test::
+ @python $(top_srcdir)/allTests.py
diff --git a/php/allTests.py b/php/allTests.py
index 7ebd855328e..6bbf8e916c0 100755
--- a/php/allTests.py
+++ b/php/allTests.py
@@ -18,10 +18,7 @@ for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
else:
raise "can't find toplevel directory!"
-sys.path.append(os.path.join(toplevel, "config"))
-import TestUtil
-
-def runTests(tests, num = 0):
+def runTests(args, tests, num = 0):
#
# Run each of the tests.
@@ -37,7 +34,7 @@ def runTests(tests, num = 0):
print "*** running tests in " + dir,
print
- status = os.system(os.path.join(dir, "run.py"))
+ status = os.system("python " + os.path.join(dir, "run.py " + args))
if status and not (sys.platform.startswith("aix") and status == 256):
if(num > 0):
@@ -60,11 +57,12 @@ tests = [ \
]
def usage():
- print "usage: " + sys.argv[0] + " [-l]"
+ print "usage: " + sys.argv[0] + " -l -r <regex> -R <regex> --debug --protocol protocol --compress --host host --threadPerConnection"
sys.exit(2)
try:
- opts, args = getopt.getopt(sys.argv[1:], "l")
+ opts, args = getopt.getopt(sys.argv[1:], "lr:R:", \
+ ["debug", "protocol=", "compress", "host=", "threadPerConnection"])
except getopt.GetoptError:
usage()
@@ -72,14 +70,28 @@ if(args):
usage()
loop = 0
+args = ""
for o, a in opts:
if o == "-l":
loop = 1
+ if o == "-r" or o == '-R':
+ import re
+ regexp = re.compile(a)
+ if o == '-r':
+ def rematch(x): return regexp.search(x)
+ else:
+ def rematch(x): return not regexp.search(x)
+ tests = filter(rematch, tests)
+ if o in ( "--protocol", "--host" ):
+ args += " " + o + " " + a
+ if o in ( "--debug", "--compress", "--threadPerConnection" ):
+ args += " " + o
+
if loop:
num = 1
while 1:
- runTests(tests, num)
+ runTests(args, tests, num)
num += 1
else:
- runTests(tests)
+ runTests(args, tests)
diff --git a/php/config/Make.rules b/php/config/Make.rules
new file mode 100644
index 00000000000..861f7850681
--- /dev/null
+++ b/php/config/Make.rules
@@ -0,0 +1,227 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+ifndef ICE_HOME
+ $(error ICE_HOME is not defined)
+endif
+
+#
+# Select an installation base directory. The directory will be created
+# if it does not exist.
+#
+
+prefix = /opt/IcePHP-$(VERSION)
+
+#
+# The "root directory" for runpath embedded in executables. Can be unset
+# to avoid adding a runpath to Ice executables.
+#
+embedded_runpath_prefix ?= /opt/Ice-$(VERSION_MAJOR).$(VERSION_MINOR)
+
+#
+# Define OPTIMIZE as yes if you want to build with optimization.
+# Otherwise the Ice extension is built with debug information.
+#
+
+#OPTIMIZE = yes
+
+#
+# Define LP64 as yes if you want to build in 64 bit mode on a platform
+# that supports both 32 and 64 bit.
+#
+#LP64 := yes
+
+#
+# The values below can be overridden by defining them as environment
+# variables.
+#
+
+#
+# If you've built PHP yourself then set PHP_HOME to contain the
+# installation directory; the rest of the PHP-related settings
+# should be correct.
+#
+# If you've installed a distribution, or PHP was included with
+# your system, then you likely need to review the values of
+# PHP_INCLUDE_DIR and PHP_LIB_DIR.
+#
+PHP_HOME ?= /opt/php
+
+ifeq ($(shell test -d $(PHP_HOME) && echo 0),0)
+ PHP_INCLUDE_DIR = $(PHP_HOME)/include/php
+ PHP_LIB_DIR = $(PYTHON_HOME)/lib/php
+else
+ PHP_INCLUDE_DIR = /usr/include/php
+ PHP_LIB_DIR = /usr/lib/php
+endif
+
+PHP_FLAGS ?= -I$(PHP_INCLUDE_DIR) -I$(PHP_INCLUDE_DIR)/main -I$(PHP_INCLUDE_DIR)/Zend \
+ -I$(PHP_INCLUDE_DIR)/TSRM
+
+
+# ----------------------------------------------------------------------
+# Don't change anything below this line!
+# ----------------------------------------------------------------------
+
+SHELL = /bin/sh
+VERSION_MAJOR = 3
+VERSION_MINOR = 2
+VERSION_PATCH = 0
+VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
+SOVERSION = $(VERSION_MAJOR)$(VERSION_MINOR)
+libdir = $(top_srcdir)/lib
+
+install_slicedir = $(prefix)/slice
+
+INSTALL = cp -fp
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_LIBRARY = ${INSTALL}
+INSTALL_DATA = ${INSTALL}
+
+UNAME := $(shell uname)
+
+#
+# Platform specific definitions
+#
+ifeq ($(shell test -f $(top_srcdir)/config/Make.rules.$(UNAME) && echo 0),0)
+ configdir = $(top_srcdir)/config
+else
+ configdir = $(ICE_HOME)/config
+endif
+include $(configdir)/Make.rules.$(UNAME)
+
+ifeq ($(LP64),yes)
+ ICE_LIBS = -L$(ICE_HOME)/lib64 -L$(ICE_HOME)/lib -lIce -lIceUtil -lSlice
+else
+ ICE_LIBS = -L$(ICE_HOME)/lib -lIce -lIceUtil -lSlice
+endif
+
+ICE_FLAGS = -I$(ICE_HOME)/include
+
+ifeq ($(shell test -d $(top_srcdir)/slice && echo 0),0)
+ slicedir = $(top_srcdir)/slice
+else
+ slicedir = $(ICE_HOME)/slice
+endif
+
+ifeq ($(LP64),yes)
+#
+# TODO: Where should the shared library be installed if it is a 64 bit
+# build.
+#
+ install_libdir = $(prefix)/lib
+else
+ install_libdir = $(prefix)/lib
+endif
+
+ifeq ($(LP64),yes)
+ libsubdir := lib$(lp64suffix)
+else
+ libsubdir := lib
+endif
+
+ifneq ($(embedded_runpath_prefix),)
+ ifeq ($(LP64),yes)
+ runpath_libdir := $(embedded_runpath_prefix)/lib$(lp64suffix)
+ else
+ runpath_libdir := $(embedded_runpath_prefix)/lib
+ endif
+endif
+
+CPPFLAGS =
+ICECPPFLAGS = -I$(slicedir)
+
+LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir)
+
+#
+# Default functions for shared library names. A Python extension library
+# cannot have a "lib" prefix, so Python-specific functions are defined.
+#
+
+ifeq ($(mklibfilename),)
+ mklibfilename = $(if $(2),lib$(1).so.$(2),lib$(1).so)
+endif
+
+ifeq ($(mksoname),)
+ mksoname = $(if $(2),lib$(1).so.$(2),lib$(1).so)
+endif
+
+ifeq ($(mklibname),)
+ mklibname = lib$(1).so
+endif
+
+ifndef mklibtargets
+ mklibtargets = $(1) $(2) $(3)
+endif
+
+ifeq ($(mkshlib),)
+ $(error You need to define mkshlib in Make.rules.$(UNAME))
+endif
+
+ifeq ($(installlib),)
+ installlib = $(INSTALL) $(2)/$(3) $(1); \
+ rm -f $(1)/$(4); ln -s $(3) $(1)/$(4); \
+ rm -f $(1)/$(5); ln -s $(4) $(1)/$(5); \
+ chmod a+rx $(1)/$(3)
+endif
+
+ifeq ($(installphplib),)
+ installphplib = $(INSTALL) $(1) $(2); \
+ chmod a+rx $(2)/$(notdir $(1))
+endif
+
+ifeq ($(installdata),)
+ installdata = $(INSTALL_DATA) $(1) $(2); \
+ chmod a+r $(2)/$(notdir $(1))
+endif
+
+ifeq ($(installprogram),)
+ installprogram = $(INSTALL_PROGRAM) $(1) $(2); \
+ chmod a+rx $(2)/$(notdir $(1))
+endif
+
+ifeq ($(mkdir),)
+ mkdir = mkdir $(1) ; \
+ chmod a+rx $(1)
+endif
+
+#
+# We don't need the "lib" prefix.
+#
+mkphplibname = $(subst lib,,$(call mklibname,$(1)))
+
+EVERYTHING = all depend clean install
+
+.SUFFIXES:
+.SUFFIXES: .cpp .o .py
+
+all:: $(SRCS)
+
+.cpp.o:
+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
+
+clean::
+ -rm -f $(TARGETS)
+ -rm -f core *.o *.bak
+
+all:: $(SRCS) $(TARGETS)
+
+depend:: $(SRCS) $(SLICE_SRCS)
+ -rm -f .depend
+ if test -n "$(SRCS)" ; then \
+ $(CXX) -DMAKEDEPEND -M $(CXXFLAGS) $(CPPFLAGS) $(SRCS) | \
+ $(configdir)/makedepend.py >> .depend; \
+ fi
+
+ifneq ($(TEMPLATE_REPOSITORY),)
+clean::
+ rm -fr $(TEMPLATE_REPOSITORY)
+endif
+
+install::
diff --git a/php/config/Make.rules.mak b/php/config/Make.rules.mak
new file mode 100644
index 00000000000..34d5090f084
--- /dev/null
+++ b/php/config/Make.rules.mak
@@ -0,0 +1,92 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+!if "$(ICE_HOME)" == ""
+!error ICE_HOME is not defined
+!endif
+
+#
+# Select an installation base directory. The directory will be created
+# if it does not exist.
+#
+
+prefix = C:\IcePHP-$(VERSION)
+
+#
+# Define OPTIMIZE as yes if you want to build with optimization.
+# Otherwise the Ice extension is built with debug information.
+#
+
+OPTIMIZE = yes
+
+#
+# Set PHP_HOME to your PHP source directory.
+#
+
+PHP_HOME = C:\php
+
+#
+# Set STLPORT_HOME to your STLPort installation directory.
+#
+STLPORT_HOME = C:\Ice-$(VERSION)-ThirdParty-VC60
+
+# ----------------------------------------------------------------------
+# Don't change anything below this line!
+# ----------------------------------------------------------------------
+
+SHELL = /bin/sh
+VERSION_MAJOR = 3
+VERSION_MINOR = 2
+VERSION_PATCH = 0
+VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
+SOVERSION = $(VERSION_MAJOR)$(VERSION_MINOR)
+bindir = $(top_srcdir)\bin
+libdir = $(top_srcdir)\lib
+
+!if exist ($(top_srcdir)\slice)
+slicedir = $(top_srcdir)\slice
+!else
+slicedir = $(ICE_HOME)\slice
+!endif
+
+install_libdir = $(prefix)\bin
+install_libdir = $(prefix)\lib
+install_slicedir = $(prefix)\slice
+
+!include $(top_srcdir)\config\Make.rules.msvc
+
+!if "$(OPTIMIZE)" != "yes"
+LIBSUFFIX = $(LIBSUFFIX)d
+!endif
+
+ICE_LIBS = ice$(LIBSUFFIX).lib iceutil$(LIBSUFFIX).lib slice$(LIBSUFFIX).lib
+
+ICE_CPPFLAGS = -I"$(ICE_HOME)\include"
+ICE_LDFLAGS = /LIBPATH:"$(ICE_HOME)\lib"
+
+PHP_CPPFLAGS = -I"$(PHP_HOME)" -I"$(PHP_HOME)\main" -I"$(PHP_HOME)\TSRM" -I"$(PHP_HOME)\Zend"
+
+ICECPPFLAGS = -I$(slicedir)
+
+EVERYTHING = all clean install
+
+.SUFFIXES:
+.SUFFIXES: .cpp .obj .rb
+
+all:: $(SRCS)
+
+.cpp.obj::
+ $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) $<
+
+clean::
+ del /q $(TARGETS) core *.obj *.bak
+
+all:: $(SRCS) $(TARGETS)
+
+install::
diff --git a/php/config/Make.rules.msvc b/php/config/Make.rules.msvc
new file mode 100644
index 00000000000..b6aba5a29d1
--- /dev/null
+++ b/php/config/Make.rules.msvc
@@ -0,0 +1,46 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+#
+# This file is included by Make.rules.mak when using MSVC.
+#
+
+CXX = cl.exe
+CC = cl.exe
+LINK = link.exe
+
+PREOUT = /out:
+PRELIBS =
+
+CPPFLAGS = -nologo -W3 -WX -GR -GX -FD -D_CONSOLE -I"$(STLPORT_HOME)\include\stlport"
+
+!if "$(OPTIMIZE)" == "yes"
+CPPFLAGS = $(CPPFLAGS) -MD -O2 -DNDEBUG
+!else
+CPPFLAGS = $(CPPFLAGS) -MDd -Zi -Gm -GZ -Od -D_DEBUG
+!endif
+
+LDFLAGS = /LIBPATH:"$(STLPORT_HOME)\lib" /LIBPATH:"$(top_srcdir)\lib" /nologo /FIXED:no
+
+!if "$(OPTIMIZE)" != "yes"
+LDFLAGS = $(LDFLAGS) /debug /incremental:yes
+!else
+LDFLAGS = $(LDFLAGS) /pdb:none /OPT:REF
+!endif
+
+LD_DLLFLAGS = $(LDFLAGS) /dll
+LD_EXEFLAGS = $(LDFLAGS)
+
+ICE_OS_LIBS = rpcrt4.lib advapi32.lib
+
+BASELIBS = iceutil$(LIBSUFFIX).lib $(ICE_OS_LIBS)
+LIBS = ice$(LIBSUFFIX).lib $(BASELIBS)
+
+BZIP2_LIBS = libbz2$(LIBSUFFIX).lib
+DB_LIBS = libdb45$(LIBSUFFIX).lib
diff --git a/php/config/TestUtil.py b/php/config/TestUtil.py
index 79b757c9f93..2c63aa668d6 100644
--- a/php/config/TestUtil.py
+++ b/php/config/TestUtil.py
@@ -13,53 +13,68 @@
# protocol. Otherwise TCP is used.
#
-#protocol = ""
-protocol = "ssl"
+protocol = ""
+#protocol = "ssl"
#
# Set compressed to 1 in case you want to run the tests with
# protocol compression.
#
-#compress = 0
-compress = 1
+compress = 0
+#compress = 1
#
-# Set the host to the host name the test servers are running on. If
-# not set, Ice will try to find out the IP address for the
-# hostname. If you DNS isn't set up propertly, you should therefore
-# use "localhost".
+# If you don't set "host" below, then the Ice library will try to find
+# out the IP address of this host. For the Ice test suite, it's best
+# to set the IP address explicitly to 127.0.0.1. This avoid problems
+# with incorrect DNS or hostname setups.
#
-#host = "someotherhost"
-host = "localhost"
+host = "127.0.0.1"
#
-# Don't change anything below this line!
+# To print the commands that are being run.
#
-import sys, os, re, errno
+debug = 0
+#debug = 1
+
+#
+# Don't change anything below this line!
+#
+import sys, os, errno, getopt
+from threading import Thread
+
+def usage():
+ print "usage: " + sys.argv[0] + " --debug --protocol protocol --compress --host host --threadPerConnection"
+ sys.exit(2)
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], "", ["debug", "protocol=", "compress", "host=", "threadPerConnection"])
+except getopt.GetoptError:
+ usage()
+
+for o, a in opts:
+ if o == "--debug":
+ debug = 1
+ if o == "--protocol":
+ protocol = a
+ if o == "--compress":
+ compress = 1
+ if o == "--threadPerConnection":
+ threadPerConnection = 1
+ if o == "--host":
+ host = a
#
# Check for ICE_HOME
#
-ice_home = os.environ["ICE_HOME"]
+ice_home = os.getenv("ICE_HOME", "")
if len(ice_home) == 0:
print "ICE_HOME is not defined"
sys.exit(1)
-def getIceVersion():
-
- config = open(os.path.join(ice_home, "include", "IceUtil", "Config.h"), "r")
- return re.search("ICE_STRING_VERSION \"([0-9\.]*)\"", config.read()).group(1)
-
-def getIceSoVersion():
- config = open(os.path.join(ice_home, "include", "IceUtil", "Config.h"), "r")
- intVersion = int(re.search("ICE_INT_VERSION ([0-9]*)", config.read()).group(1))
- majorVersion = intVersion / 10000
- minorVersion = intVersion / 100 - 100 * majorVersion
- return '%d' % (majorVersion * 10 + minorVersion)
-
def isCygwin():
# The substring on sys.platform is required because some cygwin
@@ -82,21 +97,81 @@ def isSolaris():
return 1
else:
return 0
-
+
+def closePipe(pipe):
+
+ try:
+ status = pipe.close()
+ except IOError, ex:
+ # TODO: There's a waitpid problem on CentOS, so we have to ignore ECHILD.
+ if ex.errno == errno.ECHILD:
+ status = 0
+ else:
+ raise
+
+ return status
+
+class ReaderThread(Thread):
+ def __init__(self, pipe):
+ self.pipe = pipe
+ Thread.__init__(self)
+
+ def run(self):
+
+ #print "started: " + str(self) + ": " + str(thread.get_ident())
+ try:
+ while 1:
+ line = self.pipe.readline()
+ if not line: break
+ # Suppress "adapter ready" messages. Under windows the eol isn't \n.
+ if not line.endswith(" ready\n") and not line.endswith(" ready\r\n"):
+ print "server: " + line,
+ except IOError:
+ pass
+
+ self.status = closePipe(self.pipe)
+ #print "terminating: " + str(self)
+
+ def getStatus(self):
+ return self.status
+
serverPids = []
+serverThreads = []
+allServerThreads = []
+
+def joinServers():
+ global serverThreads
+ global allServerThreads
+ for t in serverThreads:
+ t.join()
+ allServerThreads.append(t)
+ serverThreads = []
+
+def serverStatus():
+ global allServerThreads
+ joinServers()
+ for t in allServerThreads:
+ status = t.getStatus()
+ if status:
+ print "server " + str(t) + " status: " + str(status)
+ return status
+ return 0
+
def killServers():
global serverPids
+ global serverThreads
for pid in serverPids:
- if isCygwin():
- print "killServers(): not implemented for cygwin python."
- sys.exit(1)
- elif isWin32():
+
+ if isWin32():
try:
import win32api
handle = win32api.OpenProcess(1, 0, pid)
win32api.TerminateProcess(handle, 0)
+ except ImportError, ex:
+ print "Sorry: you must install the win32all package for killServers to work."
+ return
except:
pass # Ignore errors, such as non-existing processes.
else:
@@ -107,27 +182,61 @@ def killServers():
serverPids = []
-def getServerPid(serverPipe):
+ #
+ # Now join with all the threads
+ #
+ joinServers()
- output = serverPipe.readline().strip()
+def getServerPid(pipe):
+ global serverPids
+ global serverThreads
- if not output:
- print "failed!"
- killServers()
- sys.exit(1)
+ while 1:
+ output = pipe.readline().strip()
+ if not output:
+ print "failed!"
+ killServers()
+ sys.exit(1)
+ if output.startswith("warning: "):
+ continue
+ break
- serverPids.append(int(output))
+ try:
+ serverPids.append(int(output))
+ except ValueError:
+ print "Output is not a PID: " + output
+ raise
-def getAdapterReady(serverPipe):
+def ignorePid(pipe):
- output = serverPipe.readline().strip()
+ while 1:
+ output = pipe.readline().strip()
+ if not output:
+ print "failed!"
+ killServers()
+ sys.exit(1)
+ if output.startswith("warning: "):
+ continue
+ break
+
+def getAdapterReady(pipe, createThread = True):
+ global serverThreads
+
+ output = pipe.readline().strip()
if not output:
print "failed!"
killServers()
sys.exit(1)
-def waitServiceReady(pipe, token):
+ # Start a thread for this server.
+ if createThread:
+ serverThread = ReaderThread(pipe)
+ serverThread.start()
+ serverThreads.append(serverThread)
+
+def waitServiceReady(pipe, token, createThread = True):
+ global serverThreads
while 1:
output = pipe.readline().strip()
@@ -137,26 +246,19 @@ def waitServiceReady(pipe, token):
if output == token + " ready":
break
+ # Start a thread for this server.
+ if createThread:
+ serverThread = ReaderThread(pipe)
+ serverThread.start()
+ serverThreads.append(serverThread)
+
def printOutputFromPipe(pipe):
while 1:
- line = pipe.readline()
- if not line:
+ c = pipe.read(1)
+ if c == "":
break
- os.write(1, line)
-
-def closePipe(pipe):
-
- try:
- status = pipe.close()
- except IOError, ex:
- # TODO: There's a waitpid problem on CentOS, so we have to ignore ECHILD.
- if ex.errno == errno.ECHILD:
- status = 0
- else:
- raise
-
- return status
+ os.write(1, c)
for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
toplevel = os.path.normpath(toplevel)
@@ -208,33 +310,44 @@ clientOptions = clientProtocol + defaultHost
serverOptions = serverProtocol + defaultHost + commonServerOptions
clientServerOptions = clientServerProtocol + defaultHost + commonServerOptions
+if isWin32():
+ php = "php -d extension_dir=\"" + os.path.abspath(os.path.join(toplevel, "bin")) + "\" -d extension=php_ice.dll"
+else:
+ php = "php -d extension_dir=\"" + os.path.abspath(os.path.join(toplevel, "lib")) + "\" -d extension=IcePHP.so"
+
def clientServerTestWithOptionsAndNames(name, additionalServerOptions, additionalClientOptions, \
serverName, clientName):
testdir = os.path.join(toplevel, "test", name)
server = os.path.join(ice_home, "test", name, serverName)
- client = "php -c . -f " + clientName
+ client = php + " -c . -f " + clientName
cwd = os.getcwd()
os.chdir(testdir)
print "starting " + serverName + "...",
- serverPipe = os.popen(server + serverOptions + additionalServerOptions + " 2>&1")
+ serverCmd = server + serverOptions + additionalServerOptions
+ if debug:
+ print "(" + serverCmd + ")",
+ serverPipe = os.popen(serverCmd + " 2>&1")
getServerPid(serverPipe)
getAdapterReady(serverPipe)
print "ok"
print "starting " + clientName + "...",
- clientPipe = os.popen(client + " -- " + clientOptions + additionalClientOptions + " 2>&1")
+ clientCmd = client + " -- " + clientOptions + additionalClientOptions
+ if debug:
+ print "(" + clientCmd + ")",
+ clientPipe = os.popen(clientCmd + " 2>&1")
print "ok"
printOutputFromPipe(clientPipe)
clientStatus = closePipe(clientPipe)
- serverStatus = closePipe(serverPipe)
-
- if clientStatus or serverStatus:
+ if clientStatus:
killServers()
+
+ if clientStatus or serverStatus():
sys.exit(1)
os.chdir(cwd)
diff --git a/php/config/makedepend.py b/php/config/makedepend.py
new file mode 100755
index 00000000000..478bed85418
--- /dev/null
+++ b/php/config/makedepend.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import fileinput, re
+
+previous = ""
+
+for line in fileinput.input():
+ line = line.strip()
+
+ if re.compile("^#").search(line, 0):
+ continue;
+
+ if(previous):
+ line = previous + " " + line
+
+ if(line[-1] == "\\"):
+ previous = line[:-2]
+ continue
+ else:
+ previous = ""
+
+ for s in line.split():
+ if(s[0] != "/"):
+ print s,
+
+ print
+
diff --git a/php/configure.gz b/php/configure.gz
deleted file mode 100755
index 9db0d9e6013..00000000000
--- a/php/configure.gz
+++ /dev/null
Binary files differ
diff --git a/php/icephp.dsw b/php/icephp.dsw
deleted file mode 100644
index 7b0817e39c5..00000000000
--- a/php/icephp.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "php_ice"=.\src\ice\php_ice.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/php/src/IcePHP/.depend b/php/src/IcePHP/.depend
new file mode 100644
index 00000000000..77ac40ac4f0
--- /dev/null
+++ b/php/src/IcePHP/.depend
@@ -0,0 +1,6 @@
+Communicator$(OBJEXT): Communicator.cpp ./Communicator.h ./Config.h ./Proxy.h ./Marshal.h ./Util.h
+Init$(OBJEXT): Init.cpp ./Communicator.h ./Config.h ./Marshal.h ./Profile.h ./Proxy.h ./Util.h
+Marshal$(OBJEXT): Marshal.cpp ./Marshal.h ./Config.h ./Profile.h ./Proxy.h ./Util.h
+Profile$(OBJEXT): Profile.cpp ./Profile.h ./Config.h ./Util.h
+Proxy$(OBJEXT): Proxy.cpp ./Proxy.h ./Config.h ./Communicator.h ./Marshal.h ./Profile.h ./Util.h
+Util$(OBJEXT): Util.cpp ./Util.h ./Config.h
diff --git a/php/src/ice/communicator.cpp b/php/src/IcePHP/Communicator.cpp
index 4698631317c..ba548449ce2 100644
--- a/php/src/ice/communicator.cpp
+++ b/php/src/IcePHP/Communicator.cpp
@@ -7,15 +7,11 @@
//
// **********************************************************************
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <IceUtil/DisableWarnings.h>
-#include "ice_communicator.h"
-#include "ice_proxy.h"
-#include "ice_marshal.h"
-#include "ice_util.h"
+#include <Communicator.h>
+#include <Proxy.h>
+#include <Marshal.h>
+#include <Util.h>
using namespace std;
using namespace IcePHP;
@@ -357,7 +353,6 @@ ZEND_FUNCTION(Ice_Communicator_addObjectFactory)
return;
}
assert(obj->ptr);
- Ice::CommunicatorPtr* _this = static_cast<Ice::CommunicatorPtr*>(obj->ptr);
zval* zfactory;
char* id;
@@ -426,7 +421,6 @@ ZEND_FUNCTION(Ice_Communicator_findObjectFactory)
RETURN_NULL();
}
assert(obj->ptr);
- Ice::CommunicatorPtr* _this = static_cast<Ice::CommunicatorPtr*>(obj->ptr);
char* id;
int len;
diff --git a/php/src/ice/ice_communicator.h b/php/src/IcePHP/Communicator.h
index 6783c5b6f81..4e5862225eb 100644
--- a/php/src/ice/ice_communicator.h
+++ b/php/src/IcePHP/Communicator.h
@@ -7,10 +7,10 @@
//
// **********************************************************************
-#ifndef ICE_PHP_ICE_COMMUNICATOR_H
-#define ICE_PHP_ICE_COMMUNICATOR_H
+#ifndef ICE_PHP_COMMUNICATOR_H
+#define ICE_PHP_COMMUNICATOR_H
-#include "ice_common.h"
+#include <Config.h>
//
// Ice_Communicator class methods.
diff --git a/php/src/ice/ice_common.h b/php/src/IcePHP/Config.h
index 939661237fb..50ae01f00e7 100644
--- a/php/src/ice/ice_common.h
+++ b/php/src/IcePHP/Config.h
@@ -7,8 +7,8 @@
//
// **********************************************************************
-#ifndef ICE_PHP_ICE_COMMON_H
-#define ICE_PHP_ICE_COMMON_H
+#ifndef ICE_PHP_CONFIG_H
+#define ICE_PHP_CONFIG_H
#if defined(_MSC_VER) && (_MSC_VER >= 1300)
// Necessary for TryEnterCriticalSection. VC 7.x only.
@@ -39,6 +39,37 @@ extern "C"
}
#endif
-#include "php_ice.h"
+extern zend_module_entry ice_module_entry;
+#define phpext_ice_ptr &ice_module_entry
+
+#ifdef PHP_WIN32
+#define PHP_ICE_API __declspec(dllexport)
+#else
+#define PHP_ICE_API
+#endif
+
+#ifdef ZTS
+#include "TSRM.h"
+#endif
+
+ZEND_MINIT_FUNCTION(ice);
+ZEND_MSHUTDOWN_FUNCTION(ice);
+ZEND_RINIT_FUNCTION(ice);
+ZEND_RSHUTDOWN_FUNCTION(ice);
+ZEND_MINFO_FUNCTION(ice);
+
+ZEND_BEGIN_MODULE_GLOBALS(ice)
+ zval* communicator;
+ void* marshalerMap;
+ void* profile;
+ void* properties;
+ void* objectFactoryMap;
+ZEND_END_MODULE_GLOBALS(ice)
+
+#ifdef ZTS
+#define ICE_G(v) TSRMG(ice_globals_id, zend_ice_globals*, v)
+#else
+#define ICE_G(v) (ice_globals.v)
+#endif
#endif
diff --git a/php/src/ice/ice.cpp b/php/src/IcePHP/Init.cpp
index 0ef2314a12c..9441fffd8c4 100644
--- a/php/src/ice/ice.cpp
+++ b/php/src/IcePHP/Init.cpp
@@ -7,15 +7,11 @@
//
// **********************************************************************
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ice_communicator.h"
-#include "ice_marshal.h"
-#include "ice_profile.h"
-#include "ice_proxy.h"
-#include "ice_util.h"
+#include <Communicator.h>
+#include <Marshal.h>
+#include <Profile.h>
+#include <Proxy.h>
+#include <Util.h>
using namespace std;
using namespace IcePHP;
@@ -48,9 +44,7 @@ zend_module_entry ice_module_entry =
STANDARD_MODULE_PROPERTIES
};
-#ifdef COMPILE_DL_ICE
ZEND_GET_MODULE(ice)
-#endif
//
// Declare initialization file entries.
@@ -139,8 +133,8 @@ ZEND_RSHUTDOWN_FUNCTION(ice)
for(ObjectFactoryMap::iterator p = ofm->begin(); p != ofm->end(); ++p)
{
zval* factory = p->second;
- zend_call_method_with_0_params(&p->second, NULL, NULL, "destroy", NULL);
- zval_ptr_dtor(&p->second);
+ zend_call_method_with_0_params(&factory, NULL, NULL, "destroy", NULL);
+ zval_ptr_dtor(&factory);
}
delete ofm;
@@ -155,7 +149,6 @@ ZEND_MINFO_FUNCTION(ice)
php_info_print_table_start();
php_info_print_table_header(2, "Ice support", "enabled");
php_info_print_table_row(2, "Ice version", ICE_STRING_VERSION);
- php_info_print_table_row(2, "IcePHP version", ICEPHP_STRING_VERSION);
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
diff --git a/php/src/IcePHP/Makefile b/php/src/IcePHP/Makefile
new file mode 100644
index 00000000000..9e52974c117
--- /dev/null
+++ b/php/src/IcePHP/Makefile
@@ -0,0 +1,39 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ../..
+
+LIBNAME = $(call mkphplibname,IcePHP)
+SONAME = $(LIBNAME)
+
+TARGETS = $(libdir)/$(LIBNAME)
+
+OBJS = Communicator.o \
+ Init.o \
+ Marshal.o \
+ Profile.o \
+ Proxy.o \
+ Util.o
+
+SRCS = $(OBJS:.o=.cpp)
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. $(CPPFLAGS) $(ICE_FLAGS) $(PHP_FLAGS)
+
+LINKWITH := $(ICE_LIBS) $(PHP_LIBS) $(CXXLIBS)
+
+$(libdir)/$(LIBNAME): $(OBJS)
+ rm -f $@
+ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH))
+
+install:: all
+ $(call installphplib,$(libdir)/$(LIBNAME),$(install_libdir))
+
+include .depend
diff --git a/php/src/IcePHP/Makefile.mak b/php/src/IcePHP/Makefile.mak
new file mode 100644
index 00000000000..b3bb3f8d8fa
--- /dev/null
+++ b/php/src/IcePHP/Makefile.mak
@@ -0,0 +1,45 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ..\..
+
+LIBNAME = php_ice$(LIBSUFFIX).lib
+DLLNAME = $(bindir)\php_ice$(LIBSUFFIX).dll
+
+TARGETS = $(LIBNAME) $(DLLNAME)
+
+OBJS = Communicator.obj \
+ Init.obj \
+ Marshal.obj \
+ Profile.obj \
+ Proxy.obj \
+ Util.obj
+
+SRCS = $(OBJS:.obj=.cpp)
+
+!include $(top_srcdir)\config\Make.rules.mak
+
+CPPFLAGS = -I. -I.. $(CPPFLAGS) $(ICE_CPPFLAGS) $(PHP_CPPFLAGS)
+!if "$(OPTIMIZE)" != "yes"
+PDBFLAGS = /pdb:$(LIBNAME:.lib=.pdb)
+!endif
+
+LINKWITH = $(ICE_LIBS) $(CXXLIBS)
+
+$(LIBNAME): $(DLLNAME)
+
+$(DLLNAME): $(OBJS)
+ $(LINK) $(ICE_LDFLAGS) $(LD_DLLFLAGS) $(PDBFLAGS) /export:get_module $(OBJS) \
+ $(PREOUT)$(DLLNAME) $(PRELIBS)$(LINKWITH)
+ move $(DLLNAME:.dll=.lib) $(LIBNAME)
+
+install:: all
+ copy $(DLLNAME) $(install_bindir)
+
+!include .depend
diff --git a/php/src/ice/marshal.cpp b/php/src/IcePHP/Marshal.cpp
index 908741d11fc..68c6ddc3200 100644
--- a/php/src/ice/marshal.cpp
+++ b/php/src/IcePHP/Marshal.cpp
@@ -7,14 +7,10 @@
//
// **********************************************************************
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ice_marshal.h"
-#include "ice_profile.h"
-#include "ice_proxy.h"
-#include "ice_util.h"
+#include <Marshal.h>
+#include <Profile.h>
+#include <Proxy.h>
+#include <Util.h>
#include <IceUtil/InputUtil.h>
#include <IceUtil/ScopedArray.h>
diff --git a/php/src/ice/ice_marshal.h b/php/src/IcePHP/Marshal.h
index 82a26699d09..68c768508f9 100644
--- a/php/src/ice/ice_marshal.h
+++ b/php/src/IcePHP/Marshal.h
@@ -7,10 +7,10 @@
//
// **********************************************************************
-#ifndef ICE_PHP_ICE_MARSHAL_H
-#define ICE_PHP_ICE_MARSHAL_H
+#ifndef ICE_PHP_MARSHAL_H
+#define ICE_PHP_MARSHAL_H
-#include "ice_common.h"
+#include <Config.h>
namespace IcePHP
{
diff --git a/php/src/ice/profile.cpp b/php/src/IcePHP/Profile.cpp
index 37635e1ef27..e738527f900 100644
--- a/php/src/ice/profile.cpp
+++ b/php/src/IcePHP/Profile.cpp
@@ -7,12 +7,8 @@
//
// **********************************************************************
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ice_profile.h"
-#include "ice_util.h"
+#include <Profile.h>
+#include <Util.h>
#include <Slice/Preprocessor.h>
#include <IceUtil/Options.h>
diff --git a/php/src/ice/ice_profile.h b/php/src/IcePHP/Profile.h
index 45c7721482a..76cf462569f 100644
--- a/php/src/ice/ice_profile.h
+++ b/php/src/IcePHP/Profile.h
@@ -7,10 +7,10 @@
//
// **********************************************************************
-#ifndef ICE_PHP_ICE_PROFILE_H
-#define ICE_PHP_ICE_PROFILE_H
+#ifndef ICE_PHP_PROFILE_H
+#define ICE_PHP_PROFILE_H
-#include "ice_common.h"
+#include <Config.h>
//
// Global functions.
diff --git a/php/src/ice/proxy.cpp b/php/src/IcePHP/Proxy.cpp
index f88e7daa21d..48b06536bf6 100644
--- a/php/src/ice/proxy.cpp
+++ b/php/src/IcePHP/Proxy.cpp
@@ -7,16 +7,12 @@
//
// **********************************************************************
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <IceUtil/DisableWarnings.h>
-#include "ice_proxy.h"
-#include "ice_communicator.h"
-#include "ice_marshal.h"
-#include "ice_profile.h"
-#include "ice_util.h"
+#include <Proxy.h>
+#include <Communicator.h>
+#include <Marshal.h>
+#include <Profile.h>
+#include <Util.h>
using namespace std;
using namespace IcePHP;
@@ -199,7 +195,6 @@ static function_entry _proxyMethods[] =
{"ice_timeout", PHP_FN(Ice_ObjectPrx_ice_timeout), NULL},
{"ice_connectionId", PHP_FN(Ice_ObjectPrx_ice_connectionId), NULL},
{"ice_getConnection", PHP_FN(Ice_ObjectPrx_ice_getConnection), NULL},
- {"ice_getCachedConnection", PHP_FN(Ice_ObjectPrx_ice_getCachedConnection), NULL},
{"ice_uncheckedCast", PHP_FN(Ice_ObjectPrx_ice_uncheckedCast), NULL},
{"ice_checkedCast", PHP_FN(Ice_ObjectPrx_ice_checkedCast), NULL},
{NULL, NULL, NULL}
@@ -1544,32 +1539,6 @@ ZEND_FUNCTION(Ice_ObjectPrx_ice_getConnection)
}
}
-ZEND_FUNCTION(Ice_ObjectPrx_ice_getCachedConnection)
-{
- if(ZEND_NUM_ARGS() != 0)
- {
- WRONG_PARAM_COUNT;
- }
-
- ice_object* obj = static_cast<ice_object*>(zend_object_store_get_object(getThis() TSRMLS_CC));
- assert(obj->ptr);
- Proxy* _this = static_cast<Proxy*>(obj->ptr);
-
- try
- {
- Ice::ConnectionPtr con = _this->getProxy()->ice_getCachedConnection();
- if(!con || !createConnection(return_value, con TSRMLS_CC))
- {
- RETURN_NULL();
- }
- }
- catch(const IceUtil::Exception& ex)
- {
- throwException(ex TSRMLS_CC);
- RETURN_NULL();
- }
-}
-
static void
do_cast(INTERNAL_FUNCTION_PARAMETERS, bool check)
{
@@ -2107,7 +2076,7 @@ IcePHP::Operation::throwUserException(Ice::InputStreamPtr& is TSRMLS_DC)
{
Slice::UnitPtr unit = _op->unit();
- bool usesClasses = is->readBool();
+ is->readBool(); // usesClasses
string id = is->readString();
while(!id.empty())
diff --git a/php/src/ice/ice_proxy.h b/php/src/IcePHP/Proxy.h
index ce475301605..10dcd6e125b 100644
--- a/php/src/ice/ice_proxy.h
+++ b/php/src/IcePHP/Proxy.h
@@ -7,10 +7,10 @@
//
// **********************************************************************
-#ifndef ICE_PHP_ICE_PROXY_H
-#define ICE_PHP_ICE_PROXY_H
+#ifndef ICE_PHP_PROXY_H
+#define ICE_PHP_PROXY_H
-#include "ice_common.h"
+#include <Config.h>
//
// Ice_ObjectPrx class methods.
@@ -58,7 +58,6 @@ ZEND_FUNCTION(Ice_ObjectPrx_ice_compress);
ZEND_FUNCTION(Ice_ObjectPrx_ice_timeout);
ZEND_FUNCTION(Ice_ObjectPrx_ice_connectionId);
ZEND_FUNCTION(Ice_ObjectPrx_ice_getConnection);
-ZEND_FUNCTION(Ice_ObjectPrx_ice_getCachedConnection);
ZEND_FUNCTION(Ice_ObjectPrx_ice_uncheckedCast);
ZEND_FUNCTION(Ice_ObjectPrx_ice_checkedCast);
@@ -117,7 +116,6 @@ ZEND_FUNCTION(Ice_Connection_toString);
ZEND_FE(Ice_ObjectPrx_ice_timeout, NULL) \
ZEND_FE(Ice_ObjectPrx_ice_connectionId, NULL) \
ZEND_FE(Ice_ObjectPrx_ice_getConnection, NULL) \
- ZEND_FE(Ice_ObjectPrx_ice_getCachedConnection, NULL) \
ZEND_FE(Ice_ObjectPrx_ice_uncheckedCast, NULL) \
ZEND_FE(Ice_ObjectPrx_ice_checkedCast, NULL)
diff --git a/php/src/ice/util.cpp b/php/src/IcePHP/Util.cpp
index 7bf85e5e6e6..a7f3c81b456 100644
--- a/php/src/ice/util.cpp
+++ b/php/src/IcePHP/Util.cpp
@@ -7,11 +7,7 @@
//
// **********************************************************************
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ice_util.h"
+#include <Util.h>
#include <IceUtil/DisableWarnings.h>
#include <Ice/IdentityUtil.h>
#include <algorithm>
@@ -210,9 +206,6 @@ IcePHP::extractIdentity(zval* zv, Ice::Identity& id TSRMLS_DC)
bool
IcePHP::createContext(zval* zv, const Ice::Context& ctx TSRMLS_DC)
{
- zend_class_entry* cls = findClass("Ice_Identity" TSRMLS_CC);
- assert(cls);
-
array_init(zv);
for(Ice::Context::const_iterator p = ctx.begin(); p != ctx.end(); ++p)
{
diff --git a/php/src/ice/ice_util.h b/php/src/IcePHP/Util.h
index abcec9a4d93..23a8fc4e690 100644
--- a/php/src/ice/ice_util.h
+++ b/php/src/IcePHP/Util.h
@@ -7,10 +7,10 @@
//
// **********************************************************************
-#ifndef ICE_PHP_ICE_UTIL_H
-#define ICE_PHP_ICE_UTIL_H
+#ifndef ICE_PHP_UTIL_H
+#define ICE_PHP_UTIL_H
-#include "ice_common.h"
+#include <Config.h>
//
// Ice_Identity global functions.
diff --git a/php/src/Makefile b/php/src/Makefile
new file mode 100644
index 00000000000..55e6b1c3b24
--- /dev/null
+++ b/php/src/Makefile
@@ -0,0 +1,24 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ..
+
+include $(top_srcdir)/config/Make.rules
+
+SUBDIRS = IcePHP
+
+$(EVERYTHING)::
+ @for subdir in $(SUBDIRS); \
+ do \
+ if test -d $$subdir ; \
+ then \
+ echo "making $@ in $$subdir"; \
+ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \
+ fi; \
+ done
diff --git a/php/src/Makefile.mak b/php/src/Makefile.mak
new file mode 100644
index 00000000000..c6d2ce88210
--- /dev/null
+++ b/php/src/Makefile.mak
@@ -0,0 +1,19 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ..
+
+!include $(top_srcdir)\config\Make.rules.mak
+
+SUBDIRS = IcePHP
+
+$(EVERYTHING)::
+ @for %i in ( $(SUBDIRS) ) do \
+ @echo "making $@ in %i" & \
+ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1
diff --git a/php/src/ice/.cvsignore b/php/src/ice/.cvsignore
deleted file mode 100644
index da7f324ebec..00000000000
--- a/php/src/ice/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.deps
-*.lo
-*.la
diff --git a/php/src/ice/config.m4 b/php/src/ice/config.m4
deleted file mode 100644
index 8b55af56751..00000000000
--- a/php/src/ice/config.m4
+++ /dev/null
@@ -1,57 +0,0 @@
-dnl $Id$
-dnl config.m4 for extension ice
-
-dnl Comments in this file start with the string 'dnl'.
-dnl Remove where necessary. This file will not work
-dnl without editing.
-
-PHP_ARG_WITH(ice, for Ice support,
-[ --with-ice Include Ice support])
-
-if test "$PHP_ICE" != "no"; then
-
- SEARCH_PATH="/usr/local /usr"
- SEARCH_FOR="/include/Ice/Ice.h"
- if test -r $PHP_ICE/$SEARCH_FOR; then # path given as parameter
- ICE_DIR=$PHP_ICE
- else # search default path list
- AC_MSG_CHECKING([for Ice files in default path])
- for i in $SEARCH_PATH ; do
- if test -r $i/$SEARCH_FOR; then
- ICE_DIR=$i
- AC_MSG_RESULT(found in $i)
- fi
- done
- fi
-
- if test -z "$ICE_DIR"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Please reinstall the Ice distribution from http://www.zeroc.com])
- fi
-
- PHP_ADD_INCLUDE($ICE_DIR/include)
-
- PHP_REQUIRE_CXX()
- PHP_ADD_LIBPATH($ICE_DIR/lib, ICE_SHARED_LIBADD)
- PHP_ADD_LIBRARY(Ice, 1, ICE_SHARED_LIBADD)
- PHP_ADD_LIBRARY(Slice, 1, ICE_SHARED_LIBADD)
- PHP_ADD_LIBRARY(IceUtil, 1, ICE_SHARED_LIBADD)
- case $host_os in
- solaris*)
- if test "$GXX" != "yes"; then
- PHP_ADD_LIBRARY(Cstd, 1, ICE_SHARED_LIBADD)
- PHP_ADD_LIBRARY(Crun, 1, ICE_SHARED_LIBADD)
- fi
- ;;
- esac
-
- sources="ice.cpp \
- communicator.cpp \
- marshal.cpp \
- profile.cpp \
- proxy.cpp \
- util.cpp"
-
- PHP_SUBST(ICE_SHARED_LIBADD)
- PHP_NEW_EXTENSION(ice, $sources, $ext_shared,,,yes)
-fi
diff --git a/php/src/ice/php_ice.dsp b/php/src/ice/php_ice.dsp
deleted file mode 100644
index 37d85f9bd98..00000000000
--- a/php/src/ice/php_ice.dsp
+++ /dev/null
@@ -1,169 +0,0 @@
-# Microsoft Developer Studio Project File - Name="php_ice" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=php_ice - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "php_ice.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "php_ice.mak" CFG="php_ice - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "php_ice - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "php_ice - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "php_ice - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICE_EXPORTS" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /D HAVE_ICE=1 /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "WIN32" /D "PHP_WIN32" /D "ZEND_WIN32" /D "ZTS" /D ZEND_DEBUG=0 /D "COMPILE_DL_ICE" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 Ice.lib Slice.lib IceUtil.lib php5ts.lib /nologo /dll /machine:I386
-# SUBTRACT LINK32 /pdb:none
-# Begin Special Build Tool
-OutDir=.\Release
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\php_ice.dll ..\..\bin\release
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "php_ice - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICE_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /D "_DEBUG" /D HAVE_ICE=1 /D "_WINDOWS" /D "_UNICODE" /D "WIN32" /D "PHP_WIN32" /D "ZEND_WIN32" /D "ZTS" /D ZEND_DEBUG=1 /D "COMPILE_DL_ICE" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386
-# ADD LINK32 Iced.lib Sliced.lib IceUtild.lib php5ts_debug.lib /nologo /dll /debug /machine:I386
-# SUBTRACT LINK32 /pdb:none
-# Begin Special Build Tool
-OutDir=.\Debug
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\php_ice.pdb ..\..\bin\debug copy $(OutDir)\php_ice.dll ..\..\bin\debug
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "php_ice - Win32 Release"
-# Name "php_ice - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\communicator.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ice.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\marshal.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\profile.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\proxy.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\util.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\ice_common.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ice_communicator.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ice_marshal.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ice_profile.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ice_proxy.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ice_util.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\php_ice.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/php/src/ice/php_ice.h b/php/src/ice/php_ice.h
deleted file mode 100644
index 31f93642cc3..00000000000
--- a/php/src/ice/php_ice.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/************************************************************************
- *
- * Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
- *
- * This copy of Ice is licensed to you under the terms described in the
- * ICE_LICENSE file included in this distribution.
- *
- ************************************************************************/
-
-#ifndef PHP_ICE_H
-#define PHP_ICE_H
-
-#define ICEPHP_STRING_VERSION "3.2.0"
-#define ICEPHP_INT_VERSION 30200 /* AABBCC, with AA=major, BB=minor, CC=patch */
-
-/*
- * This file may be included by PHP's build system, therefore we have
- * to guard the use of 'extern "C"'.
- */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-extern zend_module_entry ice_module_entry;
-#define phpext_ice_ptr &ice_module_entry
-
-#ifdef PHP_WIN32
-#define PHP_ICE_API __declspec(dllexport)
-#else
-#define PHP_ICE_API
-#endif
-
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-
-ZEND_MINIT_FUNCTION(ice);
-ZEND_MSHUTDOWN_FUNCTION(ice);
-ZEND_RINIT_FUNCTION(ice);
-ZEND_RSHUTDOWN_FUNCTION(ice);
-ZEND_MINFO_FUNCTION(ice);
-
-ZEND_BEGIN_MODULE_GLOBALS(ice)
- zval* communicator;
- void* marshalerMap;
- void* profile;
- void* properties;
- void* objectFactoryMap;
-ZEND_END_MODULE_GLOBALS(ice)
-
-#ifdef ZTS
-#define ICE_G(v) TSRMG(ice_globals_id, zend_ice_globals*, v)
-#else
-#define ICE_G(v) (ice_globals.v)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PHP_ICE_H */