Home Help Center

IcePHP: Profile not found.

I am having trouble loading a profile in php. I took a look at:
http://www.zeroc.com/vbulletin/showthread.php?t=883&highlight=php
and found that my issue looked similar, only the solution didn't work for me.

Here's what I have:

httpd.conf, added this line at the bottom:
php_value ice.profiles /home/qube/iceprofiles/ice.profiles

ice.profiles, full file:
[Test]
slice=-I/home/qube/runestone/Code/Common/Ice /home/qube/runestone/Code/Common/Ice/GameClient.ice

php.ini:
I tried adding
ice.profiles="/home/qube/iceprofiles/ice.profiles"
to the bottom but that gave an error:
PHP Fatal error: Unable to start ice module in Unknown on line 0
...so I removed that again.

With the above configuration I get a
Fatal error: profile `Test' not found in /var/www/html/ice.php on line 5
from the following script:
<?php
print "Start ...<br>";
Ice_LoadProfile("Test");
Ice_dumpProfile();
print "<br>Done.";
?>

I hope it's just a simple configuration mistake somewhere (again) but I'll admit upfront I've spent hours trying to get this to work. :-/

Regards,
René K.P.

Comments

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

    Sorry you're having trouble, I'll take a look at this.

    Can I assume that you've already checked system settings such as permissions to verify that the Web server can access the profile file? Have you also examined the Web server logs for any relevant information?

    BTW, please always specify your configuration information, such as the version of your OS, Web server, PHP, Ice, and compiler.

    Take care,
    - Mark
  • Nis BaggesenNis Baggesen Member ✭✭✭
    René is away so I'll just fill in the blanks I know anything about
    mes wrote:
    BTW, please always specify your configuration information, such as the version of your OS, Web server, PHP, Ice, and compiler.

    Sorry about that. The spec are :

    OS: Linux, Fedora Core 3, krnl 2.6.10-1.766smp
    Web server: Apache, 2.0
    PHP: 5.0.3
    Ice: 2.0.0
    Compiler: gcc 3.4.2

    I'll look into the web server access priviliges etc. but I assume they are ok.

    mvh

    Nis
  • I have checked permissions on:
    /home/qube/runestone/Code/Common/Ice/GameClient.ice
    /home/qube/iceprofiles/ice.profiles

    Both files (and their path) have read and execute permissions set for everyone.

    Are there any other files I should check?

    Regards,
    René K.P.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    I've never had success using php_value to define Ice configuration directives. I haven't bothered to investigate because it always works in a php.ini file.

    I have tried to reproduce this problem. The only way I was able to cause the same error was when I made a configuration mistake. :)

    Specifically, I was editing the wrong php.ini file so the PHP extension never saw my ice.profiles directive. I should have been editing /usr/local/lib/php.ini instead, and once I did it worked as expected.

    - Mark
  • php.ini:
    I tried adding
    ice.profiles="/home/qube/iceprofiles/ice.profiles"
    to the bottom but that gave an error:
    PHP Fatal error: Unable to start ice module in Unknown on line 0
    ...so I removed that again.

    As it turns out the above error was a "healthy" error - the ice.profiles directive was correct so by removing it I spent a lot of time looking for something to correct which of course wasn't there.

    The error that lead to the above one was found just before it in the error_log:
    sh: icecpp: command not found
    I had simply failed to notice that there was more than one thing at stake there.
    Copying icecpp from /opt/Ice-2.0.0/bin into /usr/bin solved the problem.

    To reiterate:
    - In the end nothing was added to httpd.conf.
    - The "profile not found" error was caused by the fact that ice.profiles was not set in php.ini.
    - When ice.profiles was set it caused the following error:
    sh: icecpp: command not found
    PHP Fatal error: Unable to start ice module in Unknown on line 0
    - This error was fixed by placing icecpp in the path.

    Thanks again for your help, I am looking forward to finally getting some work done. :-)

    Regards,
    René K.P.
Sign In or Register to comment.