|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59172 Error when compiling package from source: Wrong PHP Version
Submitted: 2010-04-21 06:27 UTC Modified: 2010-04-28 11:04 UTC
From: florian at glatz-mahlberg dot de Assigned:
Status: Not a bug Package: solr (PECL)
PHP Version: 5.2.3 OS: Debian Etch
Private report: No CVE-ID: None
 [2010-04-21 06:27 UTC] florian at glatz-mahlberg dot de
On my Debian Etch OS I installed a PHP 5.2.3 backport ( in order to get the solr extension running. PHP itself works.

Due to the known curl bug I compile the solr extension from source. While ./configure works flawlessly, compilation via make is interrupted with a notice that i need at least PHP 5.2.3.

I guess that the backport I am using doesn't in some way suffice, however I am wondering if this isn't just some variable that is retrieved from somewhere which isn't the way make expects it to be. If the backport itself should work though, this "bug" might be fixable then by changing the "wrong" variable manually. Or by suppressing the PHP version check...?

Any idea is appreciated!

Reproduce code:
$ ./configure
$ make
$ /php_solr.c:27:2: error: #error PHP 5.2.3 or newer is required. Please upgrade your php version.
make: *** [php_solr.lo] Error 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-21 06:34 UTC] florian at glatz-mahlberg dot de
 [2010-04-27 23:24 UTC]
I looks like the header file is not loaded properly for your PHP installation.

There is a preprocessor check during compilation in php_solr.c

/* PHP versions lower than 5.2.3 are not compatible or are causing tests to FAIL */
#error PHP 5.2.3 or newer is required. Please upgrade your php version.

If the version loaded from the header file is incorrect, it would cause this error.

You can avoid this by compiling php from source. It should only take a few minutes.
 [2010-04-28 07:06 UTC] florian at glatz-mahlberg dot de
thanks for the hint. however, i tried it the other way round by disabling the version check in php_solr.c. This caused the compilation to build and install the extension successfully. PHP tells me the extension is installed correctly.
however, when trying to perform a query i receive timeouts. do you think that's related to my simplified workaround or is that something completely unconnected?
 [2010-04-28 07:53 UTC] florian at glatz-mahlberg dot de
sorry, i just realized that my curl install is corrupted. i guess that is what's causing the timeouts.
 [2010-04-28 09:58 UTC]

I dont think the timeout errors are related to your removal of the check.

It is due to something else.
 [2010-04-28 11:04 UTC]

There is a problem with the back-port version of PHP that you have installed.

The header file most likely contains the incorrect version of PHP.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 10 14:01:27 2023 UTC