Solved

Permission denied to PHP when attempting to load dynamic library

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
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 count occurrences of each item in an array.

910 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

25 Experts available now in Live!

Get 1:1 Help Now