php.net |  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
Description:
------------
On my Debian Etch OS I installed a PHP 5.2.3 backport (http://hype.sourceforge.jp/f/dists/etch/backports/) 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-21 06:34 UTC] florian at glatz-mahlberg dot de
http://pecl.php.net/bugs/bug.php?id=17254&edit=1
 [2010-04-27 23:24 UTC] iekpo@php.net
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 */
#if ((PHP_MAJOR_VERSION < 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 2) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 2 && PHP_RELEASE_VERSION < 3))
#error PHP 5.2.3 or newer is required. Please upgrade your php version.
#endif

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] iekpo@php.net
Hi,

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] iekpo@php.net
Hi,

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC