Author |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1265 Location: Amsterdam, NL, EU
|
|
Back to top |
|
jimski
Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
Posted: Thu 28 May '15 19:13 Post subject: |
|
|
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: 196 Location: USSA
|
|
Back to top |
|
edtech
Joined: 02 Jul 2015 Posts: 4 Location: Moscow
|
Posted: Fri 03 Jul '15 0:36 Post subject: |
|
|
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: 1265 Location: Amsterdam, NL, EU
|
Posted: Fri 03 Jul '15 14:24 Post subject: |
|
|
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
|
Posted: Fri 03 Jul '15 22:50 Post subject: |
|
|
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: 1265 Location: Amsterdam, NL, EU
|
Posted: Sat 04 Jul '15 22:29 Post subject: |
|
|
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
|
Posted: Sun 05 Jul '15 1:34 Post subject: |
|
|
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: 1265 Location: Amsterdam, NL, EU
|
Posted: Sun 05 Jul '15 1:43 Post subject: |
|
|
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
|
Posted: Sun 05 Jul '15 23:59 Post subject: |
|
|
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: 1265 Location: Amsterdam, NL, EU
|
|
Back to top |
|
jimski
Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
Posted: Wed 08 Jul '15 20:49 Post subject: |
|
|
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: 1265 Location: Amsterdam, NL, EU
|
Posted: Wed 08 Jul '15 21:09 Post subject: |
|
|
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: 1265 Location: Amsterdam, NL, EU
|
|
Back to top |
|
jimski
Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
Posted: Wed 08 Jul '15 21:39 Post subject: |
|
|
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
|
Posted: Thu 10 Dec '15 21:17 Post subject: Re: PHP 7 for Windows :) |
|
|
how did you compile with vc 11? |
|
Back to top |
|