Apache/PHP installation puzzle

2003-09-13 Thread dave_d
Fellow Cygwinners!

Now I fully expect to be told to RTFM --- but here goes anyway!

I've installed Cygwin on a W2K workstation primarily for the purpose of running 
Postgres and for this it works admirably. All installations have worked 
flawlessly.

Encouraged by the performance of Cygwin I decided that I would replace the 
local Windows IIS 'Personal Web Server' with Apache +PHP.  I started the Setup 
program, selected Apache and the PHP library and initiated the installation.  
The installation reported complete with no errors or warnings.  I started the 
Apache server and accessing 'localhost/index.html' produced the desired result -
 Apache is up and running.  I then wrote the approved php test script (  ) and pointed the browser to 'localhost/tester.php'.  No PHP!!  I 
checked the /etc/postinstall directory and the presence of apache-php-sh.done 
rather indicates that installation was OK.  To check I deleted this file, re-
installed the PHP library alone and, again, installation appears OK with no 
errors.  I checked in the setup logs - again, no errors.  However, nowhere on 
the system is the a libphp4 of any description to be found and so I can't see 
how I can add the LoadModule line to the httpd.conf file.

I've spent a couple of hours Googling and searching the mail archives but have 
not seen this problem refered to anywhere else. I would appreciate a nudge in 
the right direction,

Regards,

Dave.

--
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/



Re: Apache/PHP installation puzzle

2003-09-15 Thread dave_d
Thanks for the reply, Jurgen, but that didn't work either.

Not to be discouraged I decided to uninstall everything to do with Apache and 
PHP and try again.  I did the uninstall and cleaned up all the remaining files 
I could find.  I re-booted the system and initiated a re-install from the 
Internet.  To my surprise I got a new Cygwin, bash, and a few other files.  The 
Apache was also an updataed version!  Anyway, the installation went smoothly 
and this time I indeed had a couple of PHP libraries - /lib/apache/libphp4.dll 
and /usr/lib/apache/libphp4.dll to be precise.  Full of hope I checked the 
httpd.conf file - everything in place this time.  I started the httpd daemon ---
- and I got the following 



$ /usr/sbin/apachectl start
[Mon Sep 15 09:43:29 2003] [warn] Loaded DSO lib/apache/libphp4.dll uses plain A
pache 1.3 API, this module might crash under EAPI! (please recompile it with -DE
API)
[Mon Sep 15 09:43:30 2003] [alert] httpd: Could not determine the server's fully
 qualified domain name, using 192.168.40.12 for ServerName
C:\cygwin\usr\sbin\httpd.exe: *** unable to remap C:\cygwin\bin\cygintl-1.dll to
 same address as parent(0xCA) != 0xCB
/usr/sbin/apachectl start: httpd could not be started


Now I'm even more confused! 

Does anyone have any suggestions?

Dave D.



--
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/



Re: Apache/PHP installation puzzle

2003-09-15 Thread dave_d
.As a follow up 

When I do:

$ cygcheck -c 

I get an 'Incomplete' status for both Apache and PHP.  This could be a red 
herring, however, as I notice that things are done with some of the files post 
install.

Just thought I'd share this info!

Dave


--
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/



Re: Apache/PHP installation puzzle

2003-09-15 Thread dave_d
Hello Jason,

Thanks for getting back to me.  I've been working on this all day and, despite 
having found out about rebasing etc., have still not got a solution.

To date:

1. Remove all vestiges of Cygwin from the W2K box.
2. run the Windoze update stuff and ensure that W2K is up-to date
3. Download version 2.415 of the setup.exe from the Cygwin mirror.
4. Install the very minimum needed to get Cygwin up and running.
5. Replace v2_1 of libbz2 with version 2_0 because I know this causes 
problems.  This is a three stage process whereby the default 2_1 is replaced by 
an updated version, v2_0 is then added, and finally v2_1 is removed.  Without 
going through this step we end up with Windows errors 126.
6. Using setup.exe get Apache 1.3.24-5.
7. Start apache with /usr/sbin/apachectrl start.  Apache starts OK and checks 
out (visit localhost with browser and get expeceted response).
8. Stop Apache in preparation for adding PHP.  . or, to be precise, don't 
stop it The command /usr/sbin/apachectrl stop returns as follows:


