|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59874 wrong dependency list for PHP
Submitted: 2011-07-27 16:03 UTC Modified: 2014-02-28 21:52 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: jgeisler at cse dot taylor dot edu Assigned: iekpo (profile)
Status: Closed Package: solr (PECL)
PHP Version: 5.2.10 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jgeisler at cse dot taylor dot edu
New email:
PHP Version: OS:


 [2011-07-27 16:03 UTC] jgeisler at cse dot taylor dot edu
The solr module states that it will work with PHP version 5.2.3 and higher, but the JSON module changed APIs in version 5.3.0 requiring a different number of parameters to php_json_decode().  The solr code uses the number of parameters from the newer API and so doesn't compile with the older API.  Either a #ifdef needs to be inserted to check for the PHP version and give the right number of parameters or the requirements need to be updated to 5.3.0 .

I'm not a PHP coder, so I don't know if PHP makes it easy to look at versioning at compile time with #defines, but I would expect that it does.  If so, the fix is pretty simple since the added parameter is the recursion depth and can be ignored in the older API.

Expected result:
successful compile

Actual result:
libtool: compile:  cc -I. -I/tmp/pear/install/solr -DPHP_ATOM_INC -I/tmp/pear/install/pear-build-rootD2pv37/solr-1.0.1/include -I/tmp/pear/install/pear-build-rootD2pv37/solr-1.0.1/main -I/tmp/pear/install/solr -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/install/solr/solr_functions_helpers.c  -fPIC -DPIC -o .libs/solr_functions_helpers.o
/tmp/pear/install/solr/solr_functions_helpers.c:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'json_globals'
/tmp/pear/install/solr/solr_functions_helpers.c: In function 'solr_json_to_php_native':
/tmp/pear/install/solr/solr_functions_helpers.c:1123: error: too many arguments to function 'php_json_decode'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-11 14:11 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: iekpo
 [2012-09-26 18:39 UTC] eric dot caron at gmail dot com
This can be closed. The patch included in bug #59808 fixes this.
 [2014-02-28 21:52 UTC]
-Status: Assigned +Status: Closed
 [2014-02-28 21:52 UTC]
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Dec 04 13:03:34 2021 UTC