Archived

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

Ice 3.4.x + PHP5.3.3 + RHEL4 + cPanel

Has anyone gotten the above combination to work? I have been trying for a couple days now and just can't get the IcePHP.so to load with PHP.

The only error that I have gotten thus far is:
[26-Oct-2010 17:47:37] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/IcePHP.so' - libIce.so.34: cannot open shared object file: No such file or directory in Unknown on line 0

Any help / guidance would be appreciated!

Background: I have compiled Ice3.4.1 from source as well as IcePHP from the php directory.

Comments

  • mes
    mes California
    Hi Patrick,

    You appear to be using an unofficial build of PHP on a platform that we no longer support (RHEL4), so we can offer some advice but don't expect any miracles. :)

    Did you install PHP 5.3.3 from source or third-party RPMs?

    When you compiled the Ice for PHP extension, are you absolutely sure that you compiled it against the PHP 5.3.3 installation?

    Examine the output when you run this command:

    % ldd /usr/local/lib/php/extensions/IcePHP.so

    If any of the shared-library references are missing, you may need to fix your LD_LIBRARY_PATH setting.

    Regards,
    Mark
  • Ya, I know I am running an old OS.... Just haven't found the right time to backup and reformat with a new one. :D

    I installed PHP 5.3.3 through Cpanel EasyApache so I assume that it 3rdparty RPMs.

    PHP 5.3.3 is the version that was/is running when I compiled Ice 3.4.1. I believe I used the mcpp-devel from the RHEL4 rpm (mcpp-devel-2.7.2-1ice.rhel4.i386.rpm) that I found here: http://www.zeroc.com/download/Ice/3.3/rhel4/i386/

    Here is the output of that command:
    libIce.so.34 => not found
            libSlice.so.34 => not found
            libIceUtil.so.34 => not found
            libpthread.so.0 => /lib/tls/libpthread.so.0 (0x0099a000)
            librt.so.1 => /lib/tls/librt.so.1 (0x00111000)
            libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00c15000)
            libm.so.6 => /lib/tls/libm.so.6 (0x00b21000)
            libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x008e2000)
            libc.so.6 => /lib/tls/libc.so.6 (0x00125000)
            /lib/ld-linux.so.2 (0x0038c000)
    

    I see that the first 2 are not found, any suggestions?

    When I do an: echo $LD_LIBRARY_PATH - the result is blank
  • mes
    mes California
    You need to add $ICE_HOME/lib to your LD_LIBRARY_PATH, where $ICE_HOME is the installation directory you used for the Ice source build.

    If you installed the Ice source build into the default location, you would set LD_LIBRARY_PATH as follows:

    % export LD_LIBRARY_PATH=/opt/Ice-3.4.1/lib

    With this variable set, run ldd again and verify that the output looks correct. Next, try this command:

    % php -m

    This lists all of the PHP modules installed by default, and ice should be one of them if the extension is correctly configured and loaded.

    Also keep in mind that the setting for LD_LIBRARY_PATH must be set for the user that's running PHP. In the case of Apache, this means you need to ensure that $ICE_HOME/lib is included in Apache's shared library search path. One simple way to do this is to add $ICE_HOME/lib to the system's dynamic linker configuration (see man ldconfig for details).

    Regards,
    Mark
  • Mes,
    You are my hero!! I can now see ice come up in the list generated by php -m

    I'll go ahead and move forward to testing the actual PHP action and update this thread as a possible source for anyone else experiencing the same problem. (I did notice people asking around on the net but never any response via google)

    So many hours spent for 1 little line ;)
  • I am getting an error that I can't seem to figure out now:

    Fatal error: Call to undefined function IcePHP_defineClass() in Ice.php on line 76

    I don't see any function definition in Ice.php for that. Am I missing something?
  • mes
    mes California
    That function is supplied by the Ice extension (IcePHP.so), so the error message is an indication that the extension isn't being loaded.

    Mark
  • When I list the PHP modules with php -m ; ice shows up on the list. Is there something that I haven't done that would cause it to not be loaded?
  • I actually think I have gotten beyond that problem now.

    Getting PHP errors like...
    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Undefined variable: IcePHP__t_bool
    
    Filename: Ice/BuiltinSequences.php
    
    Line Number: 24
    
    A PHP Error was encountered
    
    Severity: Warning
    
    Message: IcePHP_defineSequence() expects parameter 2 to be object, null given
    
    Filename: Ice/BuiltinSequences.php
    
    Line Number: 24
    

    I am assuming the include path's now are the issue? Where should I place the Ice.php file in relation to my php code? Should it be require '/opt/Ice-3.4.1/php/Ice.php' instead of just Ice.php? I have Ice.php in the same directory for now but receiving these errors.
  • In addition since I couldn't find an edit option:

    Fatal error: Uncaught exception 'RuntimeException' with message 'no object found in IcePHP_defineStruct()' in /opt/Ice-3.4.1/php/Ice/Identity.php:44 Stack trace: #0 /opt/Ice-3.4.1/php/Ice/Identity.php(44):