|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72269 htscanner is not compatible with PHP 7
Submitted: 2016-05-26 18:36 UTC Modified: 2017-10-24 23:46 UTC
From: roel at abittechnical dot com Assigned:
Status: Suspended Package: htscanner (PECL)
PHP Version: 7.0.7 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
2 + 20 = ?
Subscribe to this entry?

 [2016-05-26 18:36 UTC] roel at abittechnical dot com
The htscanner module is not compatible with PHP 7 and won't compile. This appears to be because many functions that take a string as char* + length have been changed to take a zend_string*.


htscanner_php7.0.patch (last revision 2016-07-03 10:11 UTC by roel at abittechnical dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-05-31 20:19 UTC] roel at abittechnical dot com
I wrote a patch that makes it work with PHP 7.0. It should still work exactly the same on PHP 5. Please make sure that it is correct. I'm only fairly sure that it's fully correct and doesn't leak. I'm experienced with C, but not with PHP extension development.
 [2016-06-05 14:03 UTC] roel at abittechnical dot com
Looks like I'm getting segfaults with that patch, so there must still be something wrong with my memory management.
 [2016-06-05 20:40 UTC] roel at abittechnical dot com
I updated the patch. This version is more concise and does not have the segmentation fault issue. I'm fairly sure this version should work alright.
 [2016-06-19 00:17 UTC] nick at knutov dot com
Patch from latest revision is still not stable. I have errors when using it with Bitrix performance test panel.
 [2016-06-19 07:04 UTC] roel at abittechnical dot com
What kind of errors are you getting? Is it segmentation faults, or is it something else?
 [2016-06-19 07:49 UTC]
@roel would you like to take over the package?

I do not maiintain it anymore as the new .user.ini feature in php 5.4+ covers all our needs from a per directory setting point of view.
 [2016-06-19 19:02 UTC] nick at knutov dot com
From Apache 2.4 side - error 503 with error log:

AH01067: Failed to read FastCGI header, referer: ...
AH01075: Error dispatching request to : , referer: ...

A have Apache 2.4 + fastcgi proxy + running php-fpm with multiple workers (php 7.0.7)

There are no any other details in php-fpm log or somewhere else.
 [2016-06-20 19:49 UTC] roel at abittechnical dot com
@pajoye I'm afraid I'm not the right person to take over this package. I wasn't planning on doing anything more than just contributing this patch, and that's sent me deeper down the rabbit hole than I wanted to go already. I patched it for PHP 7 for an organisation I volunteer at, and I will be leaving that organisation soon to free up my spare time. My day job involves working on a C++ web toolkit. It's highly unlikely that I will touch PHP or this extension ever again once I leave.
 [2016-07-02 14:08 UTC] roel at abittechnical dot com
I updated the patch, still fixing some issues that were causing segfaults. It seems I didn't completely understand the persistent/non-persistent distinction.

However, it seems that segmentation faults can still happen? I haven't been able to reproduce the exact situation yet, though.
 [2016-07-02 21:35 UTC] roel at abittechnical dot com
Looks like I was still doing a zend_string_release too many. The ZVAL_STR or zend_hash_update don't increase the refcount. This seems to be working well now.
 [2016-09-07 09:37 UTC] roel at abittechnical dot com
Update: we've been using the latest patch for two months now without issue.
 [2016-09-08 22:43 UTC] nick at knutov dot com
I can confirm, latest patch works fine and passes all our test. Thanks!
 [2017-01-03 21:32 UTC] matt at pipe dot co
This seems to be an issue still for PHP 7.1

I'm unable to get it to work.

Anyone have any ideas?
 [2017-01-09 05:41 UTC]
-Assigned To: +Assigned To: pajoye
 [2017-01-09 05:41 UTC]
Pierre, I am assigning to you: Can you please find a minute just to apply the patch, maybe ask Remi if he will do releases for you ?
 [2017-01-10 06:40 UTC]
I will do it on Friday, sadly no time before.

Long run someone should take over it if one really wants to keep it, but .user.ini should be the way since 5.4+.
 [2017-02-08 10:56 UTC] matt at pipe dot co
Hey guys,

ACtually, - I've found this:

Which does work with PHP 7 + PHP 7.1.


 [2017-02-08 14:38 UTC] roel at abittechnical dot com
matt: Yeah, that was fixed with the same patch. They already applied my pull request.
 [2017-10-24 07:39 UTC]
-Status: Assigned +Status: Open -Assigned To: pajoye +Assigned To:
 [2017-10-24 23:46 UTC]
-Status: Open +Status: Suspended
 [2017-10-24 23:46 UTC]
The htscanner package has not had a release since 2012, and its safe to say that development has ceased. In case the development of this package picks back up, then this report should be re-opened.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 22:01:28 2024 UTC