php-wfio icon indicating copy to clipboard operation
php-wfio copied to clipboard

php version of the binaries

Open tostercx opened this issue 10 years ago • 10 comments

As you know php for windows comes in a lot of flavors... if you're going to post binaries at least say what were they compiled for. Took me a good hour or so to realize they are VC9 x86 thread safe.

Btw thanks for the awesome ext!

tostercx avatar Apr 17 '14 08:04 tostercx

I agree with @tostercx.

@kenjiuno any chance you can provide a compiled version non thread safe? Most people running PHP under windows use IIS.

From IIS PHP configuration guide.

There are two builds for each PHP version: one is thread-safe, and one is not (referred to as the non-thread-safe [NTS] version).

The thread-safe version is designed for environments where the Web server core can keep the PHP engine in memory, running multiple treads of execution for different Web requests simultaneously.

The architecture of IIS and the FastCGI extension provide an isolation model that keeps requests separate, removing the need for a thread-safe version.

The NTS version does not have any of the code that allows PHP to manage multiple threads.

As a result, there is a performance improvement on IIS when using the NTS version when compared to the tread-safe version because the NTS version avoids unnecessary thread-safety checks (FastCGI ensures a single-threaded execution environment).

kamborio avatar Apr 30 '14 00:04 kamborio

One last thing... the DLL for PHP 5.5 doesn't work as PHP 5 is only compiled with VC11

PHP Warning:  PHP Startup: wfio: Unable to initialize module
Module compiled with build ID=API20121212,TS,VC9
PHP    compiled with build ID=API20121212,TS,VC11
These options need to match
 in Unknown on line 0

kamborio avatar Apr 30 '14 00:04 kamborio

Hi.

Thank you for detailed replies.

Ok I will prepare ThreadSafe NonThreadSafe php_wfio DLL modules for php5.5

I am using this on,

  • IIS 8 upon legacy ISAPI filter DLL (php5.4.x), Windows Server 2012.
  • Apache 2.2.x with apache 2.2 filter module (php5.4.x).

Thanks

Kenji uno

2014/04/30 9:34、David Alonso Pérez [email protected] のメッセージ:

One last thing... the DLL for PHP 5.5 doesn't work as PHP 5 is only compiled with VC11

PHP Warning: PHP Startup: wfio: Unable to initialize module Module compiled with build ID=API20121212,TS,VC9 PHP compiled with build ID=API20121212,TS,VC11 These options need to match in Unknown on line 0 — Reply to this email directly or view it on GitHub.

kenjiuno avatar Apr 30 '14 04:04 kenjiuno

Hi.

One last thing... the DLL for PHP 5.5 doesn't work as PHP 5 is only compiled with VC11

I have released v0.1'' for php 5.4/5.5 variants.

I confirmed that 4 variants have passed my small tests.

=====================================================================
PHP         : H:\php-sdk\php55dev\vc11\x86\php5.5\Release\php.exe
PHP_SAPI    : cli
PHP_VERSION : 5.5.12
ZEND_VERSION: 2.5.0
PHP_OS      : WINNT - Windows NT G45 6.2 build 9200 (Windows 8 Business Edition) i586
INI actual  : H:\php-sdk\php55dev\vc11\x86\php5.5\Release\php.ini
More .INIs  :
CWD         : H:\php-sdk\php55dev\vc11\x86\php5.5
Extra dirs  :
VALGRIND    : Not used
=====================================================================
Running selected tests.
PASS Check for wfio presence [H:\php-sdk\php54dev\vc9\x86\php5.4\ext\wfio\tests\001.phpt]
PASS Whether wfio follows php5's chdir. [H:\php-sdk\php54dev\vc9\x86\php5.4\ext\wfio\tests\chdir.phpt]
PASS wfio stat,normal stat [H:\php-sdk\php54dev\vc9\x86\php5.4\ext\wfio\tests\compare_stat.phpt]
PASS wfio fopen,fclose,unlink [H:\php-sdk\php54dev\vc9\x86\php5.4\ext\wfio\tests\fopen.phpt]
PASS wfio mkdir,rmdir [H:\php-sdk\php54dev\vc9\x86\php5.4\ext\wfio\tests\mkdir.phpt]
PASS wfio mkdir,rmdir utf-8 ver [H:\php-sdk\php54dev\vc9\x86\php5.4\ext\wfio\tests\mkdir_UTF8.phpt]
=====================================================================
Number of tests :    6                 6
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    6 (100.0%) (100.0%)
---------------------------------------------------------------------
Time taken      :    1 seconds
=====================================================================

Thanks

kenjiuno avatar Apr 30 '14 14:04 kenjiuno

Thank you for that.

Work has accumulated badly and I won't have a chance to have a look at this until the weekend. I will let you know how it goes...

