Solved

Permission denied to PHP when attempting to load dynamic library

Posted on 2007-04-03
4
774 Views
Last Modified: 2013-12-13
[Solaris 10, Oracle 10.2, PHP 5.2, Apache 2.2]

I am getting the following error when php attempts to load the oci8.so extension module:

Warning: dl() [function.dl]: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/oci8.so' - ld.so.1: httpd: fatal: /opt/oracle/product/10.2.0/lib32/libnnz10.so: Permission denied in /usr/local/apache/htdocs/phpinfo.php on line 16

I have checked permissions on all affected library modules specified in  [ ldd oci.so ] and they are all set [chmod] to 644.

Any help would be appreciated.

Thanks
0
Comment
Question by:DelMays
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Aamir Saeed
ID: 18847205
0
 
LVL 15

Expert Comment

by:samri
ID: 18848975
Hi DelMays,

This looks like permission problem -- as you had figured out.

The PHP script /usr/local/apache/htdocs/phpinfo.php are unable to load the library from the shared library - /opt/oracle/product/10.2.0/lib32/libnnz10.so

You had chmod'ed the file (/opt/oracle/product/10.2.0/lib32/libnnz10.so) to 644, this give a "-rw-r--r--" permission to this file.  It should be fine (as far as the access to the file is concerned). But check if apache process could access this file -- look at the path permission as well - /opt/oracle/product/10.2.0/lib32/

The quickest thing (that I would do is) to switch myself to the user apache is configured to run as -- which is some cases it could be wwwrun, or apache, or nobody (this looks like a Solaris box).  And when you get to the shell prompt, try doing a

ls /opt/oracle/product/10.2.0/lib32/libnnz10.so

make sure there is list-able.

if there is error about permission (which I think there is), then traverse thru the directory tree /opt/oracle/product/10.2.0/lib32/libnnz10.so and verify that permission is at least "read" to Others (world).

HTH.
0
 

Accepted Solution

by:
DelMays earned 0 total points
ID: 18852903
The libnnz10.so library was being referenced by a soft link to /opt/oracle/product/10.2.0/lib32/libnnz10.so.

Once libnnz10.so was physically copied to the /lib directory and the soft link removed, the libnnz10.so library was "found" and loaded.
0
 
LVL 15

Expert Comment

by:samri
ID: 18855850
Hi DelMays,

Great!  So we could assume that you had found a solution.  If you think that any comments here is useful for reference, please accept any of the comment as Answer or Assistance.  Otherwise, you could request for a "Refund".  



Cheers.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question