Anybody who making a shared library for PHP in HP and IBM?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon

    Anybody who making a shared library for PHP in HP and IBM?

    Hello.

    I wanna use my dynamic shared library(built with C language) with php
    script.
    (PHP version is 4.0.6)
    So I making a shared library(*.so) in Solaris environment(2.7 ) and it is
    successful.
    Php script can load my library successfully.

    And Now I port my library to HP(HP-UX 11.0) and IBM(AIX 4.1.3) system.
    But I can't build my shared library.
    I don't know why it can't be compiled.
    Following is Error Message:

    in HP environment :
    =============== ===

    ld: Unsatisfied symbols:
    _convert_to_str ing (code)
    convert_to_long (code)
    zend_get_parame ters_ex (code)
    _emalloc (code)
    alloc_globals (data)
    _zval_copy_ctor (code)
    wrong_param_cou nt (code)
    _estrndup (code)
    $global$ (data)
    ld: Unsatisfied symbols:
    $global$ (data)
    *** Error exit code 1

    Stop.

    in IBM environment :
    =============== ===

    ld: 0711-327 WARNING: Entry point not found: __start
    ld: 0711-244 ERROR: No csects or exported symbols have been saved.
    make: The error code from the last command is 8.


    Stop.


    In HP environment, I added libphp4.a for link in my Makefile.
    So some error was disappear. But "$global$ (data)" message was seen still.
    But I can't added libphp4.a in solaris environment and successfully
    compiled.
    What is problem? Did you know this?
    Please Help me..

    Same as, In IBM enviroment, I can't make a library.
    I don't know why above error message occur.
    Please help...

    Each environment, I added "-r" linker(ld) options.
    So it was compiled. But php script can't load my shared library.
    Following is error message :

    in HP environment :
    =============== ===

    Unable to load dynamic library
    '/usr/local/lib/php/extensions/no-debug-non-zts-20001222/mylib.sl' - Bad
    magic number for shared library:
    /usr/local/lib/php/extensions/no-debug-non-zts-20001222/mylib.sl in
    <b>a.php</b>


    in IBM environment :
    =============== ===

    Unable to load dynamic library
    '/usr/local/lib/php/extensions/no-debug-non-zts-20001222/mylib.so' - Could
    not load module
    /usr/local/lib/php/extensions/no-debug-non-zts-20001222/mylib.so
    The .loader section does not exist. in <b>a.php</b>


    If you know this problem. Please tell me how I fix this problem.
    Please...

    Thank you for reading...

    Have a nice day..


Working...