kamborio avatar May 01 '14 09:05 kamborio

Hi @kenjiuno,

Thanks for your project. I'm trying to use your extension on PHP 5.3.x but is not working.

Is it possible to make a release for 5.3.x version VC6/VC9 ? Unfortunately I need to use 5.3, can't update to 5.4 on my project.

Thanks!

astral2k5 avatar Nov 30 '18 21:11 astral2k5

Hello @kenjiuno,

Like astral2k5, I'm locked into PHP 5.3.x as well, but I'm binary-locked, and I would need a VC6 & thread-safe build of the library. Could you maybe compile it with VC6, too?

I understand that this might be asking a bit too much, but I thought I'd try anyway. ;)

Thank you!

GrandAdmiralThrawn avatar Sep 15 '20 13:09 GrandAdmiralThrawn

Hello @kenjiuno,

Like astral2k5, I'm locked into PHP 5.3.x as well, but I'm binary-locked, and I would need a VC6 & thread-safe build of the library. Could you maybe compile it with VC6, too?

I understand that this might be asking a bit too much, but I thought I'd try anyway. ;)

Thank you!

GrandAdmiralThrawn avatar Sep 15 '20 13:09 GrandAdmiralThrawn

I have uploaded https://github.com/kenjiuno/php-wfio/releases/download/v0.4/wfio-0.4-php5.3-fake-vc6.7z

This fake VC6 version is made by binary patching using VC9 version changing VC9 to VC6 with hex editor:

2020-09-15_23h55_30

This is not good idea but phpt tests pass and it seems to work.

H:\php-5.3.5-Win32-VC6-x86>php.exe run-tests.php H:\Proj\php-wfio\tests

=====================================================================
PHP         : H:\php-5.3.5-Win32-VC6-x86\php.exe
PHP_SAPI    : cli
PHP_VERSION : 5.3.5
ZEND_VERSION: 2.3.0
PHP_OS      : WINNT - Windows NT H270 6.2 build 9200 (Windows 7 Business Edition) i586
INI actual  : H:\php-5.3.5-Win32-VC6-x86\php.ini
More .INIs  :
CWD         : H:\php-5.3.5-Win32-VC6-x86
Extra dirs  :
VALGRIND    : Not used
=====================================================================
Running selected tests.
PASS Check for wfio presence [H:\Proj\php-wfio\tests\001.phpt]
PASS Whether wfio follows php5's chdir. [H:\Proj\php-wfio\tests\chdir.phpt]
SKIP wfio stat,normal stat "CWD/path_to_largefile.ext" int32 [H:\Proj\php-wfio\tests\compare_large_stat.phpt]
SKIP wfio stat,normal stat "CWD/path_to_largefile.ext" int64 [H:\Proj\php-wfio\tests\compare_large_stat_int64.phpt] reason: skip
PASS wfio stat,normal stat [H:\Proj\php-wfio\tests\compare_stat.phpt]
PASS wfio stat,fstat [H:\Proj\php-wfio\tests\compare_stat_fstat.phpt]
PASS wfio file funcs like filemtime [H:\Proj\php-wfio\tests\filefuncs.phpt]
PASS wfio fopen,fclose,unlink [H:\Proj\php-wfio\tests\fopen.phpt]
PASS wfio mkdir,rmdir [H:\Proj\php-wfio\tests\mkdir.phpt]
PASS wfio mkdir,rmdir utf-8 ver [H:\Proj\php-wfio\tests\mkdir_UTF8.phpt]
PASS Whether wfio can detect correct workdir, when workdir contains non-ascii chars. [H:\Proj\php-wfio\tests\nonascii_cwd.phpt]
PASS wfio scandir crashes on absent [H:\Proj\php-wfio\tests\scandir_crash_on_absent.phpt]
=====================================================================
Number of tests :   12                10
Tests skipped   :    2 ( 16.7%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   10 ( 83.3%) (100.0%)
---------------------------------------------------------------------
Time taken      :    1 seconds
=====================================================================

Be careful that this has DLL link to msvcr90.dll

2020-09-16_00h00_33

msvcr90.dll will be available thru Download Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package ATL Security Update from Official Microsoft Download Center

kenjiuno avatar Sep 15 '20 15:09 kenjiuno

Oh my, what a dirty hack! :) I'm used to doing binary hacks to modify import descriptor tables or the PE32 headers (MajorSubsystemVersion / MinorSubsystemVersion mostly). Sometimes I would also do it for stub DLL redirections. But the idea that you could make a VC90 library look like VC60 one didn't come to me at all!

I already have the VC++ 2008 redistributable with msvcr90.dll on the machine. The hack sounds dangerous, but I'll give it a spin nonetheless!

Thank you very much! :+1:

GrandAdmiralThrawn avatar Sep 15 '20 16:09 GrandAdmiralThrawn