logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



PHP 7 for Windows :)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads



View previous topic :: View next topic  
Author Message
jimski



Joined: 18 Jan 2014
Posts: 184
Location: USSA

PostPosted: Tue 28 Oct '14 13:56    Post subject: PHP 7 for Windows :) Reply with quote

There are new builds of PHP 7-dev for windows. Those builds are not meant for production. The x64 version supports 64 bit integers on Windows.
Those builds require VC11.

On Linux some users reported as much as 100% performance gains vs. other versions of php.

php7apache2_4.dll is included as well as a set of most used extensions.

http://windows.php.net/downloads/snaps/master/r5190d8f/php-master-ts-windows-vc11-x64-r5190d8f.zip
http://windows.php.net/downloads/snaps/master/r5190d8f/php-master-ts-windows-vc11-x86-r5190d8f.zip

http://windows.php.net/snapshots/
Back to top
gijs



Joined: 27 Apr 2012
Posts: 186
Location: The Netherlands

PostPosted: Wed 29 Oct '14 0:47    Post subject: Reply with quote

Sounds good, did you do any performance tests on Windows?

Why did you only compile ts builds?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6238
Location: Germany, Next to Hamburg

PostPosted: Wed 29 Oct '14 16:28    Post subject: Reply with quote

gijs wrote:

Why did you only compile ts builds?


he didn't compile anyhting in this case. Those are offical snapshots from php.net
Back to top
jimski



Joined: 18 Jan 2014
Posts: 184
Location: USSA

PostPosted: Thu 30 Oct '14 13:09    Post subject: Reply with quote

That's correct those are official dev builds.

I will post some windows performance tests in a few days.

The reason there are only ts builds right now is because this is the safest way to run php on windows and in the development stage programmers need to rule out any system instability related to handling not-safe threads.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 787
Location: Amsterdam, NL, EU

PostPosted: Fri 31 Oct '14 14:00    Post subject: Reply with quote

Matt Ficken in php.internals (Wed, 29 Oct 2014 21:53:08 -0700)
Quote:
Anatol has been doing some great work with Thread Local Storage (under the native-tls branch).

I have tested it on Windows and its performance and functionality are now the same as master builds (with phpng), though a few extensions included with Windows builds haven't been ported yet.

Performance results are here:
http://windows.php.net/downloads/snaps/ostc/pftt/perf/ including
http://windows.php.net/downloads/snaps/ostc/pftt/perf/results-20141028-master_r87c28cc-native_tls_r5747327-7146.html

Note: the master and native-tls builds for Windows have lower performance than 5.5 or 5.6 builds because 5.6 and 5.6 builds are optimized builds (using Profile Guided Optimization) which is not currently done for master or native-tls builds.

Regards
-M

Edit: http://windows.php.net/downloads/snaps/native-tls/rd6d856b/
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 787
Location: Amsterdam, NL, EU

PostPosted: Fri 31 Oct '14 17:30    Post subject: Reply with quote

For people that cannot wait, I compiled what could be compiled:
https://phpdev.toolsforresearch.com/php7dev-native-tls-nts-Win32-VC11-x86.zip
https://phpdev.toolsforresearch.com/php7dev-native-tls-Win32-VC11-x86.zip

I did not test anything yet, except that the extensions loaded when PHP was running on the command-line.

Edit: a better way to go to the dev builds is this one:
http://windows.php.net/downloads/snaps/

Or, in general: http://windows.php.net/downloads/
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6238
Location: Germany, Next to Hamburg

PostPosted: Fri 31 Oct '14 18:43    Post subject: Reply with quote

Jan-E wrote:
For people that cannot wait, I compiled what could be compiled:
https://phpdev.toolsforresearch.com/php7dev-native-tls-nts-Win32-VC11-x86.zip
https://phpdev.toolsforresearch.com/php7dev-native-tls-Win32-VC11-x86.zip

I did not test anything yet, except that the extensions loaded when PHP was running on the command-line.

Edit: a better way to go to the dev builds is this one:
http://windows.php.net/downloads/snaps/

Or, in general: http://windows.php.net/downloads/



I wasn't able to run the dev builds from php.net the x86 zip was broken and the x64 did not run over fcgid. Now your x86 TS runs. So I give it a shot.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6238
Location: Germany, Next to Hamburg

PostPosted: Fri 31 Oct '14 18:48    Post subject: Reply with quote

But I had to disable the op cache

enabled I got 500 errors

apache log
Quote:

mod_fcgid: get overlap result error


windows event log
Quote:

