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 Previous  1, 2
 
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: 794
Location: Amsterdam, NL, EU

PostPosted: Thu 28 May '15 11:21    Post subject: Reply with quote

For the moment I am still building PHP7 with VC12, but in the near future I'll have to switch to VC14 (VC 2015). Alpha 1 for PHP7 is scheduled on June 9, so stay tuned.

Current VC12 builds:

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

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

https://phpdev.toolsforresearch.com/php-7.0.0-dev-nts-Win32-VC12-x64.htm
https://phpdev.toolsforresearch.com/php-7.0.0-dev-nts-Win32-VC12-x64.zip

https://phpdev.toolsforresearch.com/php-7.0.0-dev-Win32-VC12-x64.htm
https://phpdev.toolsforresearch.com/php-7.0.0-dev-Win32-VC12-x64.zip

@jimski: I got php_hiredis.dll to compile, by disabling the exception messages. See
https://github.com/Jan-E/hiredis-php/commits/master
Back to top
jimski



Joined: 18 Jan 2014
Posts: 184
Location: USSA

PostPosted: Thu 28 May '15 19:13    Post subject: Reply with quote

Very nice work Jan-E. Thank you.
I will put those compilations into paces right away.
Back to top
jimski



Joined: 18 Jan 2014
Posts: 184
Location: USSA

PostPosted: Thu 28 May '15 20:20    Post subject: Reply with quote

Jna-E, on the main phpredis project there is also announcement that the code is buildable against the latest php7 source.

https://github.com/markoheijnen/phpredis/branches
https://github.com/markoheijnen/phpredis
Back to top
edtech



Joined: 02 Jul 2015
Posts: 4
Location: Moscow

PostPosted: Fri 03 Jul '15 0:36    Post subject: Reply with quote

Jan-E, hello, could you please let me know how did you compile pgsql and pdo_pgsql shared modules?
I couldn't link compiled objects to the final dll because of errors:
Quote:

pgsql_driver.obj : error LNK2019: unresolved external symbol file_globals referenced in function pdo_pgsql_transaction_cmd
pgsql_statement.obj : error LNK2019: unresolved external symbol compiler_globals referenced in function zend_hash_index_find_ptr
C:\php\php7\x64\Release\php_pdo_pgsql.dll : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\amd64\link.exe"' : return code '0x460'
Stop.

And when compiling them as static modules, it succeeds.

Here is my configure command:

Quote:
configure --disable-all --enable-cli --with-all-shared --enable-session --disable-zts --enable-cgi --enable-trader --with-curl --enable-fileinfo --enable-mbstring --with-openssl --with-pgsql="C:\Program Files\PostgreSQL\9.3" --enable-pdo=shared --with-pdo-pgsql="C:\Program Files\PostgreSQL\9.3",shared --with-snmp --with-tidy --with-xsl



Also, I have similar error messages when trying to link phpredis module as a shared extension:

Quote:

Creating library C:\php\php7\x64\Release\php_redis.lib and object C:\php\php7\x64\Release\php_redis.exp
library.obj : error LNK2019: unresolved external symbol basic_globals referenced in function redis_serialize
redis.obj : error LNK2019: unresolved external symbol zend_new_interned_string referenced in function free_reply_callbacks
redis.obj : error LNK2019: unresolved external symbol compiler_globals referenced in function free_reply_callbacks
redis_cluster.obj : error LNK2001: unresolved external symbol compiler_globalsredis_array_impl.obj : error LNK2019: unresolved external symbol executor_globals referenced in function ra_call_extractor
redis_array_impl.obj : error LNK2019: unresolved external symbol sapi_module referenced in function ra_load_array
redis_cluster.obj : error LNK2001: unresolved external symbol sapi_module
redis_session.obj : error LNK2001: unresolved external symbol sapi_module
C:\php\php7\x64\Release\php_redis.dll : fatal error LNK1120: 5 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\amd64\link.exe"' : return code '0x460'
Stop.


Thanks for your advice!
Back to top
Jan-E



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

PostPosted: Fri 03 Jul '15 14:24    Post subject: Reply with quote

I guess it is the --with-all-shared option. I have never heared of that option and do not use it. Fat chance that it moves thinks from php7.lib or php7ts.lib to separate libs for extensions that normally are static.

You can find my config line in the htm's in this topic:
http://www.apachelounge.com/viewtopic.php?t=6617

Leave out the oci options and other options that give errors on your system. Add your own options for postgress.

The --enable-snapshot-build puts most things right, except for com-dotnet, mcrypt and redis. Hence the --enable-com-dotnet=shared --with-mcrypt=static --enable-redis=shared --disable-redis-igbinary.

pdo itself has to be static. --enable-pdo is enough, but --enable-pdo=shared is likely to fail.

With respect to redis: I haven't found a redis repository that compiles under PHP7 and VC14 yet. The options are there for the case that someone makes it compatible.
Back to top
edtech



Joined: 02 Jul 2015
Posts: 4
Location: Moscow

PostPosted: Fri 03 Jul '15 22:50    Post subject: Reply with quote

Thanks! Most of extensions were compiled successfully with --enable-snapshot-build option. If you don't mind, I will analyze the result ans ask some additional questions.

