1

I have seen quite a few posts here about this issue, but have yet to understand what is wrong with my setup. This is what I get when trying to run anything with PHP:

Sat Sep 02 - 12:11 PM > php -version
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/tidy.dll' - No such file or directory in Unknown on line 0
PHP 7.0.19 (cli) (built: May 14 2017 03:08:04) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

The tidy.dll is referenced in this ini file

Sat Sep 02 - 12:11 PM > cat /etc/php.d/tidy.ini
extension = tidy.dll

Here is my extension_dir defined:

Sat Sep 02 - 12:12 PM > php -i | grep extension_dir
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/tidy.dll' - No such file or directory in Unknown on line 0
extension_dir => /usr/lib/php/20151012 => /usr/lib/php/20151012

The permissions in that directory seem OK.

Sat Sep 02 - 12:12 PM > ls -la /usr/lib/php/20151012
total 2228
drwxr-xr-x+ 1 RobertMarkBram None      0 Aug 31 21:20 .
drwxr-xr-x+ 1 RobertMarkBram None      0 Apr 13 15:25 ..
-rwxr-xr-x  1 RobertMarkBram None  15389 May 14 18:27 ctype.dll
-rwxr-xr-x  1 RobertMarkBram None  81949 May 14 18:27 curl.dll
-rwxr-xr-x  1 RobertMarkBram None  76829 May 14 18:27 gd.dll
-rwxr-xr-x  1 RobertMarkBram None 956957 May 14 18:27 imap.dll
-rwxr-xr-x  1 RobertMarkBram None 426013 May 14 18:27 intl.dll
-rwxr-xr-x  1 RobertMarkBram None  36381 May 14 18:27 json.dll
-rwxr-xr-x  1 RobertMarkBram None  35357 May 14 18:27 mcrypt.dll
-rwxr-xr-x  1 RobertMarkBram None 110621 May 14 18:27 mysqli.dll
-rwxr-xr-x  1 RobertMarkBram None  27165 May 14 18:27 pdo_mysql.dll
-rwxr-xr-x  1 RobertMarkBram None 271389 May 14 18:27 phar.dll
-rwxr-xr-x  1 RobertMarkBram None  19485 May 14 18:27 pspell.dll
-rwxr-xr-x  1 RobertMarkBram None  10781 May 14 18:27 recode.dll
-rwxr-xr-x  1 RobertMarkBram None  43549 May 14 18:27 tidy.dll
-rwxr-xr-x  1 RobertMarkBram None  21021 May 14 18:27 tokenizer.dll
-rwxr-xr-x  1 RobertMarkBram None  81949 May 14 18:27 xmlrpc.dll
-rwxr-xr-x  1 RobertMarkBram None  27677 May 14 18:27 xsl.dll

And looking at the ACLs for just tidy.dll, I don't see a problem.

Sat Sep 02 - 12:13 PM > getfacl /usr/lib/php/20151012/tidy.dll
# file: /usr/lib/php/20151012/tidy.dll
# owner: RobertMarkBram
# group: None
user::rwx
group::r-x
other:r-x
2
  • what is the output of rebase -si |grep tidy.dll ?
    – matzeri
    Sep 3, 2017 at 7:37
  • rebase -si | grep tidy.dll gave /usr/lib/php/20151012/tidy.dll base 0x0f4d0000 size 0x00012000 Sep 3, 2017 at 7:41

1 Answer 1

1

0x0f4d0000 is a very low address and tidy.dll is colliding with other resources or with the program itself for the loading at that address; so it failed to be loaded.

As you have a 32 bit installation: you have too many programs installed and they depleted the available address space.
The dll address allocation is starting at 0x6fff.... and going down, so you consumed all of it.

You can look at /proc/self/maps or at /proc/<pid>/maps to see how the address space is allocated.

Possible solutions:
1 reduce a lot the number of installed program and remove everything you don't need. After, you need to trigger the full rebase, see https://cygwin.com/faq.html#faq.using.fixing-fork-failures
or 2 move to a 64 bit installation

Cygwin offers more than 8000 packages but unlikely you need more than 2000.

Recent discussion on same matter on the cygwin mailing list
https://cygwin.com/ml/cygwin/2017-08/msg00265.html

3
  • So... this isn't a permissions issue, it's a 32 bit issue? Never thought I would see such an issue. Sep 3, 2017 at 9:11
  • 1
    You don't see it on a real Unix/Linux system. It is a consequence of windows limitation to cygwin for the fork implementation. Every dll is mapped to a different address, so too many dlls exhaust the available address space.
    – matzeri
    Sep 3, 2017 at 11:58
  • Went 64-bit. About time. Sep 9, 2017 at 7:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .