LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 08-08-2007, 10:43 PM   #1
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Rep: Reputation: 30
php5 libphp5.so error


Hey all,
Trying to install php5 on Red Hat Enterprise 4.
Done the following
Code:
./configure
make
make install
cp php.ini-dist /usr/local/lib/php.ini
Then in /etc/httpd/conf/httpd.conf
I added:

Code:
LoadModule php5_module modules/libphp5.so
BUT../etc/httpd/modules contains libphp4.so NOT libphp5.so

WHen I try to do a restart of apache, I get the following error:
Code:
$apachectl graceful
apachectl: Configuration syntax error, will not run "graceful":
Syntax error on line 190 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory
Appretiate any help. Thanks so much!!!
 
Old 08-09-2007, 12:15 AM   #2
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
For some reason, now when i issue

Code:
php -v
I get Version 5.2.3, a start.

I've also edited /etc/httpd/conf.d/php.conf to reflect php5 and not php4.
But when I try to "apachectl graceful" I still get:

Code:
$apachectl graceful
apachectl: Configuration syntax error, will not run "graceful":
Syntax error on line 190 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory
There is still no modules/libphp5.so

Anyone help please
 
Old 08-09-2007, 12:55 AM   #3
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
I keep seeing that i need to configure php with this option:

Code:
--with-apxs2=/usr/local/apache2/bin/apxs
BUt I am on Red Hat Enterprise, and I dont have a /usr/local/apache2 directory.


apachectl is located /usr/sbin/apachectl

So im still lost.
 
Old 08-09-2007, 02:49 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can copy manually the libphp5.so that is located under the subdirectory libs in hte directory you built php into the modules directory of apache and restart apache.
Or you can search your disk to find where it's installed and change LoadModule php5_module accordingly.
 
Old 08-09-2007, 07:53 AM   #5
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
I have tried to locate libphp5.so, and it is nowhere on my system. Not in the modules directory where i built php either.
 
Old 08-09-2007, 08:50 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Under the directory you extracted and compiled php there are 2 subdirs, one named libs and another one named .libs (it's hidden). If the module does not exist under libs, then it's under .libs
 
Old 08-09-2007, 09:23 AM   #7
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274

Original Poster
Rep: Reputation: 30
Bathory,
Thanks for the reply. libs does exist but it is empty, and .libs does NOT exists. I have run a "locate libphp5.so" and its just no where to be found.

Was I missing an option at configuration time? I simply ran it "./configure".
But im confused with the apxs stuff, as I dont have any directories with that name.

Thanks
 
Old 08-10-2007, 01:59 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You absolutely need apxs in order to build php as an apache module. Use "locate" to find where apxs is installed and use that path in your ./configure script. If apxs doesn't exist, then apache is compiled without DSO support.
 
  


Reply



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
Error in PHP 5.0.5 and Apache 1.3.34 - Cannot load libphp5.so jun_tuko Linux - Software 7 01-05-2008 11:12 PM
error while trying to launch apache server- permission prob with libphp5.so rlee923 Linux - Newbie 2 03-11-2007 04:41 AM
Apache Server error, libphp5.so crillegs Linux - Software 3 05-23-2006 01:56 PM
FreeBSD PHP5 ports error - libphp5.la is not a valid libtool archive BizHat.com *BSD 2 08-18-2005 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:48 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration