Archived

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

Debug named profiles

Is there a convenient way to debug a PHP named profile configuration? I get profile not found errors when I run my script so I've obviously misconfigured something but anything that is failing does so silently.

Just for a double check, my configuration is-

httpd.conf contains:
php_value ice.profiles c:/code/www/ice.profiles

ice.profiles:
[Test]
ice.options="--Ice.Trace.Network=1 --Ice.Warn.Connections=1"
ice.slice="-Ic:/code/IceServerTest/src c:/code/IceServerTest/src/TestServer.ice"


then
Ice_loadProfile("Test");
goes Fatal error: profile `Test' not found

Comments

  • mes
    mes California
    Hi,

    I'm afraid there isn't currently a way to trace the profiles. To verify that the Ice extension is even seeing your ice.profiles directive, you could try using an invalid Slice filename in ice.slice. If you don't see any errors, either in the Apache logs or during Apache startup, you might try defining ice.profiles in php.ini instead.

    Take care,
    - Mark
  • Well, I can prove that ICE does not see its directives unless they are in php.ini. However, adding
    ice.profiles = "c:\code\www\ice.profiles"
    to php.ini results in Apache being unable to load the module again.
  • >>> PHP Fatal error: Unable to start ice module in Unknown on line 0 <<<
    before the error.log file could be opened.


    Nothing in the error log.
  • mes
    mes California
    Sorry, there is a mismatch between the documentation and the code. The code expects the directives in the named profiles to omit the ice. prefix. So your file should contain the following:

    [Test]
    options="--Ice.Trace.Network=1 --Ice.Warn.Connections=1"
    slice="-Ic:/code/IceServerTest/src c:/code/IceServerTest/src/TestServer.ice"

    I'm not sure whether I should change the documentation to reflect the code, or change the code to reflect the documentation. In either event, it will be fixed by the next release.

    Note that when I start Apache in the foreground, I do get the following message:

    PHP Fatal error: unknown profile entry in file E:/Apache1/ice.pro:
    ice.slice=C:\icephp\Hello.ice
    in Unknown on line 0

    Thanks,
    - Mark
  • Documentation mismatch? Ludicrous! ;) Just means we'll be pen pals.

    ok, I see this now when I start in the foreground:

    PHP Fatal error: no Slice files specified in ice.slice in Unknown on line 0
    PHP Fatal error: Unable to start ice module in Unknown on line 0

    Is this because I have not specified options for the default profile?
  • mes
    mes California
    Originally posted by griffima
    Is this because I have not specified options for the default profile?
    No, you aren't required to specify options for the default profile.

    I suspect you need to remove the quotes that enclose your directives. Try this instead:

    [Test]
    options=--Ice.Trace.Network=1 --Ice.Warn.Connections=1
    slice=-Ic:/code/IceServerTest/src c:/code/IceServerTest/src/TestServer.ice


    - Mark