Name der fehlerhaften Anwendung: php-cgi.exe, Version: 7.0.0.0, Zeitstempel: 0x54539808
Name des fehlerhaften Moduls: php7ts.dll, Version: 7.0.0.0, Zeitstempel: 0x545399e9
Ausnahmecode: 0xc0000005
Fehleroffset: 0x000dd70b
ID des fehlerhaften Prozesses: 0x3f34
Startzeit der fehlerhaften Anwendung: 0x01cff52a0136df58
Pfad der fehlerhaften Anwendung: C:\users\mario\php7\php-cgi.exe
Pfad des fehlerhaften Moduls: C:\users\mario\php7\php7ts.dll
Berichtskennung: 3f4f84ec-611d-11e4-8962-448a5b756083



--- edit ---

My benchmark script

http://pastebin.com/raw.php?i=bjjfgVVS

PHP 5.6
2.193219 seconds
Peak Memory: 267.94 Mb Peak Memory (real): 268.5 Mb memory usage: 267.94 Mb

PHP 7
1.415142 seconds
Peak Memory: 205.3 Mb Peak Memory (real): 54 Mb memory usage: 205.3 Mb
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 787
Location: Amsterdam, NL, EU

PostPosted: Fri 31 Oct '14 19:32    Post subject: Reply with quote

Great performance improvement! in the mean time I also compiled the master from these sources:
http://windows.php.net/downloads/snaps/master/refe9cc3/

These ones did not even run php-cgi phpinfo.php from the command line. Complaints: cannot allocate 4GB of memory or just a Error 500.

https://phpdev.toolsforresearch.com/php7dev-master-nts-Win32-VC11-x86.zip
https://phpdev.toolsforresearch.com/php7dev-master-Win32-VC11-x86.zip

try running the TS version as mod_php. The php7apache2_4.dll might do the trick.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6238
Location: Germany, Next to Hamburg

PostPosted: Wed 05 Nov '14 11:15    Post subject: Reply with quote

Jan-E wrote:

try running the TS version as mod_php. The php7apache2_4.dll might do the trick.


I'm away from mod_php. Since some time I use fcgid only with the TS x86 version. With 4 or 8 cpu cores it was the best solution I found for me. I don't see a reason why I should switch back to the module.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 787
Location: Amsterdam, NL, EU

PostPosted: Sat 24 Jan '15 0:09    Post subject: Reply with quote

I took another shot at compiling PHP7. For anyone that wants to test it:

https://phpdev.toolsforresearch.com/php-7.0.0-dev-nts-Win32-VC11-x86.htm
https://phpdev.toolsforresearch.com/php-7.0.0-dev-nts-Win32-VC11-x86.zip

https://phpdev.toolsforresearch.com/php-7.0.0-dev-Win32-VC11-x86.htm
https://phpdev.toolsforresearch.com/php-7.0.0-dev-Win32-VC11-x86.zip

php7apache2_2.dll and php7apache2_4.dll are in the TS build, so maybe it also loads as mod_php in Apache.

Edit: It really loads as mod_php in a VC11 x86 Apache. Code for the conf something like:
Code:
PHPINIDir "/phpdev/php70.x86/"
LoadModule php7_module "/phpdev/php70.x86/php7apache2_4.dll"

Notice the 'php7_module'. My first test failed because I was still using 'php5_module'.
Back to top
C0nw0nk



Joined: 07 Oct 2013
Posts: 241
Location: United Kingdom, London

PostPosted: Wed 04 Mar '15 11:16    Post subject: Reply with quote

I take it the release date of a stable PHPNG (7) will be some point this year since that is usualy the time it takes them before they release a new PHP version ?
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 787
Location: Amsterdam, NL, EU

PostPosted: Thu 05 Mar '15 15:08    Post subject: Reply with quote

The target is Mid October 2015
https://wiki.php.net/rfc/php7timeline

I guess if they are going to make it. They are still heavily discussing features:
https://wiki.php.net/rfc

And there are still a lot of changes going on in the PHP core. For instance this week ereg and php_mysql.dll were removed from the core. Both were deprecated:
https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7

Luckily they converted ereg and mysql to PHP7 before removing it from the master, so I can still build them. Expect a php_ereg.dll for PHP7.
Back to top
C0nw0nk



Joined: 07 Oct 2013
Posts: 241
Location: United Kingdom, London

PostPosted: Fri 06 Mar '15 13:24    Post subject: Reply with quote

Does that include php_mysqli.dll ?

I only use mysqli never use mysql.dll

I do hope it gets released soon looking forward to seeing how much of a speed boost i can actualy squeeze out of it.

