LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-19-2005, 02:13 PM   #1
gravesb
Member
 
Registered: May 2005
Distribution: Suse 9.3, Gentoo
Posts: 87

Rep: Reputation: 15
cannot access `/usr/local/apache2/modules/libphp5.so'


I am installing apache, mysql, and php. I have looked several places for the error that I receive when I try and install php, which is
cannot access `/usr/local/apache2/modules/libphp5.so'
when I run make install. I am running 64 bit Gentoo.
I looked around the internet, and most of the responses to my problem are in a different language, which doesn't help much. I found one that talked about copying certain files from /usr/lib64 to /usr/lib, but I was missing one of those files. Here are my ./configure commanders for both apache and php.

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/bin/mysql --enable-shared

./configure --enable-auth-dbm --enable-headers --enable-info --enable-speling --enable-ssl --enable-so
 
Old 11-19-2005, 02:21 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
What command do you get to receive that error?

Can you post the output from:
ls -l /usr/local/apache2/modules/libphp5.so
 
Old 11-19-2005, 02:37 PM   #3
gravesb
Member
 
Registered: May 2005
Distribution: Suse 9.3, Gentoo
Posts: 87

Original Poster
Rep: Reputation: 15
ls: /usr/local/apache2/modules/libphp5.so: No such file or directory


The command is make install
 
Old 11-19-2005, 03:08 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Does the modules directory exist?
ls -l /usr/local/apache2/modules/

Are you installing as root?
 
Old 11-19-2005, 03:24 PM   #5
gravesb
Member
 
Registered: May 2005
Distribution: Suse 9.3, Gentoo
Posts: 87

Original Poster
Rep: Reputation: 15
ls -l /usr/local/apache2/modules/
total 13488
-rw-r--r-- 1 root root 8454 Nov 19 09:11 httpd.exp
-rw-r--r-- 1 root root 13771816 Nov 19 09:50 libphp5.a
-rw-r--r-- 1 root root 828 Nov 19 09:50 libphp5.la


Yeah, I am installing as root. I have run both find and locate to see if the libphp5.so was installed somewhere else, but no dice. What should create it, and what would cause it not to be created
 
Old 11-19-2005, 03:27 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
When you run make install it should create it.

Try running "make clean && ./configure && make && make install". What is the last thing you can see on the screen?
 
Old 11-19-2005, 04:44 PM   #7
gravesb
Member
 
Registered: May 2005
Distribution: Suse 9.3, Gentoo
Posts: 87

