Archived

This forum has been archived. Please start a new discussion on GitHub.

An old problem about ICE for PHP installation

Hello,
I'm a beginner ICE. I had tried to run ICE for C++ successfully.
Now I wanted to learn ICE for PHP and met an old problem: 'undefined function Ice_loadProfile()'.

My env:
Windows2003server + IIS6.0 + ICE3.2.1 + PHP5.2.6

My installation step:
1. Download PHP5.2.6 zip package and decompress it to c:\php.
2. Set IIS config to support PHP and call phpinfo successfully from script.
3. Install ICE3.2.1.
4. Modify php.ini, set extension=php_ice.dll, add 'ice.slice=C:\Ice-3.2.1-VC60\demophp\Ice\hello\Hello.ice' at the end of php.ini.
5. Copy 'bzip2.dll icecpp.exe ice32.dll iceutil32.dll msvcp60.dll msvcrt.dll slice32.dll stlport_vc646.dll' to c:\php\
6. After restart my computer, run the demo 'hello.php', then I get the error: 'Fatal error: Call to undefined function Ice_loadProfile() in C:\Inetpub\wwwroot\hello.php on line 19'

I had run 'php -m' and found ICE in the module list.
But if I called phpinfo() from web script, I can't found ICE extension info.

Where did I do wrong, can any one assist me?
Thanks and regards.
Shawn Zhang

Comments

  • mes
    mes California
    Welcome to the forum.

    It sounds as if PHP is not able to load the Ice extension. There can be many reasons for this:
    • The file php_ice.dll is not installed in PHP's extension directory.
    • The DLL dependencies (ice33.dll, etc.) are not being resolved correctly by the web server.
    • The Ice for PHP configuration directives are causing an error, such as ice.slice referring to a file that does not exist or does not have sufficient access rights.
    I have never tried using Ice for PHP with IIS. However, if it works similar to Apache, the DLL dependencies must reside in a directory that is listed in IIS's executable search path. I doubt that C:\php is in the PATH for IIS. You can either copy the DLL dependencies to a directory that is already in PATH, such as \WINDOWS\system32, or you can modify the system PATH to include a new directory.

    Please note that we only provide free support on the forum for the most recent version of Ice.

    Good luck,
    Mark
  • Hi, dear Mes

    Thanks for your prompt. You said that you had never tried using Ice for PHP with IIS. So, I tried to change to Apache and I resolved it.

    This problem maight be caused by IIS. I would find the root cause later. But now, I have to chage to Apche to continue my ICE learning.

    Thaks again:o , this problem puzzled me for several days.

    BRS
    Shawn Zhang