//EDIT : found it myself.
(since PHP 5.5; use ext/mysqli or ext/pdo_mysql instead)
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 787
Location: Amsterdam, NL, EU

PostPosted: Fri 06 Mar '15 20:39    Post subject: Reply with quote

Check my builds. They are up-to-date with the latest sources (from this morning).

The core extensions should all work. But others I did not test. For instance: php_uploadprogress.dll compiles for PHP7, but there is a fair chance that it does not work. I updated php_ffmpeg.dll to PHP7 myself which was no easy job.


Last edited by Jan-E on Mon 16 Mar '15 10:41; edited 1 time in total
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 787
Location: Amsterdam, NL, EU

PostPosted: Mon 16 Mar '15 3:16    Post subject: Reply with quote

Jan-E wrote:
Check my builds. They are up-to-date with the latest sources (from this morning).

The core extensions should all work. But others I did not test. For instance: php_uploadprogress.dll compiles for PHP7, but there is a fair chance that it does not work. I updated php_ffmpeg.dll to PHP7 myself which was no easy job.

Upgrading php_uploadprogress.dll to PHP7 proved to be easy:
https://github.com/Jan-E/uploadprogress

For testing on Windows you can use my builds. For testing on Linux, try a 'Rasmus approved' Vagrant box. See the talk he has just held at the PHP Australia conference:
http://talks.php.net/oz15#/ (March 12, 2015)
Back to top
C0nw0nk



Joined: 07 Oct 2013
Posts: 241
Location: United Kingdom, London

PostPosted: Sun 17 May '15 12:39    Post subject: Reply with quote

Using your PHP7 NTS 64bit build i wanted to test it out running multiple php-cgi's but i as soon as i launch it crashes.

Screenshot :
http://i57.tinypic.com/24q7g2v.jpg

PHP.ini file :
http://pastebin.com/6Y5SzSfY

Windows Event viewers SYSLOG :
Code:
Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: php-cgi.exe
P2: 7.0.0.0
P3: 5555507c
P4: php7.dll
P5: 7.0.0.0
P6: 555557e2
P7: c0000005
P8: 0000000000005b06
P9:
P10:

Attached files:

These files may be available here:
C:\Users\root\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_php-cgi.exe_7ebde2f7c6412ad45137196e3d69dc24f9a43c0_2444d8bf

Analysis symbol:
Rechecking for solution: 0
Report Id: 51aacca8-fc7f-11e4-8adf-0cc47a487edb
Report Status: 0

Code:
Faulting application name: php-cgi.exe, version: 7.0.0.0, time stamp: 0x5555507c
Faulting module name: php7.dll, version: 7.0.0.0, time stamp: 0x555557e2
Exception code: 0xc0000005
Fault offset: 0x0000000000005b06
Faulting process id: 0x13b0
Faulting application start time: 0x01d0908c1400a328
Faulting application path: C:\Users\root\Desktop\php-7.0.0-dev-nts-Win32-VC11-x64\php-cgi.exe
Faulting module path: C:\Users\root\Desktop\php-7.0.0-dev-nts-Win32-VC11-x64\php7.dll
Report Id: 51aacca8-fc7f-11e4-8adf-0cc47a487edb



If i remove extension=php_curl.dll it works fine not sure why curl is causing a crash.

But the good news is it gave me a heads up for those of us who use joomla that the latest joomla version is not compatible with PHP7 what means we either wait for Joomla to rewrite some of their core functions or we can do it ourselves.


Last edited by C0nw0nk on Sun 17 May '15 12:58; edited 1 time in total
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 787
Location: Amsterdam, NL, EU

PostPosted: Sun 17 May '15 12:57    Post subject: Reply with quote

Could you try the same with the 'official' snapshots? For instance these:
http://windows.php.net/downloads/snaps/master/rc9f27ee/

Edit: and try to avoid those error messages in the screenshot.
Back to top
C0nw0nk



Joined: 07 Oct 2013
Posts: 241
Location: United Kingdom, London

PostPosted: Sun 17 May '15 13:09    Post subject: Reply with quote

Jan-E wrote:
Could you try the same with the 'official' snapshots?


For the zip's listed there what is the difference between the master and the test pack. I can tell the debug pack is obviously for debugging but those other two ?

I also wounder if those snaps have profile guided optimization like the regular php builds.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 787
Location: Amsterdam, NL, EU

PostPosted: Sun 17 May '15 16:00    Post subject: Reply with quote

You will have to use the master zip. And as far as I know, these snaps do not have PGO yet, but a phpinfo() will tell you (check the configure line).
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads Goto page 1, 2  Next
Page 1 of 2