Regarding redis, I have created a fork of phpredis and performed some changes to make it compatible with C89 standard, so it compiles correctly in VC11. Here is the link to my repository https://github.com/edtechd/phpredis
Back to top
Jan-E



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

PostPosted: Sat 04 Jul '15 22:29    Post subject: Reply with quote

edtech wrote:
Regarding redis, I have created a fork of phpredis and performed some changes to make it compatible with C89 standard, so it compiles correctly in VC11. Here is the link to my repository https://github.com/edtechd/phpredis

We managed to make Ed's fork compile with VC14. It is now there in my builds in this topic:
https://www.apachelounge.com/viewtopic.php?t=6617

Please test it. That it builds with VC14 does not necessarily mean it works completely as expected.
Back to top
edtech



Joined: 02 Jul 2015
Posts: 4
Location: Moscow

PostPosted: Sun 05 Jul '15 1:34    Post subject: Reply with quote

Unfortunately, it doesn't work for me

Quote:

Problem signature:
Problem Event Name: APPCRASH
Application Name: php-cgi.exe
Application Version: 7.0.0.0
Application Timestamp: 5598321a
Fault Module Name: php_redis.dll
Fault Module Version: 7.0.0.0
Fault Module Timestamp: 559835f6
Exception Code: c0000005
Exception Offset: 0000000000007d93
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: fab4
Additional Information 2: fab450ab06bae22bb5cea72676a88267
Additional Information 3: 3f37
Additional Information 4: 3f3740bc9b702b21b63828eee0252dfe


And my previous build of php with this extension linked statically worked well.[/quote]
Back to top
Jan-E



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

PostPosted: Sun 05 Jul '15 1:43    Post subject: Reply with quote

When do you get that error? On loading php_redis.dll or on accessing a redis server?

I do not have a redis server running, so I cannot test it.
Back to top
edtech



Joined: 02 Jul 2015
Posts: 4
Location: Moscow

PostPosted: Sun 05 Jul '15 23:59    Post subject: Reply with quote

I get this error when trying to enable session. phpredis was crashing on the simple code file:

Quote:


<?php


session_start();

$redis = new Redis();
$redis->connect('127.0.0.1');

// set the value to x, increment and then get it
$redis->set('x',42);
$redis->incr('x');
$x = $redis->get('x');

$result = "Get X: ".$x."\n";

if($x==43)
echo "Test OK\n";
else
echo "Test fail\n";

echo $result;



?>


And my php.ini:

Quote:

session.save_handler=redis
session.save_path=tcp://127.0.0.1:6379
session.serialize_handler=php


After some debugging I found that length of some string variables is stored as "int" but it should be "size_t". I have changed variable types and also improved a bit handling of NULL bulk strings (not sure that it is required but I got an error here).

Could you please recompile the extension using the updated source from my repository? Thanks.
Back to top
Jan-E



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

PostPosted: Mon 06 Jul '15 9:58    Post subject: Reply with quote

I could reproduce the segfault and have recompiled all PHP7 builds with the sources from https://github.com/Jan-E/phpredis

No segfault anymore on Windows, but var_dump($redis->info("CPU")) leads on Debian 8 to a segfault in line 652 of library.c:
https://github.com/Jan-E/phpredis/blob/php7/library.c#L652

On Windows and with php 5.6 on Windows and Debian var_dump($redis->info("CPU")) returns (bool)false.

See also the comments at https://github.com/edtechd/phpredis/pull/4
Back to top
jimski



Joined: 18 Jan 2014
Posts: 184
Location: USSA

PostPosted: Wed 08 Jul '15 20:49    Post subject: Reply with quote

Jan-E, few comments:

It looks like Postgres libpq.dll is not included in your php7 compilations alpha and beta.

For those who need libpq.dll VC14 you can download it from php7 master repository.


Last edited by jimski on Wed 08 Jul '15 21:43; edited 3 times in total
Back to top
Jan-E



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

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

Correct. It is release policy of the PHP-devs not to include the libpq.dll. They made a deal about this with the Postgress team. You should always use the liba from the Postgress website.
Back to top
Jan-E



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

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

BTW: The redis extenson has bugs.
https://github.com/edtechd/phpredis/issues
Back to top
jimski



Joined: 18 Jan 2014
Posts: 184
Location: USSA

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

Yes, I just noticed.
php_redis extension initially loads but then Apache crashes. There are no errors reported in the php_erro.log but the system logs show this:

Faulting application name: httpd.exe, version: 2.4.12.0, time stamp: 0x5565a671
Faulting module name: php_redis.dll, version: 7.0.0.0, time stamp: 0x559ca12e
Exception code: 0xc0000005
Fault offset: 0x000000000000903f
Faulting process id: 0xd60
Faulting application start time: 0x01d0b9b5261b7a05
Faulting application path: E:\Server\Apache24\bin\httpd.exe
Faulting module path: E:\Server\php7\ext\php_redis.dll
Report Id: 642c28a3-25a8-11e5-a8cd-00155d0030ca
Back to top
ccr1969



Joined: 22 Nov 2015
Posts: 4
Location: Canada

PostPosted: Thu 10 Dec '15 21:17    Post subject: Re: PHP 7 for Windows :) Reply with quote

jimski wrote:
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/
how did you compile with vc 11?
Back to top


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