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.3.0, 7.2.13, 7.1.25, 7.0.33, 5.6.39, 5.5, 5.4, 5.3
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads



View previous topic :: View next topic  
Author Message
Jan-E



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

PostPosted: Thu 29 Mar '18 15:50    Post subject: Reply with quote

An update for PHP 5.6 to 5.6.35 will follow, but it isn't of interest for Windows users:

https://github.com/php/php-src/commit/2885f628165f10b661bf54d12408b8ca0fe90672
https://github.com/php/php-src/commit/d20bebfe1340986f795769e2ad6810f36eadf2ca

The update fixes an issue in PHP FPM.
Back to top
jimski



Joined: 18 Jan 2014
Posts: 194
Location: USSA

PostPosted: Mon 02 Apr '18 5:20    Post subject: Reply with quote

Thanks Jan-E for great PHP releases.

Here are some surprising results from testing PHP xxHash extensions against sha256 on Windows

Input $string: pseudo-random 52 characters long.
Loop: 10,000,000 hashes.
Windows 7 virtual machine 4 cores @ 3Ghz

30.5 sec. hash('sha256', $string)
27.6 sec. xxHash64Unsigned($string)
18.9 sec. xxHash64($string)

Looks like on short strings xxHash64Unsigned is not much faster than sha256 and sha256 produces much better quality hashes.

In contrast regular xxHash is almost 50% fatser than sha256.


Last edited by jimski on Mon 02 Apr '18 22:02; edited 1 time in total
Back to top
jimski



Joined: 18 Jan 2014
Posts: 194
Location: USSA

PostPosted: Mon 02 Apr '18 22:00    Post subject: Reply with quote

Do any of you guys know any PHP or Apache extensions or repositories for windows which are not well known? If so then please list them here => https://www.apachelounge.com/viewtopic.php?p=36715#36715
Back to top
jimski



Joined: 18 Jan 2014
Posts: 194
Location: USSA

PostPosted: Tue 17 Apr '18 8:11    Post subject: Reply with quote

Jan-E is there a reason why PHP evaluates case switch statement in such a weird way.

The following case switch statement prints 'Million' if $value is 0. But evaluates the expression just fine if value is greater than 0.

The same statement works fine if switch (true){..}.
Was there a good reason to implement "case switch" in such a weird counter-intuitive way?

$value = 0;

switch ($value) {
case $value >= 1000000:
print 'Million';
break;
case $value >= 1000 :
print 'Thousand';
break;
default:
print 'Ten';
break;
}
Back to top
Jan-E



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

PostPosted: Tue 17 Apr '18 9:54    Post subject: Reply with quote

You are mixing the 'if' syntax with the 'case' syntax. Comparisons in a case statement aren't documented. Read http://php.net/manual/en/control-structures.switch.php

Code:
case $value >= 1000000:
print 'Million';
break;


is probably interpreted as

Code:
if ($value == $value >= 1000000) { print 'Million'; }


which is quite a weird statement. My guess is that PHP calculates '$value >= 1000000' first and then does the loose comparison, so you should read it as

Code:
if ($value == ($value >= 1000000)) { print 'Million'; }


If $value = 0, the left side of the ==-comparison is 0 and the right side is FALSE, because ($value >= 1000000) evaluates to FALSE. So the 1st case statement boils down to

Code:
if (0 == FALSE) { print 'Million'; }


In a loose comparison (==) this will return TRUE:
http://php.net/manual/en/types.comparisons.php#types.comparisions-loose.

Just try this:

Code:
$value = 0;
if ($value == ($value >= 1000000)) { print 'Million'; }
elseif ($value == ($value >= 1000)) { print 'Thousand'; }
else { print 'Ten'; }


You will see it prints Million.
Back to top
jimski



Joined: 18 Jan 2014
Posts: 194
Location: USSA

PostPosted: Tue 17 Apr '18 10:51    Post subject: Reply with quote

Jan-E wrote:
You are mixing the 'if' syntax with the 'case' syntax.

Well, the manual suggest that Case Switch and IF are similar without giving any additional warnings. Also it suggests using expressions.
http://php.net/manual/en/control-structures.switch.php

Manual wrote:
The switch statement is similar to a series of IF statements on the same expression...

What sane programmer, after reading the manual about Case Switch, would come to conclusion that it means: if ($value == $value >= 1000000).

But apart from being weird is there any good reason that you know of for implementing it this way rather than simply making it work as a series of "IF" statements (as the manual suggests).
Back to top
Jan-E



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

PostPosted: Tue 17 Apr '18 11:31    Post subject: Reply with quote

The manual says they are similar, not equal. The syntax of the switch/case statements differ from 'if' in that switch/case does a loose comparison between the argument of the switch statement and the argument of the case statement. If you are using $value in both switch and case, you are looking for trouble.

jimski wrote:
But apart from being weird is there any good reason that you know of for implementing it this way rather than simply making it work as a series of "IF" statements (as the manual suggests).

Some programmmers find the switch/case syntax easier to read, but I never use it for two reasons:

1. Both arguments of the comparisons might be far away from each other. The first in the switch statement, the second in every case statement.

2. The comparison is loose (==) and in many cases strict (===) is better.
Back to top
jimski



Joined: 18 Jan 2014
Posts: 194
Location: USSA

PostPosted: Wed 18 Apr '18 2:25    Post subject: Reply with quote

Jan-E wrote:

