Home Help Center

why I can't use slice in icephp?

I tried to run the IcePHP hello demo using PHP5b4 and Apache 2 on Windows 2000. Here is what I did:


Copied php5ts.dll to C:\WINNT\system32

Copied the Ice DLLs and all third-party dependencies to C:\WINNT\system32

Created C:\icephp

Copied php_ice.dll to C:\icephp

Copied Hello.ice to C:\icephp

Copied php.ini-dist from the PHP source directory to C:\Program Files\Apache Group\Apache2\php.ini

Added the following lines to C:\Program Files\Apache Group\Apache2\php.ini:

extension_dir = "C:/icephp"
extension = "php_ice.dll"
ice.slice = "C:/icephp/Hello.ice"


Copied hello.php to C:\Program Files\Apache Group\Apache2\htdocs

Edited hello.php to remove the SSL endpoint from the proxy

Added the following lines to httpd.conf:

LoadModule php5_module C:/php-5.0.0b4-Win32/php5apache2.dll
AddType application/x-httpd-php .php

Start the Apache Server,and I received the error message:
PHP Startup: Unable to initalize module 'ice'

If I delete the following line to C:\Program Files\Apache Group\Apache2\php.ini:

ice.slice = "C:/icephp/Hello.ice"

the error message not show


Anybody can tell me why? Thanks.

angela.lu

Comments

  • angela.luangela.lu Member
    I traced the Ice_php.dll. There is an exception in Line 408 of Communicator.cpp. The following codes are exception codes:
    static void
    handleFreeStorage(zend_object* p TSRMLS_DC)
    {
    ice_object* obj = (ice_object*)p;
    if(obj->ptr)
    {
    Ice::CommunicatorPtr* _this = static_cast<Ice::CommunicatorPtr*>(obj->ptr);
    try
    {
    (*_this)->destroy();
    }
    catch(const IceUtil::Exception& ex)
    {
    ostringstream ostr;
    ex.ice_print(ostr);
    zend_error(E_ERROR, "unable to destroy communicator:\n%s", ostr.str().c_str());
    }
    delete _this;
    }

    zend_objects_free_object_storage(p TSRMLS_CC);
    }

    I have tried it in different machines and got the same results. :confused:

    Any replies are appreciated.

    Angela
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    Check the messages in Apache's error.log file. I expect that you will see a message like this:
    'icecpp.exe' is not recognized as an internal or external command,
    operable program or batch file.
    This means you need to copy icecpp.exe to C:\WINNT\system32.

    Take care,
    - Mark
  • fengxbfengxb Member feng xuebinOrganization: jiexin techProject: scientific calculation
    hi

    My OS is WinXP. IcePHP works fine. The same things as Angela happend when I try to migrate it to Win2K. It's very strange. May the IcePHP not support Win2K?

    Regards,

    Fengxb
  • angela.luangela.lu Member
    Hi,

    I check the messages in Apache's error.log file,but I didn't see the message like you said.


    And I copy icecpp.exe to C:\WINNT\system32,but I get the same error message.

    I try the Ice-1.3.0-VC70.msi and IcePHP-1.0.2-bin-VC70.zip in WIN2000,and they work fine.

    Why I can't use ICE1.3.0 and IcePHP1.0.2 with VC6 in Win2000?

    Thanks

    angela.lu
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    I'm fairly certain this error is caused by the use of _popen in the Slice parser. It works fine when you call this function from a VC6 program running in a console, but fails when running as a service. It must have been fixed in the VC.NET runtime. I'm not sure yet whether we'll be able to include a workaround for this in a future Ice release, so for now you will need to use the VC 7.x libraries when using IcePHP with Apache.

    Take care,
    - Mark
Sign In or Register to comment.