Solved

Permission denied to PHP when attempting to load dynamic library

Posted on 2007-04-03
4
761 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
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Aamir Saeed
Comment Utility
0
 
LVL 15

Expert Comment

by:samri
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now