The Apache Haus Forum

Forum Topics => Other Software => Topic started by: Sob on November 20, 2012, 03:50:38 AM

Title: GeoIP and SSH2 extensions for PHP 5.4
Post by: Sob on November 20, 2012, 03:50:38 AM
So I decided to upgrade to PHP 5.4 and realized that I'm probably the first person who needs Windows versions of GeoIP (php_geoip.dll) and SSH2 (php_ssh2.dll) extensions. Or I forgot how to use Google. One of those. :)

I never messed with building PHP before, so it took almost half a day, but the end result seems to be success. If anyone else also needs these modules and is brave enough to put not much tested stuff on the server, here they are:

http://web.hisoftware.cz/sob/download/php-5.4-windows-extensions.7z

For PHP 5.4 NTS VC9 x86 only.
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: rjrosamond on February 25, 2013, 10:51:25 AM
Thanks for compiling this!  I must be the second person to need GeoIP... I tried your version, but get this error in my PHP error log:

[25-Feb-2013 09:46:05 UTC] PHP Warning:  PHP Startup: geoip: Unable to initialize module
Module compiled with build ID=API20100525,NTS,VC9
PHP    compiled with build ID=API20100525,TS,VC9
These options need to match
 in Unknown on line 0

Obviously the difference is the "NTS" part.  Is there a kind soul out there who might be willing to compile GeoIP for me using PHP 5.4 TS VC9 X86?

Thanks...
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: Jan-E on February 26, 2013, 10:39:19 PM
Try the one inside
http://dl.dropbox.com/u/8954372/php-5.4.12-Win32-VC9-x86.zip
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: Gregg on February 26, 2013, 11:04:34 PM
Jan, feel free to post your mysql builds here too.
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: Jan-E on February 27, 2013, 01:35:05 AM
I don't build MySQL. And neither Apache.
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: Gregg on February 27, 2013, 06:19:04 PM
I was meaning your php, your x64 php :)
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: qkdreyer on February 27, 2013, 06:55:21 PM
First, thanks Jan-E for your compiled php_geoip.dll version.

However, calling geoip_country_code_by_name() is fine, but geoip_record_by_name() isn't ...
And I'm not getting any PHP (5.4.6) / Apache (2.4) errors.

Have you guys got any clues ?
Thanks !
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: Jan-E on March 04, 2013, 04:27:30 PM
I was meaning your php, your x64 php :)
OK, you're writing mysql and I have to read that as x64 ;-) Weird. Hint: change the 86 in the URL to 64.

@qkdreyer: I really would not know. I applied the patch Sob was referring to and tried compiling the thing. I did not get to use it. Maybe Sob can compile his version as NTS.
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: Sob on March 15, 2013, 06:27:58 AM
I tried geoip_record_by_name() with my NTS version and I get error 500 and PHP crash in event log. So it doesn't look like my TS version would be any better.
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: Jan-E on March 25, 2013, 12:53:34 PM
Did anyone try these precompiled versions?
http://windows.php.net/downloads/pecl/releases/geoip/1.0.8/
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: jerome on April 15, 2013, 04:45:10 PM
Thanks alot to Jan for your build, i had the same problem for ssh2 with PHP 5.4 using easyphp...
 God bless you
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: Odee6 on March 12, 2016, 09:34:04 AM
OK, you're writing mysql and I have to read that as x64 ;-) Weird. Hint: change the 86 in the URL to 64.

@qkdreyer: I really would not know. I applied the patch Sob was referring to and tried compiling the thing. I did not get to use it. Maybe Sob can compile his version as NTS.

Yeah, I tried all of the pre-compiled builds I could find Jan-E and I still can't get it to run.
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: BenLee on January 23, 2020, 08:14:00 AM
Thanks alot to Jan for your build, i had the same problem for ssh2 with PHP 5.4 using easyphp...
 God bless you

I also want to thank him because it has also helped me a lot.
Title: Re: GeoIP and SSH2 extensions for PHP 5.4
Post by: Jan-E on February 25, 2020, 12:30:44 PM
Yeah, I tried all of the pre-compiled builds I could find Jan-E and I still can't get it to run.
I am sure the GeoIP and ssh2 extensions on https://www.apachelounge.com/viewtopic.php?t=6359 work. A phpinfo.htm in the zips is the proof.