Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 15th, 2001, 07:46 AM
ballermann ballermann is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 1 ballermann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
starting apache with libphp4 error

Hi all,
I installed

- mysql 3.23.37
./configure --prefix=/usr/local/mysql
make
make install
mysql_install_db

- apache 1.3.19
./configure"--enable-shared=max
make
make install
./httpd

- php 4.0.3pl1
./configure \
--with-apxs=/APACHEDIR/bin/apxs \
--with-mysql=/usr/local/mysql
make
make install

edit the httpd.conf
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

after edit the httpd.conf and starting the apache, i got the following error:

Syntax error on line 222 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: shared object not open
./apachectl start: httpd could not be started

what does it mean ???

Your

ballermann

Last edited by ballermann : May 15th, 2001 at 07:55 AM.

Reply With Quote
  #2  
Old May 17th, 2001, 06:41 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Retry step 2 with:

./configure --prefix=/path/to --enable-module=most --enable-shared=max # or use a layout.

Reply With Quote
  #3  
Old February 19th, 2002, 01:38 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
I'm currently having about the same problem as ballermann. I'm a little new to apache in linux enviroment, so could you just break that line down for me? I'm thinking it might solve my problem too, I'd just like to know exactly what it is.
__________________
-- Tomi Kaistila
-- Developer's Journal

The more you learn, the more you know.
The more you know, the more you forget.
The more you forget, the less you know.

Reply With Quote
  #4  
Old February 19th, 2002, 07:28 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
1) Don't use /usr/local/apache (non-standard). Use just /usr/local as your PREFIX at all time.
2) Add /usr/local/lib to your ld.so.conf or by running ldconfig.
In FreeBSD, this is done by default because:
cat /usr/default/rc.conf | grep ldconfig
ldconfig_insecure="NO" # Set to YES to disable ldconfig security checks
ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib"
ldconfig_paths_aout="/usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout"
In NetBSD,
cat /etc/ld.so.conf
/usr/local/lib
libm.so.0 machdep.fpu_present 1:libm387.so.0,libm.so.0
If your Linux distribution hasn't set this by default, what a shame, you will have to do this yourself, and maybe doing it just once in your life.
3) Install Mysql and set its PREFIX to /usr/local
4) Install Apache and set its PREFIX to /usr/local. In addition, specify --enable-module=most --enable-shared=max then mod_so (DSO method) will be available for building other 3rd party modules as a shared module.
5) Install PHP and specify the PATH to apxs. Either /usr/local/sbin/apxs or /usr/local/bin/apxs.
6) If you need to install additional modules, just use DSO method and specify the PATH to apxs.

I am getting tired for telling people to follow the standard - by using /usr/local as the PREFIX. If you don't take my advice, you are asking for troubles and don't ask anyone for help, because you are warned.

Reply With Quote
  #5  
Old February 19th, 2002, 07:44 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
Actually, I meant if you could explain me what this line does: --enable-module=most --enable-shared=max #

But now that we are in the subject, why is it so imporant to install apache with /usr/local/ as the server root? Doesn't sound like a big problem but I'd just like to know the logic behind it.

Reply With Quote
  #6  
Old February 19th, 2002, 07:58 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
--enable-module=most is to enable most of the non-default modules, just to name a few: mod_rewrite, mod_proxy, mod_unique_id. Like Options in httpd.conf where you can disable Indexes by putting a leading - like so:
Options -Indexes, you also can specify --disable-module=mod_auth_dbm or whatever you want it to be disabled.

--enable-shared=max, that is to enable as many modules as possible as shared. When one or more module is specified as a shared module, mod_so is automatically enabled.

For /usr/local hierachy discussion, do a search using /usr/local as the search keyword, then search all open forums and under my username. It's being mentioned almost once a day.

Reply With Quote
  #7  
Old February 19th, 2002, 08:17 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
Okei, so let see if I got this right. /usr/local/ is a standard location where Apache should be installed. To what I understood Apache uses that as a root and tries to locate files from that directory. I hope I got it right. In any case I'm a little confused, since all files are placed under a directory named apache_[version]/ when you untar the installation files. So how do you get the files into /usr/local/?

This is what happens to me at least. And my apache is located in /usr/local/apache_1.2.23/.

Reply With Quote
  #8  
Old February 19th, 2002, 08:37 AM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 7 h 49 m 27 sec
Reputation Power: 21
Where you extract the source files for Apache (or whatever you're building) doesn't really matter, since after you've compiled it you can remove the source files. Or do whatever you want with them since they're no longer needed.
By using PREFIX= you specify where you want to install it (/usr/local). If you don't specify anything, it will be installed in the default directory, which is up to whoever created the source to decide. Which also means that you'll end up with stuff in the most weird places, and it can also differ from version to version...
Which probably is why FreeBSD often says that you'll end up with files all over the place...

//NoXcuz
__________________
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep

Reply With Quote
  #9  
Old February 19th, 2002, 08:44 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
I see. Yet another matter that I overlooked. Sometimes I find the linux filesystem so confusing. Anyway thanks for the help. I'll try installing Apache again tonight with the line freebsd wrote previously. Lets see where it'll take me.

Reply With Quote
  #10  
Old February 19th, 2002, 08:58 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Check out the additional info I just posted in that Which Linux distribution is better? thread.

Reply With Quote
  #11  
Old February 21st, 2002, 02:14 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
Okei, back to basis. I tried to install apache into /usr/local/ prefix, and used the following command line:
Code:
./configure --prefix=/usr/local --enable-module=most --enable-shared=max


This worked fine until I tried to issue make. It ran for a while then it gave a small error and slowly died out. The error was very unspecific. Something like [mod_auth_dbm] error 1. Which was followed by lines like [all] error 1, and so on. I tried to add --disable-module=mod_auth_dbm but it only told me that it was an unknown command. Any suggestions?

Reply With Quote
  #12  
Old February 21st, 2002, 05:15 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
In general you will need more than just --prefix=/usr/local --enable-module=most --enable-shared=max.
FreeBSD, for example, you will have to add --enable-module=auth_db and --disable-module=auth_dbm explicitly because they db and dbm conflicts one another and BSD doesn't use dbm by default.
Another optional options - --with-layout=xxxx. There are some default layouts in the file named config.layout at the root of your Apache src. Say you want to use the GNU layout, you would specify --with-layout=GNU. You also can create your own layout and specify --with-layout=/path/to/layout.txt:MyLayout ( using full path is not required so long as you don't screw up your relative-path).
In layout.txt specify:
<Layout MyLayout>
...
...
...
</Layout>
Using --with-layout option is not required, but helpful because Apache will follow your specified layout and create the httpd.conf for you automatically.

>> And my apache is located in /usr/local/apache_1.2.23/

BTW, BSD and many other UNIX systems use /usr/local/src for local sources. So placing your tarball to /usr/local/src and extract it from there keeps your filesystem cleaner. You will only see /usr/local/src/apache_1.2.23 there.
If you checkout the RedHat layout, you should see Redhat considers Apache part of its default system by specifying a PREFIX of /usr, which is fine too.

Last edited by freebsd : February 21st, 2002 at 05:25 AM.

Reply With Quote
  #13  
Old February 22nd, 2002, 02:33 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
Thank you freebsd. I got the source compiled yesterday night. I had to disable both auth_db and auth_dbm to make it work but since I will have no use for them (at this time) anyway it doesn't sound like big deal. Thank you again for your valuable advices.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > starting apache with libphp4 error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |