delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/05/07/06:23:49

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <409B63FA.2060603@x-ray.at>
Date: Fri, 07 May 2004 12:24:58 +0200
From: Reini Urban <rurban AT x-ray DOT at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7b) Gecko/20040421 MultiZilla/1.5.0.4h
MIME-Version: 1.0
To: "'Cygwin List'" <cygwin AT cygwin DOT com>
Subject: Re: how to build php in cygwin?
References: <c7cmcl$cnq$1 AT sea DOT gmane DOT org> <55A7500C DOT 4AB705E2 AT mail DOT gmail DOT com> <409A9E0A DOT 1080408 AT DeFaria DOT com>
In-Reply-To: <409A9E0A.1080408@DeFaria.com>
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hornet.mur.at
X-Spam-Level:
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63
X-IsSubscribed: yes

Andrew DeFaria schrieb:
> Joshua Daniel Franklin wrote:
> Well I went to that URL and downloaded 
> http://apache.dev.wapme.net/support/cygwin-packages/apache-modules/mod_php4/apache-php-4.2.0-2.tar.bz2, 
> bunzip2 and untarred it and ran the postinstall (after first commenting 
> out the last line which is an rm which assumes that the preceeding line, 
> the rebase, doesn't fail):
> 
> $ /etc/postinstall/apache-php.sh
> [activating module `php4' in /etc/apache/httpd.conf]
> cp libphp4.dll /usr/lib/apache/libphp4.dll
> chmod 755 /usr/lib/apache/libphp4.dll
> cp /etc/apache/httpd.conf /etc/apache/httpd.conf.bak
> cp /etc/apache/httpd.conf.new /etc/apache/httpd.conf
> rm /etc/apache/httpd.conf.new
> usage: rebase -b BaseAddress [-Vdv] [-o Offset] [-T FileList | -] Files...
> 
> After this I cannot start Apache. Running a syntax check:
> 
> $ httpd -t
> Syntax error on line 238 of /etc/apache/httpd.conf:
> Cannot load /usr/lib/apache/libphp4.dll into server: dlopen: Win32 error 
> 126

stipe's postinstall.sh has a wrong rebase syntax, the required -b 
parameter is missing.
so before you run /etc/postinstall/apache-php.sh you have to fix it.

The commented line above is fine, but I removed postgres (pq.dll), since 
I don't need that.

my postinstall script looks like this:

#!/bin/sh
module=php4
module_dll=libphp4.dll
prefix=/usr
confdir=/etc
libdir=${prefix}/lib/apache
cd ${libdir}/new
if test -f ${module_dll}; then
   ${prefix}/sbin/apxs -i -a -n ${module} ${module_dll}
fi
rm -f ${libdir}/new/${module_dll}

# removed: ${prefix}/bin/pq.dll
# probably have to add: cygcrypt-0.dll and /usr/bin/cygcrypto-0.9.7.dll

rebase_dlls="${libdir}/${module_dll} /usr/bin/cygcrypto.dll 
/usr/bin/cygbz21.0.dll /usr/bin/cygintl-1.dll /usr/bin/cygxml2-2.dll 
/usr/bin/cygz.dll /usr/bin/cyggdbm.dll"
${prefix}/bin/rebase -v -d -b 0x68000000 -o 0x10000 ${rebase_dlls}; 
/usr/sbin/httpd
#${prefix}/bin/rebase -v -b 0x70000000 ${rebase_dlls}; /usr/sbin/httpd

$ less /usr/share/doc/Cygwin/rebase-2.3.README

$ nano /etc/apache/http.conf
#change the Port 8080, since another apache instance already runs on 80

$ cygcheck /usr/sbin/httpd.exe
# see that some other dll's are also loaded, but they are loaded above 
0x70000000

$ pg_ctl stop
# if you keep postgres, you have to shut it down, otherwise you cannot 
rebase it.

$ rebase -v -b 0x70000000 ${rebase_dlls}; apachectl start
/usr/lib/apache/libphp4.dll: new base = 70000000, new size = 1e0000
/usr/bin/cygbz21.0.dll: new base = 701e0000, new size = 20000
/usr/bin/cygcrypto.dll: new base = 70200000, new size = b0000
/usr/bin/cygintl-1.dll: new base = 702b0000, new size = 10000
/usr/bin/pq.dll: new base = 702c0000, new size = 20000
/usr/bin/cygxml2-2.dll: new base = 702e0000, new size = 130000
/usr/bin/cygz.dll: new base = 70410000, new size = 20000
/usr/bin/cyggdbm.dll: new base = 70430000, new size = 10000

[Fri May  7 10:29:02 2004] [warn] Loaded DSO lib/apache/libphp4.dll uses 
plain Apache 1.3 API, this module might crash under EAPI! (please 
recompile it with -DEAPI)
f:\cygnus\usr\sbin\httpd.exe (3728): *** unable to remap 
f:\cygnus\bin\cygcrypto.dll to same address as parent(0x70200000) != 
0x70210000
/usr/sbin/apachectl start: httpd could not be started

you have to try to start apache and rebase it again until it works.
now trying downwards from 0x68000000 on.

$ rebase -v -d -b 0x68000000 ${rebase_dlls}; apachectl start

/usr/lib/apache/libphp4.dll: new base = 67e20000, new size = 1e0000
/usr/bin/cygbz21.0.dll: new base = 67e00000, new size = 20000
/usr/bin/cygcrypto.dll: new base = 67d50000, new size = b0000
/usr/bin/cygintl-1.dll: new base = 67d40000, new size = 10000
/usr/bin/pq.dll: new base = 67d20000, new size = 20000
/usr/bin/cygxml2-2.dll: new base = 67bf0000, new size = 130000
/usr/bin/cygz.dll: new base = 67bd0000, new size = 20000
/usr/bin/cyggdbm.dll: new base = 67bc0000, new size = 10000

[Fri May  7 10:30:58 2004] [warn] Loaded DSO lib/apache/libphp4.dll uses 
plain Apache 1.3 API, this module might crash under EAPI! (please 
recompile it with -DEAPI)
f:\cygnus\usr\sbin\httpd.exe (2580): *** unable to remap 
f:\cygnus\bin\cygssl-0.9.7.dll to same address as parent(0xB60000) != 
0xB70000
/usr/sbin/apachectl start: httpd could not be started

And now we are at the same position as stipe. Looks like we have to 
recompile httpd without cygcrypt-0
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019