Some programmmers find the switch/case syntax easier to read, but I never use it for two reasons:

1. Both arguments of the comparisons might be far away from each other. The first in the switch statement, the second in every case statement.

2. The comparison is loose (==) and in many cases strict (===) is better.


I use case-switch from time to time but I agree with you that any gains from readability or potential speed improvement are inconsequential.
I just run into this problem on one of my clients projects which used comparison expressions as case arguments. At first glance everything works fine until you plug in a value that evaluates to false. I guess sometimes looking under the PHP hood may be a good idea.
Back to top
Jan-E



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

PostPosted: Thu 28 Jun '18 16:01    Post subject: Reply with quote

Added php_brotli.dll to the PHP7 builds. Info:
https://github.com/kjdev/php-ext-brotli
Back to top
laurin1



Joined: 26 Oct 2014
Posts: 31
Location: Flower Mound, TX

PostPosted: Mon 16 Jul '18 22:57    Post subject: LDAP Extension Not Loading Reply with quote

I a testing 7.2.27, NTS x86 and the LDAP extension will not load.
Back to top
Jan-E



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

PostPosted: Mon 16 Jul '18 23:11    Post subject: Reply with quote

The LDAP extension rewuires libsasl.dll, ssleay32.dll and libeay32.dll. See the snapshot.txt. Did you put them in the php-directory?

Otherwise, use the official build which uses OpenSSL 1.1.0:
https://windows.php.net/downloads/releases/php-7.2.7-nts-Win32-VC15-x64.zip

Maybe you should also load the extra sasl dll's. see the sasl2 folder in the zip fron php.net.
Back to top
laurin1



Joined: 26 Oct 2014
Posts: 31
Location: Flower Mound, TX

PostPosted: Tue 17 Jul '18 1:59    Post subject: Reply with quote

Quote:

The LDAP extension rewuires libsasl.dll, ssleay32.dll and libeay32.dll. See the snapshot.txt. Did you put them in the php-directory?


Yes.

Quote:

Maybe you should also load the extra sasl dll's. see the sasl2 folder in the zip fron php.net.


I've not had to do that before. Why would I need to do that?
[/quote]
Back to top
laurin1



Joined: 26 Oct 2014
Posts: 31
Location: Flower Mound, TX

PostPosted: Tue 17 Jul '18 23:30    Post subject: Reply with quote

LDAP loads fine with official build of 7.2.27 from php.net.
Back to top
Jan-E



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

PostPosted: Wed 18 Jul '18 1:55    Post subject: Reply with quote

laurin1 wrote:
I've not had to do that before. Why would I need to do that?

Probably your previous tests were with PHP 7.0 and PHP 7.1. PHP 7.2 uses in the official build another OpenSSL version than my builds. That does not matter for extensions that don't use OpenSSL, but for the ones that do use OpenSSL you'd better go for the builds from windows.php.net or pecl.php.net
Back to top
laurin1



Joined: 26 Oct 2014
Posts: 31
Location: Flower Mound, TX

PostPosted: Wed 18 Jul '18 19:49    Post subject: Reply with quote

I don't understand what you mean, but it's working. Smile

Now, to a different issue:

Warning: Version warning: Imagick was compiled against ImageMagick version 1689 but version 1683 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0

What version of ImageMagick is the php_imagick.dll compiled againsT?

We are currently using:

ImageMagick-6.9.3-7-vc14-x86
Back to top
laurin1



Joined: 26 Oct 2014
Posts: 31
Location: Flower Mound, TX

PostPosted: Wed 18 Jul '18 20:02    Post subject: Reply with quote

Never mind, I found that info in your phpinfo.htm file and thanks.
Back to top
Jan-E



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

PostPosted: Wed 18 Jul '18 21:08    Post subject: Reply with quote

laurin1 wrote:

What version of ImageMagick is the php_imagick.dll compiled against?

See the dump of phpinfo(); (the *.htm).

I did not check it yet, but probably the same version is in the artefacts of the jobs here:
https://ci.appveyor.com/project/Jan-E/imagemagick-windows/build/ImageMagick-ImageMagick-Windows-6-VS2017.136
Back to top
Jan-E



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

PostPosted: Thu 19 Jul '18 6:05    Post subject: Reply with quote

Checked the version. It is 6.9.9-48 Q16 x86

The ImageMagick build is here:

https://ci.appveyor.com/project/Jan-E/imagemagick-windows/build/ImageMagick-ImageMagick-Windows-6-VS2017.122/job/rx1s8qut9nkh38sg/artifacts
Back to top
laurin1



Joined: 26 Oct 2014
Posts: 31
Location: Flower Mound, TX

PostPosted: Sat 21 Jul '18 1:10    Post subject: Reply with quote

Ok, I got that to load correctly, or so it seems, using ImageMagick-6.9.9-48-Q16-x86-dll, but now I'm getting errors like this:

NoDecodeDelegateForThisImageFormat `TIFF' @ error/constitute.c/ReadImage/504
Back to top
laurin1



Joined: 26 Oct 2014
Posts: 31
Location: Flower Mound, TX

PostPosted: Sat 21 Jul '18 1:24    Post subject: Reply with quote

Ok, I moved all of the DLL file from imagemagick\modules/\coders to the root of the imagemagick folder and that worked. I think I had to do that before.

Is there a recommended way to configure this? I don't want to put multiple ImageMagick folders in my path.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache Building & Member Downloads Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 9 of 10