Solved

Permission denied to PHP when attempting to load dynamic library

Posted on 2007-04-03
4
779 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 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

635 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