hello all,

i am running php-4.0.3pl1 on aix 4.3.2 with apache 1.3.14.0 -- i am to display phpinfo() however, i cannot load an extension -- the apache error log contains:

PHP Warning: Unable to load dynamic library 'libldap.so' - No such file or dire
ctory in Unknown on line 0

the dl() function yields the same result. i have correctly entered the extension_dir in php.ini as well as defined the LD_LIBRARY_PATH environment variable. the libldap.so files exists in the extendir_dir directory.

i am lost and would deeply appreciate any advice!

sincerely

christopher cuse
ccuse@dts.mg

    a month later

    I'm also having this problem...has anyone found a solution to this? I'm running aix 4.3.3 with apache 1.3.17 and php4-4.0.4.1

    Everything seems to have installed fine, I can get phpinfo() to work as well as other php functions, however I am having trouble loading the dynamic extensions. They exist in the specified directory and I've double checked my php.ini countless times.

    Thanks in advance for any help

    -Haw

      Hi Haw,

      Well, let's see, its a been a few moments since I last worked with this.

      PHP/AIX requires that *.so libraries be compiled in XCOFF format (check in
      AIX doc). Many times, developers have not chosen XCOFF, or, have chosen to
      nest shared object libraries resulting in your requiremnent to have all these
      libraries installed on your AIX server. For exmaple, an xxxx.so under PHP
      will look for a shared object file referenced referenced within it:

      xxxx.so
      references yyyy.so
      yyyy.so
      references zzzz.so
      etc.

      If yyyy.so or zzzz.so are absent, or not in XCOFF format, PHP will indicate
      that shared objects are not found, when in fact they may be found, but in the
      incorrect format. Check your apache error log. It will yield signifcant
      clues. Also, please define your global LD_LIBRARY_PATH environment variable
      in AIX -- AIX will use it to determine in which directories to look for
      shared object files. Example:

      LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/lib/apache:/usr/ldap:/usr/loc
      al/lib/php/extensions/no-debug-non-zts

      Best advice is to locate an .so that doesn't seem to be found or work, and put it in the same directory as an .so that does work. If the good one loads and the other
      doesn't, then you will need to explore why. Try http://www-frec.bull.com/docs/download.htm and download the AIX freeware tools; among them you will find ldd (find link dependencies) and then you can precisely determine what libraries your needing.

      I wish you good luck!

      Christopher CUSE

      Haw Kor wrote:

      I'm also having this problem...has anyone found a solution to this? I'm running aix 4.3.3 with apache 1.3.17 and php4-4.0.4.1

      Everything seems to have installed fine, I can get phpinfo() to work as well as other php functions, however I am having trouble loading the dynamic extensions. They exist in the specified directory and I've double checked my php.ini countless times.

      Thanks in advance for any help

      -Haw

        Christopher,

        Thank you so much for your help.

        I'm still very new to aix and I hadn't known about the XCOFF issue.

        I think the *.so libraries may not be compiled in XCOFF format, however I had used the precompiled distribution of PHP which I found on the frec.bull.com site.

        I've set the LD_LIBRARY_PATH, restarted apache, however it still doesn't work.

        The error log for apache says:
        PHP Warning: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts/libgd.so' - No such file or directory in Unknown on line 0.

        I'm currently downloading the ldd to check my dependencies. Hopefully that will give me more clues as to what is going on. I'll keep you posted.

        Thanks again Christopher,

        -Haw

          Hi Haw,

          Whoops. ldd is not really related ... sorry for the confusion.

          Try this at shell prompt

          dump -n libldap.so | pg

          this will display shared objects that are referenced in libldap.so

          Cheers

          Christopher CUSE

            Christopher,

            I think the problem was with the shared objects that were referenced within the .so files. I ran the find command on them, and there were a few I was not able to locate. Therein lies my problem 🙂.

            Thank you for all your help!

            Best regards,

            -Haw

              21 days later

              hello,

              Can you give more informations on how you solved your problem, because it seems that I have the same problem you had

              Thank you for your help
              Best regards
              remy

                Remy,

                I basically had the same problem that Christopher had and I believe he had gotten it to work. I have to admit I have not had the opportunity to get mine to work. Since I have a particularly 7028/100 ibm powerpc without all the correct software. However I believe the reason my extensions were not loading was because the libraries were not complied in the XCOFF format. Here is how I checked as Chris had told me:

                dump -n libldap.so | pg

                you will need to run this as root.

                Check to see that all the shared objects that are referenced in the particular extension is in the correct places.

                Oh, and don't forget to set your LD_LIBRARY_PATH as mentioned in the posts above.

                Hope this helps,

                -Haw

                  8 months later

                  hi haw, hi mary
                  i have the same problem as haw (aix 4.3.3 with apache1.3.19, php 4.0.4.1 installed as precompiled packages )

                  is one of your systems running now?

                  i've looked in the dependencies,
                  do i need also the *.so files ?

                  my system has only the .a libs installed, like
                  /usr/local/lib/libgd.a

                  but not
                  /usr/local/lib/libgd.so

                    hi Andreas,

                    yes, you will need all the .so files ...

                    what dynamic are you try trying to load in php?

                    cheers

                    chtistopher cuse

                      Hi Andreas,

                      I think I finally got around my problem by going to http://freeware.bull.net/ and downloading their precompiled version of PHP. I believe that fixed my issue. Hope this helps.

                      Haw

                        i tried to load the libmysqld.so, but the problem is that no lib from /usr/local/lib/php/extension/no-debug-non-zts/ can be loaded. ( as defined in php.ini )

                          Hi Andreas,

                          Id your LD_LIBRARY_PATH is properly defined, than you are missing an .so

                          cheers

                          cc

                            7 months later

                            Thanks for the tip Chris. I was seeing these errors in the php errorlog :-
                            Unable to load dynamic library '/usr/local/lib/libiodbc.so' - ld.so.1: /usr/local/apache/bin/httpd: fatal: /usr/local/lib/libiodbc.so: open failed: No such file or directory in Unknown on line 0
                            PHP Warning: Invalid library (maybe not a PHP library) 'libpdf.so' in Unknown on line 0

                            and my php scripts would die with :-
                            exit signal Bus Error (10)
                            when they tried to use the pdflib

                            Adding the following to the top of apachectl seems to have fixed it - but only if it's done in this order :-

                            LD_LIBRARY_PATH=/u01/app/oracle/product/8.1.6/lib:/usr/lib:/usr/local/lib
                            export LD_LIBRARY_PATH

                              Write a Reply...