Archived

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

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

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

  • I'm sorry. it failed to attatch the profile.cpp.
  • mes
    mes California
    Hi,

    Could you explain why you need to use two profiles?

    Thanks,
    Mark
  • 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.
  • matthew
    matthew NL, Canada
    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.
  • 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