Archived
This forum has been archived. Please start a new discussion on GitHub.
I need Ur help, Thank U~
Shawn Zhang
in Help Center
Firstly,I should introduce my environment:
linux 5
apache 2.2.4
php 5.2.3
mcpp 2.7
db 4.6.21.NC
ice 3.2.1
icephp 3.2.1
this is my installed process:
#apache
cd ../${httpd_version}
./configure -prefix=$httpd_dest --enable-so
make
make install
#mcpp
cd ../${mcpp_version}
patch -p0 < ../mcpp/mcpp-2.7.patch
patch -p0 < ../mcpp/mcpp-2.7.patch2
./configure CFLAGS=-fPIC --enable-mcpplib --disable-shared
make
make install
#db
cd ../${db_version}/build_unix/
../dist/configure --enable-cxx
gmake
#ICE
cd ../../${ice_version}
make
make install
#PHP
cd ../${php_version}
./configure --prefix=$php_dest --with-mysql=$mysql_dest --with-apxs2=$httpd_dest/bin/apxs --enable-track-vars --with-config-file-path=$httpd_dest/conf --enable-ftp --enable-magic-quotes --enable-mbstring --enable-mm=shared --enable-safe-mode --enable-trans-sid --enable-wddx=shared --enable-xml--with-curl --with-openssl --with-xmlrpc --enable-sockets --with-pdo-mysql=$mysql_dest
make
make install
#ICEPHP
cd ../${icephp_version}
cp $source_dir/Make.rules ./config/ -f
export ICE_HOME=/opt/Ice-3.2.1
export PHP_HOME=$php_dest
make
make install
After installation, apache can run correctly,but when I add something as below in php.ini:
extension=IcePHP.so
ice.profiles=/myPHPpath/etc/ice.profiles
And modify the extension_dir to another dir where I put IcePHP.so in it.
Then I create a file(ice.profiles) and a folder(ice.slices) in /myPHPpath/etc
and copy your demo --hello.ice into ice.slices, add some content in ice.profiles:
ice.slice=/myPHPpath/etc/ice.slices/Hello.ice
Then add the directory containing icecpp.exe in my PATH
Now I start apache, the result is:
sh: icecpp: command not found
PHP Fatal error: Unable to start ice module in Unknown on line 0
Why?I tried so hard but can't solve it~~Please help me~~Thank YOU very much!!
My English is poor, forgive me please!
linux 5
apache 2.2.4
php 5.2.3
mcpp 2.7
db 4.6.21.NC
ice 3.2.1
icephp 3.2.1
this is my installed process:
#apache
cd ../${httpd_version}
./configure -prefix=$httpd_dest --enable-so
make
make install
#mcpp
cd ../${mcpp_version}
patch -p0 < ../mcpp/mcpp-2.7.patch
patch -p0 < ../mcpp/mcpp-2.7.patch2
./configure CFLAGS=-fPIC --enable-mcpplib --disable-shared
make
make install
#db
cd ../${db_version}/build_unix/
../dist/configure --enable-cxx
gmake
#ICE
cd ../../${ice_version}
make
make install
#PHP
cd ../${php_version}
./configure --prefix=$php_dest --with-mysql=$mysql_dest --with-apxs2=$httpd_dest/bin/apxs --enable-track-vars --with-config-file-path=$httpd_dest/conf --enable-ftp --enable-magic-quotes --enable-mbstring --enable-mm=shared --enable-safe-mode --enable-trans-sid --enable-wddx=shared --enable-xml--with-curl --with-openssl --with-xmlrpc --enable-sockets --with-pdo-mysql=$mysql_dest
make
make install
#ICEPHP
cd ../${icephp_version}
cp $source_dir/Make.rules ./config/ -f
export ICE_HOME=/opt/Ice-3.2.1
export PHP_HOME=$php_dest
make
make install
After installation, apache can run correctly,but when I add something as below in php.ini:
extension=IcePHP.so
ice.profiles=/myPHPpath/etc/ice.profiles
And modify the extension_dir to another dir where I put IcePHP.so in it.
Then I create a file(ice.profiles) and a folder(ice.slices) in /myPHPpath/etc
and copy your demo --hello.ice into ice.slices, add some content in ice.profiles:
ice.slice=/myPHPpath/etc/ice.slices/Hello.ice
Then add the directory containing icecpp.exe in my PATH
Now I start apache, the result is:
sh: icecpp: command not found
PHP Fatal error: Unable to start ice module in Unknown on line 0
Why?I tried so hard but can't solve it~~Please help me~~Thank YOU very much!!
My English is poor, forgive me please!
0
Comments
-
Thank U for your response.I copied the files which are in the directory "Ice-3.2.1/bin" to /usr/bin, and the problem has been solved.
Now I'm using Ice-3.3.0 And IcePHP-3.2.1(Why is IcePHP-3.3.0 not exist?),and the new question is how can I write the ice.slice for several files?
Here is my files:
==============================================================================
A.ice
#ifndef ISERVICEBASE_ICE
#define ISERVICEBASE_ICE
module DTMSystem
{
dictionary<string, string> MapDepend;
// This is DTMService IDL
interface InterfaceBase
{
int Start();
int Stop();
void Terminate();
int Pause();
int Resume();
int GetStatus();
string GetVersion();
};
};
#endif
==============================================================================
B.ice
#ifndef _INTERFACEMANAGER_ICE
#define _INTERFACEMANAGER_ICE
#include <InterfaceBase.ice>
module DTMSystem
{
sequence<byte> ByteSeq;
struct DeviceInfo
{
...
};
struct RegisterInfo
{
...
};
interface InterfaceManager extends InterfaceBase
{
//some definitions
};
};
#endif
==============================================================================
C.ice
#ifndef _Telnetd_Ice_ice
#define _Telnetd_Ice_ice
#include <InterfaceBase.ice>
module DTMSystem
{
sequence<byte> ByteSeq;
interface InterfaceTelnetd extends InterfaceBase
{
bool RestartServer();
};
};
#endif
==============================================================================
I have looked for some threads in help center, and write the ice.slice like this:
ice.slice = -I/path/ /path/B.ice /path/C.ice
The error message is:
/dtm/websvr/php/etc/ice.slices/InterfaceBase.ice:16: redefinition of dictionary `MapDepend' as dictionary
/dtm/websvr/php/etc/ice.slices/InterfaceBase.ice:20: redefinition of interface `InterfaceBase'
/dtm/websvr/php/etc/ice.slices/InterfaceTelnetd.ice:11: redefinition of sequence `ByteSeq' as sequence
PHP Fatal error: Unable to start ice module in Unknown on line 0
Why?How can I fix it? Thank You for your help!!0 -
The PHP source distribution is contained in Ice-3.3.0.tar.gz. I recommend upgrading at your earliest convenience (particularly if you want to receive support on this forum, since we only offer support for the latest version here).
Take a look at http://www.zeroc.com/forums/help-center/2379-2-ice-php.html for a solution to your redefinition problem.0
