Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Permission denied to PHP when attempting to load dynamic library

Posted on 2007-04-03
4
Medium Priority
?
781 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to count occurrences of each item in an array.
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.

715 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