From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6257 invoked by alias); 17 Sep 2003 14:27:44 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 6250 invoked from network); 17 Sep 2003 14:27:42 -0000 Received: from unknown (HELO boltblue.com) (212.187.213.86) by sources.redhat.com with SMTP; 17 Sep 2003 14:27:42 -0000 Received: (qmail 16090 invoked from network); 17 Sep 2003 14:17:38 -0000 Received: from unknown (HELO web-a01.) (212.187.213.111) by smtp.boltblue.com with SMTP; 17 Sep 2003 14:17:38 -0000 Received: (from nobody@localhost) by web-a01. (8.11.6/8.11.6) id h8HERft04130 for cygwin@cygwin.com; Wed, 17 Sep 2003 15:27:41 +0100 To: "cygwin@cygwin.com" Subject: Re: More Apache/PHP installation puzzles Message-ID: <1063808861.3f686f5d5a2a3@www.boltblue.com> Date: Wed, 17 Sep 2003 14:28:00 -0000 From: References: <1063725022.3f6727de2ee70@www.boltblue.com> <1063730155.3f673bebb45ae@www.boltblue.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 1.0 X-Originating-IP: 80.177.164.102 X-SW-Source: 2003-09/txt/msg01140.txt.bz2 Hello Igor, Further to your request I pressed on a bit - sort of funbling in the dimpsey light really!! I found that perl was not installed (needed for axps) and that installing perl installed the correct version of Openssl and this, in turn, installed the cygcrypto.dll. A little progress! I then manually re-installed the mod-php4 stuff and editted postinstall/apache- php.sh. I removed the call the rebase and the call to remove the temporary (/new/libphp4.dll) file. Running ./apache-php.sh then ran without errors. The libphp4.dll was also in the right place. I then ran $ rebaseall -v > /tmp/op. Examining /tmp/op it seemed as though all the files mentioned in the postinstall script had been successfully rebased (along with a rake of other files). I checked the file permissions of everything I could think of relating to Apache and PHP - all looked OK to me. I started the apache server and accessed http://localhost/ and got the expected Apache splash page. I then wrote a test PHP script and put it in tester.php. Accesing localhost/tester.php simply printed out the text - i.e. PHP still not working. (I even formatted the test script properly this time!) I can't think what else to try and so I'll leave it to the experts now. Anything else I try would be akin to charging around in the complete darkness now! Thanks for your help - I expect that Stipe will crack it sometime. Regards, Dave. Quoting Igor Pechtchanski : > On Tue, 16 Sep 2003 dave_d@boltblue.com wrote: > > > Hello Igor, > > > > Apologies to the maintainer then - I'm new to these mailing list > thingees! > > > > Thanks for the info about mount points - it didn't cross my mind that > /usr/lib > > might be a separate mount. $ df would have answered that, eh? > > Yep. So would "mount". > > > The rest remains, I think. The cygcrypto.dll is loaded with the > openSSL0.9.6 but the default install gives a later version with no > > cygcrypto.dll. > > This is a bug in the "requires:" field for the "mod_php4" package (it > should require "openssl096", not "openssl"). Stipe, please take note! > > > I've got rebase installed and I'm sure the call is wrong in the post > > install script. > > IMO, it would help the maintainer greatly if you could figure out the > correct way to call "rebase" and post a patch (the output of "diff -up > oldfile newfile") to this list. > > > Also, if a Windoze loading mechanism is used then /usr/lib/... can't > be > > seen without first mounting the 'volume' I think. > > FWIW, I doubt apache uses the Windows mechanism, since it uses mostly > stock Unix sources. I suspect your problem is the fact that the library > is indeed simply not in the right place. > > > If the apxs call went wrong I can find no error log - but then I'm > probably > > looking in the wrong place. In any case the libphp4.dll is not > copied. > > I'm not sure if apxs even outputs anything. I suggest manually running > the apxs call that's in the postinstall script and seeing if the DLL is > copied (and if there's any output or return code). The intended result > of > the postinstall script is fairly obvious: there should be a (globally) > rebased /usr/lib/apache/libphp4.dll present on your system. Playing > with > the postinstall script components to achieve this result, and then > figuring out and documenting the minimal correct procedure would be a > useful thing to do. > Igor > > > So there we have it - it's past my competence point, I fear! > > > > Regards, > > Dave > > > > > Dave, > > > > > > First off, there is no need to Cc: the apache maintainer, as I know > for > > > sure that he reads this list (unless this is specifically requested > in > > > the > > > README, in which case I apologize). > > > > > > More replies inline below. > > > > > > On Tue, 16 Sep 2003 dave_d@boltblue.com wrote: > > > > > > > This all started when I had trouble installing Apache/PHP (see > earlier > > > posts > > > > Re: Apache/PHP installation puzzle). As this problem is a bit > more > > > general I > > > > thought I would start a new thread. > > > > In a nutshell, the PHP part of the installation fails without any > > > obvious > > > > errors. In order to find out what's going on I decided to remove > > > every vestige > > > > of Cygwin from the W2K box and re-install the minimum required to > > > ivestigate > > > > this problem. > > > > > > > > This is the story ..... > > > > > > > > 1. Install Cygwin with nano, apache, and mod-php4. NOTE. Install > > > > Cygwin 1.5.3-1 because there are issues with 1.5.4-1 that prevent > > > > processes being stopped properly. > > > > 2. Start the apache server .... > > > > > > > > $ /usr/sbin/apachectl start > > > > [Tue Sep 16 14:54:56 2003] [alert] httpd: Could not determine the > > > server's fully > > > > qualified domain name, using 192.168.40.12 for ServerName > > > > /usr/sbin/apachectl start: httpd started > > > > > > > > 3. Using the Windoze browser, visit http://localhost/. See the > > > expected > > > > default Apache installation page - so far, so good. > > > > 4. Using the favourite nano editor, create the xyzzy.php script > and > > > put > > > > it in /var/www/htdocs. The script contains the simple PHP > function > > > call > > > > and nothing else. > > > > 5. Visit http://localhost/xyzzy.php and the script is simply > > > presented > > > > on the page - a clear indication that the PHP is not being > translated. > > > > 6. Check out /etc/apache/httpd.conf and there is no mention of > php in > > > here. > > > > What's needed are lines of the form: > > > > > > > > LoadModule php4_module lib/apache/libphp4.dll > > > > AddModule mod_php4.c > > > > > > > > Add these and try again .... > > > > $ /usr/sbin/apachectrl start > > > > Syntax error on line 236 of /etc/apache/httpd.conf: > > > > Cannot load /usr/lib/apache/libphp4.dll into server: dlopen: Win32 > > > error 126 > > > > /usr/sbin/apachectrl start: httpd could not be started > > > > > > > > 7. As error 126 is basically 'file not found', we'll check for the > > > > existance of the libphp4.dll. > > > > > > Note that some other required DLL may be missing as well. > > > > > > > First: > > > > $ updatedb > > > > Then: > > > > $ locate libphp4 > > > > > > > > .... no trace of the DLL to be found!!! > > > > > > > > 8. Now this is interesting! > > > > > > > > $ cd /usr > > > > $ ls > > > > doc etc include info local man sbin share src ssl tmp > var > > > > > > > > Note the lack of a lib directory. However... > > > > > > > > $ cd lib > > > > > > > > Administrator@zebedee /usr/lib > > > > $ > > > > > > > > ...?Que!!? How can one cd to a directory that doesn't exist. Not > only > > > > that, but > > > > > > "man mount". If it makes you feel better, you can "cd /usr && cmd > /c > > > 'md lib' && cmd /c 'md bin'" to see the directories in the listing > (and > > > get Tab-completion). > > > > > > > $ ls > > > > apache libc.a libhistory.a libxm12.a > > > > > > > > ... > > > > ... > > > > > > > > libbz2.dll.a libgmon.a > > > > > > > > And so /usr/lib exists but is partially invisible. Interestingly, > > > > Windows can't see this directory either. Hence one possible > > > explanation > > > > of why the dll won't load. > > > > > > If Cygwin's mechanisms are used to load the DLL, the directory will > be > > > seen (it's a mount). > > > > > > > 9. Progressing further .... > > > > > > > > $ cd /usr/lib/apache > > > > $ ls > > > > libproxy.dll mod_autoindex.dll mod_imap.dll > > > mod_setenvif.dll > > > > > > > > ... > > > > ... > > > > > > > > mod_auth_dbm.dll mod_headers.dll mod_rewrite.dll new > > > > > > > > $ ls new > > > > > > > > Administrator@zebedee /usr/lib > > > > $ > > > > > > > > No trace of the missing dll - a possible second reason why the > Windows > > > load > > > > failed. > > > > > > > > 10. Seems that something must be going wrong in the post install > > > script > > > > too! What we'll do is manually install the package and see what's > > > going > > > > on. Copy the .tar.bz2 file to / and then: > > > > > > > > $ bunzip2 apache-php-4.3.0-2.tar.bz2 > > > > > > > > Administrator@zebedee / > > > > $ tar -xvf apache-php-4.2.0-2.tar > > > > etc/ > > > > etc/postinstall/ > > > > etc/postinstall/apache-php.sh > > > > usr/ > > > > usr/doc/ > > > > usr/doc/Cygwin/ > > > > usr/doc/Cygwin/php-4.2.0-2.README > > > > usr/doc/php-4.2.0-2/ > > > > usr/doc/php-4.2.0-2/CREDITS > > > > usr/doc/php-4.2.0-2/INSTALL > > > > usr/doc/php-4.2.0-2/LICENSE > > > > usr/doc/php-4.2.0-2/NEWS > > > > usr/lib/ > > > > usr/lib/apache/ > > > > usr/lib/apache/new/ > > > > usr/lib/apache/new/libphp4.dll > > > > > > > > Administrator@zebedee / > > > > $ > > > > > > > > This unpacks everything and doesn't run the post install script. > Now > > > > we'll run the post install script and see what's going on: > > > > > > > > Administrator@zebedee /etc/postinstall > > > > $ cd /etc/postinstall/ > > > > > > > > Administrator@zebedee /etc/postinstall > > > > $ ./apache-php.sh > > > > usage: rebase -b BaseAddress [-Vdv] [-o Offset] [-T FileList | -] > > > Files... > > > > > > > > Administrator@zebedee /etc/postinstall > > > > $ > > > > > > > > So, it seems that either rebase is being called incorrectly or the > > > argument > > > > list is invalid. > > > > > > Do you have the "rebase" package installed? > > > > > > > 11. The check the argument list, add the following line > > > > to /etc/postinstall/apache-php.sh and re-execute it. > > > > > > > > Add... > > > > > > > > echo ${rebase_dlls} immediately following the line starting > > > "rebase_dlls="$" > > > > > > > > Re-running gives: > > > > > > > > Administrator@zebedee /etc/postinstall > > > > $ ./apache-php.sh > > > > /usr/lib/apache/libphp4.dll /usr/bin/cygbz21.0.dll > > > /usr/bin/cygcrypto.dll /usr/b > > > > in/cygintl-1.dll /usr/bin/pq.dll /usr/bin/cygxml2-2.dll > > > /usr/bin/cygz.dll /usr/b > > > > in/cyggdbm.dll > > > > usage: rebase -b BaseAddress [-Vdv] [-o Offset] [-T FileList | -] > > > Files... > > > > > > > > Administrator@zebedee /etc/postinstall > > > > $ > > > > > > > > Checking the list of file names we find that > > > > neither /usr/lib/apache/libphp4.dll nor > > > > /usr/bin/cygcrypto.dll exists. > > > > > > libphp4.dll should have been copied from the "new/" subdirectory to > > > /usr/lib/apache by the apxs call in the postinstall script. If it > > > wasn't, > > > something went wrong with the apxs call. > > > > > > Use the package search page at to find > out > > > which package contains "usr/bin/cygcrypto.dll" and install it (FWIW, > it > > > should have been selected for install automatically -- did you > unselect > > > any packages before installation?). > > > > > > > Looking at apache-php.sh I'm not sure that the call to rbase is > right > > > > either - but I've got to too many errors now. > > > > > > > > So there we have it - the story of trying to install Apache/PHP. > > > > > > > > I hope that I've provided enough information for the > > > > developers/maintainers to quickly come to a solution as having PHP > > > > available in a mixed Linux/Window 2K box will be very useful for > > > > development purposes. > > > > > > > > Regards, > > > > Dave > > > > > > Hope this helps, > > > Igor > > > -- > > > http://cs.nyu.edu/~pechtcha/ > > > |\ _,,,---,,_ pechtcha@cs.nyu.edu > > > ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com > > > |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. > > > '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! > > > > > > "I have since come to realize that being between your mentor and his > > > route > > > to the bathroom is a major career booster." -- Patrick Naughton > > > > > > > > > -------------------------------------------------------------- > > Sent with "Me-Mail", Boltblue's FREE mobile messaging service. > > http://www.boltblue.com > > > > > > -- > > 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/ > > > > -- > http://cs.nyu.edu/~pechtcha/ > |\ _,,,---,,_ pechtcha@cs.nyu.edu > ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com > |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. > '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! > > "I have since come to realize that being between your mentor and his > route > to the bathroom is a major career booster." -- Patrick Naughton > > -- > 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/ > > -------------------------------------------------------------- Sent with "Me-Mail", Boltblue's FREE mobile messaging service. http://www.boltblue.com -- 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/