As for your ldconfig results, you're missing all your /usr/local libraries -- of which the php library was one. Easy enough to fix (this example shows an X Windows library structure also, eliminate if you don't have it because you did not install the X infrastructure when you installed the OS):
# ldconfig /usr/local/lib /usr/X11R6/lib /usr/lib
Afterwards, run ldconfig -r and see if it's picked up your local libraries. If you have more applications with more libraries in more places, add them to the list.
|