php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #28493 php_imap.dll load failure on Windows 98
Submitted: 2004-05-22 18:58 UTC Modified: 2004-08-17 09:48 UTC
Votes:6
Avg. Score:4.0 ± 1.2
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:5 (100.0%)
From: sanondysie at tc17 dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.6 OS: Windows 98
Private report: No CVE-ID: None
 [2004-05-22 18:58 UTC] sanondysie at tc17 dot com
Description:
------------
This problem seems to present itself only on Win98 systems
(possibly on other Win9x as well). I have tested this on
an almost-out-of-the-box Win98 system as well a Win98 system
with all the latest MS patches including MSIE 6.0 SP1; symptoms
are identical. Systems ARE able to use the curl extension;
systems ARE able to use the gd2 extension. Systems are
NOT able to use the IMAP extension. There are many Usenet
messages about this problem as well; there doesn't seem to be
any solution that has been shown to work.

Symptoms can be demonstrated by either:
 1) configure imap with php.ini, or
 2) <?php dl ("php_imap.dll"); ?>
The error message returned is something like:
  Unable to load dynamic library ...php_imap.dll
  - A device attached to the system is not functioning.

A little bit more analysis with \windows\system\regsvr32 gives:
  LoadLibrary ...php_imap.dll failed
  GetLastError returns 0x0000001f.
The 0x1f (31) error maps to "device attached to the system is not functioning"
is apparently a catch-all for errors for which the original programmers
could not be bothered supplying details. However, this is NOT the error
shown for missing DLLs (that's a 0x4xx error);

Analysis with scanbin (available from: http://www.bellamyjc.net/)
seems to show that there are two presumed problems with calls:
KERNEL32: LoadLibrarya
KERNEL32: GetProcAddress

The conclusion seems to be that the problem is inherent in
php_imap.dll itself, possibly the way in which is is built;
possibly some subtle API interface problem (with KERNEL32),
a difference between Win9x and WinNT kernels?




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-30 16:12 UTC] sanondysie at tc17 dot com
Further research especially with a tool a little better suited
to the task available at http://www.dependencywalker.com/
clarifies the problem. The issue appears to be with two
calls in php_imap.dll:
 EncryptMessage
 DecryptMessage
that are imported from SECUR32.DLL.
Presumably these functions are exported
from SECUR32.DLL on WinNT platforms but not
on Win98.

A check of these versions of SECUR32.DLL
revealed that none of them export the required
functions:

SECUR32.DLL DateTime: 29-Apr-1998  FileVersion: 4.10.1998		(original distribution)
SECUR32.DLL DateTime: 27-Mar-1999  FileVersion: 4.10.2177		(from some upgrade)
SECUR32.DLL DateTime: 23-Apr-1999  FileVersion: 4.10.2222		(Win98SE)

I have not been able to check WinME version(s).

Appropriate patching of php_imap.dll's import table
to eliminate the problem references produces an image
that loads properly and provides imap function on
my Win98 systems. One hopes a better solution can be
provided.
 [2004-08-05 23:44 UTC] edink@php.net
Imap is not supported on systems earlier that Windows 2000. This is because it uses encryption functions in order to enable SSL connections to the mail servers.
 [2004-08-16 23:17 UTC] sanondysie at tc17 dot com
Classification of a problem that is exists and is
100% reproducible as "Bogus" seems to be, well, bogus.
Surely "Won't Fix" is at least a better fit; a class of
"Restriction" might be more accurate were it to exist.

Given that the decision to deny support for IMAP on Windows 98, 98SE and NT
is irrevokable, one trusts that this warrants mention in both the
"Installation and Configuration" and "IMAP" sections of the documentation.
The current expectation on these platforms is that PHP is supported
without restriction.

fwiw, the predominant IMAP client on all Win32 platforms, Outlook *,
supports SSL connections through port 993. Perhaps there is shareable
code for this.
 [2004-08-17 08:07 UTC] derick@php.net
Fix this in the docs people...
 [2004-08-17 09:48 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"IMAP is not supported on systems earlier that Windows 2000. This is because it uses encryption functions in order to enable SSL connections to the mail servers."
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 05:01:29 2024 UTC