Home Help Center

could I load more than one ice profile in one php script

ucdriverucdriver Member haitao zengOrganization: buptProject: tencent
hi

there seems IcePhp doesn't support load tow profile in none php scripts. When I did so. It raise ProfileAlreadLoaded exception.

so I read the IcePhp' source code . and modified the Profile.cpp as attached. commented some code.
what's the risks of the modification? and then how could my php scripts commucate to two ice server in C++? load tow profile

Comments

  • ucdriverucdriver Member haitao zengOrganization: buptProject: tencent
    I'm sorry. it failed to attatch the profile.cpp.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    Could you explain why you need to use two profiles?

    Thanks,
    Mark
  • ucdriverucdriver Member haitao zengOrganization: buptProject: tencent
    thanx for your reply.

    I setup tow ice server in C++. One for message sending. one for bill processing. each has their own configurationin.

    the php in client need to interact with both the tow server. the ice profile is like this in php.ini

    [msg]
    ice.slice=/usr/local/ice/msg/msg.ice
    ice.config=/usr/local/ice/msg/config.msg
    [acct]
    ice.slice=/usr/local/ice/acct/acct.ice
    ice.config=/usr/local/ice/acct/config.client


    and i try to load both profile in php like
    LoadProfile('msg');
    LoadProfile('acct');

    then exception raised.
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    You most likely don't need two profiles to do that. Specify both slice files on the ice.slice profile entry, and ensure the configuration file has the information necessary to talk with both server.
  • ucdriverucdriver Member haitao zengOrganization: buptProject: tencent
    matthew wrote: »
    You most likely don't need two profiles to do that. Specify both slice files on the ice.slice profile entry, and ensure the configuration file has the information necessary to talk with both server.

    haha,it works. thanks
Sign In or Register to comment.