|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
Retry step 2 with:
./configure --prefix=/path/to --enable-module=most --enable-shared=max # or use a layout. |
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
||||
|
||||
|
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. |
|
#6
|
|||
|
|||
|
--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. |
|
#7
|
||||
|
||||
|
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/. |
|
#8
|
||||
|
||||
|
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 |
|
#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.
|
|
#10
|
|||
|
|||
|
Check out the additional info I just posted in that Which Linux distribution is better? thread.
|
|
#11
|
||||
|
||||
|
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? |
|
#12
|
|||
|
|||
|
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. |
|
#13
|
||||
|
||||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > starting apache with libphp4 error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|