php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27747 ISAPI module is not working (PHP 5 works!)
Submitted: 2004-03-29 04:24 UTC Modified: 2004-04-13 03:13 UTC
Votes:7
Avg. Score:5.0 ± 0.0
Reproduced:7 of 7 (100.0%)
Same Version:6 (85.7%)
Same OS:5 (71.4%)
From: T dot Hauck at janaserver dot de Assigned:
Status: Closed Package: IIS related
PHP Version: 4.3.5 OS: W2k
Private report: No CVE-ID: None
 [2004-03-29 04:24 UTC] T dot Hauck at janaserver dot de
Description:
------------
In version 4.3.5 the isapi modul is not working any more. Calling the isapi function  to run the php script from within its own thread in the Server software will bring a access violation when this thread is ending. It looks to me as if php is corupting soem kind of data in the thread handling of windows. This allways happend calling "phpinfo();" in a script. Some other script work Ok for a while.

------------

Trying it on a apache server on w2k will bring up a errormessage that apache has a "access violation", by shutting down the apache. "phpinfo();" was called during the session.

------------

PHP has encountered an Access Violation at 01395DF7
This showed up running "phpgroupware" with ISAPI modul on the "Jana-Server" webserver, with php 4.3.5

------------

All this startet when php 4.3.5 was installed, Non of this happend with php 4.3.4



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-30 02:03 UTC] T dot Hauck at janaserver dot de
I disabled all extensions, same crash.

As soon the thread exist how called the ISAPI extension the server crashes. This may be diffrent on each server implementation, and some server my only exit the isapi thread when thy a shut down. And the IIS may report not a error when shutting down at all.

Bugreport 27741 and 27751 report simular or even the same crashes. All when they updatet from version 4.3.4 to 4.3.5.

Thomas
 [2004-03-30 04:05 UTC] T dot Hauck at janaserver dot de
Hallo,

i'am again.

I just downloaded the sourcecode from php 3.4.5 and find the followring:

Calling "_endthread();" in the "HttpExtensionProc" will always kill the thread on the server how called the "HttpExtensionProc" ! That looks to my as a huge bug. I mean the php modul can not just kill a thread on the server, or do i see this wrong ? (than i quit my job as software developer)
 [2004-03-30 09:09 UTC] edink@php.net
Could you please try replacing php4isapi.dll with the one in 4.3.4?
 [2004-03-30 10:08 UTC] T dot Hauck at janaserver dot de
With the isapi dll from version 4.3.4 is now diffrent, php crashes. 
Useing the "php4isapi.dll" from version 4.3.5 and the "php4ts.dll" from version 4.3.4 does NOT crash, and everything works fine. So the error must be in the "php4ts.dll"

So i think the "php4ts.dll" raises some kind of exeption, what is catched in the "php4isapi.dll", how is than terminating the thread (on the server) how called the "HttpExtensionProc" function.

Thomas
 [2004-03-30 10:35 UTC] iliaa@php.net
Do you have any Zend extensions being loaded in php.ini? 
 [2004-03-30 11:17 UTC] T dot Hauck at janaserver dot de
No, i do not have the Zend extensions loaded, i don't have any extension loaded right now.
 [2004-04-01 17:10 UTC] edink@php.net
Could you please try http://downloads.php.net/ilia/php-4.3.6RC1-Win32.zip
 [2004-04-02 02:42 UTC] T dot Hauck at janaserver dot de
No still crashes. and it still is in the "php4ts.dll". Useing the ISAPI DLL with a older "php4ts.dll" is works.

I would spend the time and help you find the error, but i can't compile the source code with my VS 6.0 SP4 or VS.NET 2003 It looks for some Header files i don't have.

#include "arp/inet.h"
#include "zlib.h"
#include "sys/cdefs.h"
#include "netdb.h"
...
...
 [2004-04-02 07:54 UTC] T dot Hauck at janaserver dot de
Hallo,

i compiled the php source and run it in debugger of the webserver. I'am not sure if i'am right but i found a few strange things.

1.) If the thread on the server exist how called the "HttpExtensionProc" the DLLMain function in the "php4isapi.dll" is called and runs this code.
    case DLL_THREAD_DETACH:
	ts_free_thread();
	break;

after that the thread exit procedure in windows it self crashes. I have to tell you the webserver runs every call to the "HttpExtensionProc" in his own thread, so that DLL_THREAD_DETACH: is called after evry php call.
Because the same "php4isapi.dll" with older "php4ts.dll" version work, i think the error must be somewhere "ts_free_thread();" funktion.


To other messager showed in the debugterminal up:
c:\work\php-4.3.5\zend\zend_hash.c(544) : ht=0x014f0820 is already destroyed
c:\work\php-4.3.5\zend\zend_hash.c(108) : Bailed out without a bailout address!

I don't now if they have something todo with it.

If you need mor information or what every, "i'll be back" on monday morning GMT+0200

Thomas
 [2004-04-07 07:42 UTC] T dot Hauck at janaserver dot de
Just tried version 4.3.6 RC2 the error still exist.
 [2004-04-07 11:20 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

And make sure you don't have ANY old PHP related dlls _anywhere_ in your system _before_ you install the snapshot!!

 [2004-04-07 14:55 UTC] T dot Hauck at janaserver dot de
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

This works. ISAPI Modul loadet, and MySql extension and IMAP extension enabled. So far no crash. I was running "phpmyadmin" and "phpkit" and your own app.

What ever is crashing 4.3.5 - 4.3.6 is fixed in php5 RC2-dev

So please fix it on 4.3.6 too.
 [2004-04-13 02:54 UTC] T dot Hauck at janaserver dot de
with 4.3.6 RC4-dev the bug is fixed. There are no crashes so far. If someone of the php people likes to close this thread he can do it.
 [2004-04-13 03:13 UTC] derick@php.net
closing (btw, you can do that yourself too)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 18:01:35 2024 UTC