[EMAIL PROTECTED] ~
$ /usr/sbin/apachectl stop
/usr/sbin/apachectl stop: httpd (pid 1240?) not running

Well, 1240 is certainly running along with several of it's siblings and it's 
still running after the stop command.  So now we're at the first problem to 
solve - how to control httpd reliably.

Any idea what's going on here?  I can't find any errors - but maybe I'm looking 
in the wrong places.

Regards,

Dave

Quoting Jason Tishler <[EMAIL PROTECTED]>:

> Dave,
> 
> On Mon, Sep 15, 2003 at 10:15:13AM +0100, [EMAIL PROTECTED] wrote:
> > Does anyone have any suggestions?
> 
> Use Google:
> 
>
> http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-
8&q=unable+remap+same+address+parent&btnG=Google+Search
> 
> Jason
> 
> -- 
> PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
> Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
> 
> --
> 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/



More Apache/PHP installation puzzles

2003-09-16 Thread dave_d
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.  

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

[EMAIL PROTECTED] /usr/lib
$

...?Que!!?  How can one cd to a directory that doesn't exist. Not only that, but

$ ls
apache  libc.a  libhistory.alibxm12.a

...
...

libbz2.dll.alibgmon.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.

9.  Progressing further 

$ cd /usr/lib/apache
$ ls
libproxy.dllmod_autoindex.dll   mod_imap.dllmod_setenvif.dll

...
...

mod_auth_dbm.dllmod_headers.dll mod_rewrite.dll new

$ ls new

[EMAIL PROTECTED] /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

[EMAIL PROTECTED] /
$ 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

[EMAIL PROTECTED] /
$

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:

[EMAIL PROTECTED] /etc/postinstall
$ cd /etc/postinstall/

[EMAIL PROTECTED] /etc/postinstall
$ ./apache-php.sh
usage: rebase -b BaseAddress [-Vdv] [-o Offset] [-T FileList | -] Files...

[EMAIL PROTECTED] /etc/postinstall
$

So, it seems that either rebase is being called incorrectly or the argument 
list is invalid.

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:

[EMAIL PROTECTED] /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...

[EMAIL PROTECTED] /etc/postinstall
$

Checking the list of file names we find that 
neither /usr/lib/apache/libphp4.dll nor 
/usr/bin/cygcrypto.dll exists.

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


--

Re: More Apache/PHP installation puzzles

2003-09-16 Thread dave_d

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?

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.  I've got 
rebase installed and I'm sure the call is wrong in the post install script.  
Also, if a Windoze loading mechanism is used then /usr/lib/... can't be seen 
without first mounting the 'volume' I think.

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.

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 [EMAIL PROTECTED] 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
> >
> > [EMAIL PROTECTED] /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.alibxm12.a
> >
> > ...
> > ...
> >
> > libbz2.dll.alibgmon.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.dllmod_autoindex.dll   mod_imap.dll   
> mod_setenvif.dll
> >
> > ...
> > ...
> >
> > mod_auth_dbm.dllmod_headers.dll mod_rewrite.dll new
> >
> > $ ls new
> >
> > [EMAIL PROTECTED] /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
> >
> > [EMAIL PROTECTED] /
> > $ tar -xvf apache-php-4.2.0-2.tar
> > etc/
> > etc/postinstall/
> > etc/postinstall/apach

Re: More Apache/PHP installation puzzles

2003-09-17 Thread dave_d
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 <[EMAIL PROTECTED]>:

> On Tue, 16 Sep 2003 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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