Archive for the ‘cygwin’ Category

Cygwin: died waiting for dll loading

Monday, February 11th, 2008

Over the weekend I was trying to use mod_rewrite with apache 2 webserver for cygwin and kept getting the following error:

11086085 [main] httpd2 4492 fork: child 5492 - died waiting for dll loading, errno 11

It seemed obvious that cygwin was unable to load some dependency for mod_rewrite. After a little googling, I found a suggestion to rebase cygwin. The procedure is as follows:

  1. Shutdown cygserver (if running): net stop cygserver.
  2. Close all cygwin windows.
  3. Open Start->Run
  4. rebase has to be run from an ash shell, so type C:\path\to\cygwin\bin\ash.exe
  5. Once the shell window in open: $ cd /bin
  6. $ ./rebaseall
  7. $ exit to close the window

After this, I restarted the cygserver service and apache and mod_rewrite worked perfectly.

PHP and Cygwin

Wednesday, February 6th, 2008

I’ve been having some problems with PHP and Apache 2 on windows recently. I would be doing some development work and refreshing the page to test progress and after some short time Apache would stall and require a restart. I tracked the problem down to using the binary module that comes with PHP. If that module was removed from the Apache configuration, the webserver would be just fine - but without PHP running.

So, I took a look at cygwin to see whether PHP could be made to work with it. I already had the Apache 2 webserver package installed, so all I needed was PHP. Looking at the official PHP packages, there is no support for PHP. After some searching around the net I found a blog called Cygwin Ports. This is linked to a sourceforge project and it has a PHP 5.2.5 package for cygwin.

Installing packages from Cygwin Ports was as easy as adding the URL ftp://sunsite.dk/projects/cygwinports to the cygwin server list. So, I followed the instructions for including their package, installed PHP and wrote a quick test script using only phpinfo():

<?php phpinfo(); ?>

I typed http://localhost/index.php and Success!

The next step was to get something more complex working, specifically CMS Made Simple. But I’ll leave that for next time.