Original Poster
Rep: Reputation: 15
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a
ranlib /usr/local/apache2/modules/libphp5.a
chmod 644 /usr/local/apache2/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /home/gravesb/src/php-5.0.5/libs'
Warning! dlname not found in /usr/local/apache2/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2/modules/libphp5.so
chmod: cannot access `/usr/local/apache2/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1
 
Old 11-20-2005, 08:34 AM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
From a bit of research it looks like it's an issue with 64bit systems keeping libraries in a different path. See the fix at:
http://bugs.php.net/bug.php?id=27795#c83708
 
Old 11-20-2005, 11:31 AM   #9
gravesb
Member
 
Registered: May 2005
Distribution: Suse 9.3, Gentoo
Posts: 87

Original Poster
Rep: Reputation: 15
Thank you. I don't understand why the bz2 file worked, and the gzip file did not.
 
Old 12-29-2006, 04:27 PM   #10
wesko
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
also missing libphp5.so...

Is there a special order needed to emerge php and apache? I did it on my previous server (2.4, forgot the emerge-order) and now, on a new machine, amd64, I tried to emerge php and apache. After some fiddling and walking around I seem to be missing libphp5.so.

sumatra # ls -l /usr/local/apache2/modules/
ls: cannot access /usr/local/apache2/modules/: No such file or directory

Actually when i restart apache I get
sumatra # /etc/init.d/apache2 restart
* Apache2 has detected a syntax error in your configuration files:
Syntax error on line 5 of /etc/apache2/modules.d/70_mod_php.conf:
Cannot load /usr/lib/apache2/extramodules/libphp5.so into server: /usr/lib/apache2/extramodules/libphp5.so: cannot open shared object file: No such file or directory

It puzzles me that this is called a syntax error?

My 70_mod_php_conf:
<IfDefine PHP5>

# Load the module first
<IfModule !sapi_apache2.c>
LoadModule php5_module extramodules/libphp5.so
</IfModule>
[...]

If anybody knows what I possibly did wrong (I only emerged php, apache, mysql, ssh, libgd, no fancy other commands) please give me some advice. That would be highly appreciated.
_______
I am not that handy in Linux but I found my way on the old server. Now many small things changed I must have lost it:-) It worked so well that after 300 days, I only reset the toko to add a disk and now we're a good 613 days up. But the box is too slow for my sql/php tasks on 333 Mhz. So I decided to get me a new 1500 Mhz AMD.
 
Old 01-02-2007, 10:37 AM   #11
gravesb
Member
 
Registered: May 2005
Distribution: Suse 9.3, Gentoo
Posts: 87

Original Poster
Rep: Reputation: 15
Is the libphp5.so file on your computer anywhere? If so, you should be able to copy it over to the target directory, or change your apache config file to point to the correct location.
 
Old 01-03-2007, 01:23 AM   #12
wesko
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by gravesb
Is the libphp5.so file on your computer anywhere? If so, you should be able to copy it over to the target directory, or change your apache config file to point to the correct location.
I'll try and find it, good point. I forgot to tell I use Gentoo Linux and most of the time it just works after emerging and /etc/init.d/restart xxx. That the nice thing. That's why I'm so confused now.
 
Old 01-23-2011, 04:06 PM   #13
lamachine
LQ Newbie
 
Registered: Apr 2010
Posts: 8

Rep: Reputation: 0
missing PHP5 module

Hi guys. Googling “cannot access `/usr/lib/apache2/modules/libphp5.so': No such file or directory” shows up this outdated post. To spear ppl crawling through the web I'll resurrect the subject.
The point is that apache is missing PHP5 module. In the case of debian it is "apt-get install libapache2-mod-php". Once the module is installed compiling works fine.
 
Old 12-02-2011, 02:56 AM   #14
jigarakatidus
LQ Newbie
 
Registered: Dec 2011
Posts: 2

Rep: Reputation: Disabled
Already wasted 3 days on this :|

Quote:
Originally Posted by lamachine View Post
Hi guys. Googling “cannot access `/usr/lib/apache2/modules/libphp5.so': No such file or directory” shows up this outdated post. To spear ppl crawling through the web I'll resurrect the subject.
The point is that apache is missing PHP5 module. In the case of debian it is "apt-get install libapache2-mod-php". Once the module is installed compiling works fine.
Yup I googled the same and now I am here.

But there is no better place to find the answer. I get that my libphp5.so is missing from my apache/modules. I am on CentOS 5.7 with Apache 2.2, trying to compile PHP. but my "sudo make install" fails with the same error:
Code:
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' libphp5.la /usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install cp libphp5.la /usr/local/apache/modules/
cp .libs/libphp5.lai /usr/local/apache/modules/libphp5.la
cp .libs/libphp5.a /usr/local/apache/modules/libphp5.a
chmod 644 /usr/local/apache/modules/libphp5.a
ranlib /usr/local/apache/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /setups/php-5.3.8/libs'
Warning!  dlname not found in /usr/local/apache/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/libphp5.so
chmod: cannot access `/usr/local/apache/modules/libphp5.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
make: *** [install-sapi] Error 1
I am expecting libphp5.so to generate automatically as I am installing it from source.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP5 + Apache 2.x : /usr/local/modules/libphp5.so: Undefined symbol "apr_table_set" Ephracis Linux - Software 6 10-01-2010 12:26 PM
/usr vs /usr/local on linuxpackages.net merchtemeagle Slackware 4 10-18-2005 03:09 PM
Cannot load /usr/lib/apache2/libphp5.so into server Kristijan Slackware 1 10-08-2005 12:28 AM
Webmin: The Apache server executable /usr/local/apache2/bin does not exist hektor Linux - Software 0 01-14-2005 06:48 AM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 09:21 AM


All times are GMT -5. The time now is 07:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration