LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux > 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
 
Thread Tools
Old 01-06-2005, 09:10 AM   #1
papitu76
Member
 
Registered: Apr 2004
Location: Pamplona (NAVARRA)
Distribution: Debian/RedHat/Mandrake
Posts: 36
Thanked: 0
cannot load libphp4.so becasue i havent such a file


[Log in to get rid of this advertisement]
I have installed apache 2.0.51 in a debian 3.0 with the following configure
--prefix=/usr/local/apache --enable-so

and i have installed php 4.3.10 using the following configure
--prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-xmlrpc --with-mysql=/usr/local/mysql

Both installations were ended fine.

I have changed the httpd.conf to add among other the following:
LoadModule php4_module modules/libphp4.so

When i start the apache server i get the error that it cannot load the module. And i look for the file libphp4.so in the whole system but is missing.

How is this file libphp4.so generated?

Thanks.
papitu76 is offline     Reply With Quote
Old 01-06-2005, 11:27 PM   #2
bobbyjoe
Member
 
Registered: Nov 2004
Posts: 46
Thanked: 0
I don't know.

Maybe you just need to edit your httpd configuration file, and replace libphp4.so with mod_php4.so

check my httpd/conf.d/70_mod_php.conf
<IfDefine HAVE_PHP4>
<IfModule !mod_php4.c>
LoadModule php4_module extramodules/mod_php4.so
</IfModule>
</IfDefine>

<IfModule mod_php4.c>
PHPINIDir /etc
</IfModule>

<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
</IfModule>
bobbyjoe is offline     Reply With Quote
Old 01-07-2005, 02:29 AM   #3
papitu76
Member
 
Registered: Apr 2004
Location: Pamplona (NAVARRA)
Distribution: Debian/RedHat/Mandrake
Posts: 36
Thanked: 0

Original Poster
I havent neither mod_php4.so file.

The closer files i have in the system are:
mod_php4.c
mod_php4.exp
mod_php4.h
and
libphp4.module.in

and all of them are in the directory where i have all the sources i downloaded, php-4.3.10.tar.gz

So i guess the problem is in how i configured the php. Do you remeberber how you did it? What version are you using?

Thanks.
papitu76 is offline     Reply With Quote
Old 01-07-2005, 03:10 AM   #4
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851
Thanked: 0
those are the source files used to create libphp4.so
you did compile it, correct? if so, then do this:
Code:
$ su
# updatedb
# locate libphp4.so
That's the directory path you want.
scuzzman is offline     Reply With Quote
Old 01-07-2005, 03:18 AM   #5
bathory
Senior Member
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 4,286
Thanked: 115
The only difference I see in your ./configure for php is that you define a --prefix=/usr/local/php but I don't think it's the case. See if you have a libexec directory under apache directory tree and if libphp4.so is in there and change httpd.conf
bathory is offline     Reply With Quote
Old 01-07-2005, 03:33 AM   #6
papitu76
Member
 
Registered: Apr 2004
Location: Pamplona (NAVARRA)
Distribution: Debian/RedHat/Mandrake
Posts: 36
Thanked: 0

Original Poster
I had done:
#updatedb
#locate libphp4.so
And there are no files like that in the whole system.

I have also installed the new apache.2.0.52 in case there was a problem with hte 2.0.51. But nothing. I havent tried new changes with the --prefix in the php-4.3.10 installation becasue it doesnt look like it is the problem.

I will install the php to make sure the installation was fine.

C u soon. Thanks for your tips.
papitu76 is offline     Reply With Quote
Old 01-07-2005, 05:06 AM   #7
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973
Thanked: 0
if you use this way to install packages (installing in /usr/local/<package name>) then you have to manually set up your paths ( such as PATH, LD_LIBRARY_PATH, etc...) for each one.

so for example, the way you have these configured, you would have to add the following to /etc/ld.so.conf:

/usr/local/php/lib
/usr/local/apache/lib (assuming it has shared libraries you need to link)

after you have the above lines added into /etc/ld.so.conf run (as root):

/sbin/ldconfig

to run apache out of that directory set up the PATH environment variable to add /usr/local/apache/bin.
__J is offline     Reply With Quote
Old 01-07-2005, 11:05 AM   #8
papitu76
Member
 
Registered: Apr 2004
Location: Pamplona (NAVARRA)
Distribution: Debian/RedHat/Mandrake
Posts: 36
Thanked: 0

Original Poster
I have followed your tip and add add the following to /etc/ld.so.conf:
Quote:
Originally posted by __J
/usr/local/php/lib
/usr/local/apache/lib (assuming it has shared libraries you need to link)

after you have the above lines added into /etc/ld.so.conf run (as root):

/sbin/ldconfig

[/b]
But i have no clear idea what do you mean with "run apache ot"

Quote:
Originally posted by __J
to run apache out of that directory set up the PATH environment variable to add /usr/local/apache/bin. [/b]
Any way i am a bit confused with this installation.

I swear that the php installation ended ok, i even got the messages that at the end gives you tips of security. Or i might not seen some other mesaages??? Who knows!!!

The thing is that this time the php installation ended with erros. And they are related to the libphp4.so.

It said:
libroll: install warning remember to run 'libtool --finish /usr/src/php-4.3.10/libs

Warning! dlname not found in /usr/local/apache/modules/libphp4.la

Assuming installing a .so rather a libtool archive
chmod 755 /usr/local/apache/modules/libphp4.so
chmod: attributes of: No such file or directory

apxs. Error Command falied withrc:65536
make: ***[install-sapi] Error 1

I hope i wrote everything appeared on the screen right becasue i am not able to copy from the monitor to any application(it si posted as well in this forum).

So i executed the following sentence:
#libtool --finish /usr/src/php-4.3.10/libs

And i installed again.

I didnt get again the errors above written but i couldnt start the web server. The error i got is:
(98) Address already in use:
make_sock: could not bind to adress 0.0.0.0:80

But i reboot the system (i am sorry ia had to do that) and now it works. I will try now to see if php works.

Thanks for all your tips.
papitu76 is offline     Reply With Quote
Old 01-07-2005, 12:12 PM   #9
papitu76
Member
 
Registered: Apr 2004
Location: Pamplona (NAVARRA)
Distribution: Debian/RedHat/Mandrake
Posts: 36
Thanked: 0

Original Poster
it works, i could make wok a file with php code.

Thanks to every one.
papitu76 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Unable to start Apache "Cannot load /etc/httpd/modules/libphp4.so" dagalicous Linux - Software 1 03-10-2005 01:43 AM
Can' t load libphp4.so into apache delfins Slackware 3 01-10-2003 09:49 AM
cannot load libexec/libphp4.so into server GabeF Linux - Software 1 11-29-2002 04:36 PM
Cannot load /usr/lib/apache/libphp4.so into server jmnovak Linux - General 3 07-01-2002 10:52 AM
apache can't load libphp4.so rangga_k Linux - General 7 03-01-2001 02:52 AM


All times are GMT -5. The time now is 03:24 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration