Archived

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

no object found in IcePHP_defineStruct()

Hi,

I'm working on upgrading a php-based Ice-based app to be compatible with Ice-3.4.1, however whenever I so much as include "Ice.php" into any PHP script, I get the following:

Uncaught exception 'RuntimeException' with message 'no object found in IcePHP_defineStruct()' in /usr/share/php/Ice/Ice/Identity.php:44

Also, if I don't include Ice.php and simply include my php file generated by slice2php, then it will give the same error on any IcePHP_defineStruct() that appear in that generated PHP file.

Any help would be greatly appreciated.

Ice Version: 3.4.1
PHP Version: 5.3.4
GCC Version: 3.4.6
OS: Gentoo Linux x86 kernel 2.6.32

Regards,

Tom

Comments

  • mes
    mes California
    Hi Tom,

    Welcome to the forum.

    I suspect that you're attempting to include Ice.php or your generated code in a local context (such as inside a function). However, currently you must include these files at the global scope. This is a known limitation of our PHP extension in Ice 3.4.x that we plan to correct in a future release.

    Regards,
    Mark
  • Many thanks, that did the trick!