Project

Profile

Help

Feature #3084

closed

Must be built for PHP5.6 and 7.x

Added by Trond Husø over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
PHP Build
Start date:
2016-12-21
Due date:
% Done:

100%

Estimated time:
Found in version:
1.0.2
Fixed in version:
1.1.0
Platforms:

Description

Last version of Ubuntu comes with PHP7 and it is possible to downgrade, but only to 5.6. When I run php -v in command line after activating 5.6 I get this:

PHP Warning: PHP Startup: Saxon/C: Unable to initialize module

Module compiled with module API=20121212

PHP compiled with module API=20131226

These options need to match

I have also tried to build saxon.so under 5.6 and 7.0, but without much luck.

Keep up the great work with Saxon/C

Actions #1

Updated by O'Neil Delpratt over 7 years ago

Hi,

Thanks for reporting the issue. I am currently doing some redesign of Saxon/C on PHP. I will look at this issue next week after the festive holidays.

Actions #2

Updated by O'Neil Delpratt over 7 years ago

  • Status changed from New to In Progress

Hi,

I am managed to reproduce the issues that you reported on the latest ubuntu using PHP 7.

The main issue or difference with previous releases of PHP is the change in signature of RETURN_STRING from two arguments to one.

I will apply a patch with some special preprocessor directives when compiling for PHP 7.

Example:

#if PHP_MAJOR_VERSION < 7
#define _ZVAL_STRING(str, len) ZVAL_STRING(str, len, 0)
#define _RETURN_STRING(str) RETURN_STRING(str, 0)
#else
#define _ZVAL_STRING(str, len) ZVAL_STRING(str, len)
#define _RETURN_STRING(str) RETURN_STRING(str)
#endif

Taken from the post: https://github.com/beberlei/whitewashing.de/blob/master/drafts/porting_extension_to_php7.rst th

Actions #3

Updated by Trond Husø over 7 years ago

Remember it must also build for 5.6. It currently only build for 5.4/5.5.

Some may have downgraded to 5.6 because their solution is not ready for PHP 7.x.

Actions #4

Updated by O'Neil Delpratt over 7 years ago

  • Found in version set to 1.0.2

PHP 5.6:

I created a virtual machine with ubuntu 14.04.5. To install php 5.6 I followed the guide here: http://askubuntu.com/questions/776164/ubuntu-14-04-problems-upgrading-php-to-5-6

I successfully installed Saxon/C under PHP 5.6 without changing anything. I am not sure as to why you are getting the error you mentioned in comment #0. Did you set the LD_LIBRARY_PATH environment variable? Please cross check the installation guide: http://www.saxonica.com/saxon-c/doc/html/index.html#Installation

PHP 7:

I created another virtual machine with Ubuntu 16.04 which comes with PHP 7. It looks like the RETURN_STRING issue is only related to PHP 7. There some more errors which I am working through. I will commit a patch for PHP 7 shortly.

Actions #5

Updated by Muhammad Rahman over 7 years ago

Hi O'Nell,

Is there any update about the patch. We urgently need to compile it with php7.

Since there are several errors, I don't want to re-invent the wheel where you are already working on the patch.

I know you are working very hard. Please update us.

Thanks.

Actions #6

Updated by O'Neil Delpratt over 7 years ago

Sorry no update as yet on this bug. But let me try to get out to you a some pre-release next week if that is ok.

Actions #7

Updated by Anders Svensson almost 7 years ago

Hi,

I was wondering if there is still no update on this issue? The last message was from 5 months ago hinting at a possible solution? We want to use saxon with php 7.

Regards,

Anders

Actions #8

Updated by O'Neil Delpratt almost 7 years ago

Hi Anders,

I can only apologise again. We had a major release in the main Saxon product that got in the way and some other features we wanted to add to Saxon/C which has pushed back the release.

We hope to get a new release of Saxon/C before the end of summer.

Actions #9

Updated by Anders Svensson almost 7 years ago

Hi O'Neil,

Ok, thanks so much for the speedy response anyway. Keeping my fingers crossed it can get fixed by the end of summer then :-)

Regards,

Anders

Actions #10

Updated by Frank Arensmeier over 6 years ago

Hi there!

Any news on this subject? Is it possible to give an ETA? We are planning to move to PHP7 and this is really the only blocker right now.

Regards,

Frank

Actions #11

Updated by O'Neil Delpratt over 6 years ago

Hi,

Difficult to set ETA at the moment. I have successfully converted the library to PHP 7. At the moment we are in testing phase. We are still a few weeks away I guess.

Actions #12

Updated by Frank Arensmeier over 6 years ago

Ok. Thank's for the status update!

Actions #13

Updated by O'Neil Delpratt over 6 years ago

After coming back from vacation. Making progress with Saxon/C and PHP7.

Actions #14

Updated by Frank Arensmeier over 6 years ago

O'Neil Delpratt wrote:

After coming back from vacation. Making progress with Saxon/C and PHP7.

Hi O'Neil!

Sorry for being annoying. I'd like to know if you are making any progress on porting Saxon to PHP7? Is there any chance that you could share a pre-release version, maybe? We are ready to migrate to PHP7, but Saxon is the only thing that is blocking us right now. Any info would be very much appreciated!

Thank you!

Actions #15

Updated by O'Neil Delpratt over 6 years ago

Hi,

Yes I can send you a pre-release today. Please can you send me an email. Would it be a 32-bit or 64-bit version you need?

Also is it Saxon-HE/C product you need or Saxon-PE/C or Saxon-EE/C?

Actions #16

Updated by Frank Arensmeier over 6 years ago

Hi O'Neil!

Did you get my email yesterday? We need Saxon HE/C (that's the open-source version, I guess) for Ubuntu 64-bit.

Thanks!

Actions #17

Updated by O'Neil Delpratt over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

PHP7 upgrade now completed and available in the next Saxon/C release.

Actions #18

Updated by O'Neil Delpratt over 6 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 1.1.0

Bug fix applied in the Saxon/C 1.1.0 major release.

Please register to edit this issue

Also available in: Atom PDF