Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#722 closed defect (worksforme)

xapian-bindings-php configure error install centos7 with plesk

Reported by: GiulianoM Owned by:
Priority: high Milestone:
Component: Xapian-bindings (PHP) Version: 1.2.23
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

hi guys, i've a configure error in installing xapian-bindings-php (xapian 1.2.23 downloaded, xapian-core seems compiled correctly) on CentOS7server with plesk 12.5: i continue having the error : Only PHP5 is supported (/usr/bin/php reports version PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27) i've already tried settings PHP_CONFIG before ./configure XAPIAN_COFING=path/to/xapian-config --with-php and with PHP=/usr/bin/php as suffix nothing works, same error as above. tried other source for PHP, example /opt/plesk/php/5.6/bin/php and similar but nothing. tried with php 5.6 and 5.4 same error please help it's quite a week that me and my collegue are on it! thanks

Change History (24)

comment:1 by James Aylett, 9 years ago

At a guess, I'd say you've set PHP_CONFIG to /usr/bin/php instead of to wherever php-config is on your system. If it's in /usr/bin. you shouldn't have to set it at all. (The problem is that php --version outputs all the "PHP 5.4.16 (cli)…" details, while php-config --version just outputs "5.4.16". The configure script can only cope with the latter.)

If this doesn't help, please provide a complete record of exactly what commands you ran and the full output.

comment:2 by James Aylett, 9 years ago

Blocking: 4 removed

comment:3 by GiulianoM, 9 years ago

many thanks James, just yesterday i discovered me too this looking at the configure php code. so what do you suggest me? modify the php version string? or change the configure php code? thanks Giuliano

comment:4 by James Aylett, 9 years ago

Giuliano, please post a complete record of exactly what commands you ran and the full output. You should not need to modify anything other than the way you invoke configure, but it's impossible to tell without seeing exactly what commands you are using.

comment:5 by GiulianoM, 9 years ago

ok:

1) PHP_CONFIG=/opt/plesk/php/5.6/bin/php ./configure --with-php PHP=/opt/plesk/php/5.6 XAPIAN_CONFIG=/usr/local/bin/xapian-config

2) PHP_CONFIG=/opt/plesk/php/5.6/ and PHP=/opt/plesk/php/5.6

3) PHP_CONFIG=/etc and PHP=/usr/bin/php

4) PHP_CONFIG=/usr/bin/php and PHP=/usr/bin/php in all the previous folder we have php interpreter (for PHP param) and php.ini (for PHP_CONFIG param), this is causing a mess in which we are really using

output(only change the path based on point 1-2-3-4):

checking for /opt/plesk/php/5.6/bin/php... /opt/plesk/php/5.6/bin/php
checking /opt/plesk/php/5.6/bin/php version... PHP 5.6.20 (cli) (built: Apr  5 2016 12:08:14) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.18, Copyright (c) 2002-2015, by ionCube Ltd.
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies (not supported)
configure: error: Only PHP5 is supported (/opt/plesk/php/5.6/bin/php reports version PHP 5.6.20 (cli) (built: Apr  5 2016 12:08:14) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.18, Copyright (c) 2002-2015, by ionCube Ltd.
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies)
Last edited 9 years ago by James Aylett (previous) (diff)

comment:6 by GiulianoM, 9 years ago

the last command tried:

PHP_CONFIG=/etc ./configure --with-php PHP_MAJOR_VERSION=5 XAPIAN_CONFIG=/usr/local/bin/xapian-config PHP=/usr/bin

output:

checking for /etc... /etc
checking /etc version...  (not supported)
configure: error: Only PHP5 is supported (/etc reports version )
Last edited 9 years ago by James Aylett (previous) (diff)

comment:7 by James Aylett, 9 years ago

Generally, environment variables should be set at the end of the configure line not at the start (this is noted at the start of ./configure --help, although all the variables are documented at the end). Additionally, as I pointed out earlier, PHP_CONFIG should point to php-config and not php, a directory containing php or (most bafflingly, of the things you've tried) /etc. It's also worth pointing out that PHP_MAJOR_VERSION isn't a variable controlling the configure script (it's figured out by configure, and used by the rest of the build system).

Please try the following:

$ ./configure --with-php PHP_CONFIG=/opt/plesk/php/5.6/bin/php-config

That should work fine (/usr/local should be in your PATH, so it can find xapian-config automatically; if that doesn't work, then you can tack XAPIAN_CONFIG=/usr/local/bin/xapian-config on the end of the configure line).

That's assuming you want to use the 5.6 installed version. It sounds like you have 5.4 installed on the system already, in which case ./configure --with-php should work for you without any difficulties.

comment:8 by GiulianoM, 9 years ago

thanks James, yes we have already put PHP_CONFIG at the end of the configure and all the pletora of combination without success. it was another trial. we have tried your suggest but nothing changed: checking /etc/bin/php-config version... (not supported) configure: error: Only PHP5 is supported (/etc/bin/php-config reports version )

same result for the base command: ./configure --with-php. it was the first we have tried. we have noticed that launching phpinfo it says we are using php 5.6 but with php -v command we have php 5.4 we think there is something related with plesk. thanks for your help, if you have other suggestion you are welcome. Giuliano

comment:9 by Olly Betts, 9 years ago

checking /etc/bin/php-config version... (not supported) configure: error: Only PHP5 is supported (/etc/bin/php-config reports version )

I'd be surprised if the php-config script was really installed in /etc/bin on your platform. The command James suggested was:

./configure --with-php PHP_CONFIG=/opt/plesk/php/5.6/bin/php-config

Have you tried that exact command?

comment:10 by GiulianoM, 9 years ago

Hi Olly, sorry, 'ive copied and pasted the previous trial. yes we have tested what James suggested

command entered:./configure --with-php PHP_CONFIG=/opt/plesk/php/5.6/bin/php-config returned: checking /opt/plesk/php/5.6/bin/php-config version... (not supported) configure: error: Only PHP5 is supported (/opt/plesk/php/5.6/bin/php-config reports version )

now we have reset the plesk system and discovered that the php.ini file is located in: /usr/local/psa/admin/conf/php.ini so we are not sure how php-config script will rich it correctly.

comment:11 by James Aylett, 9 years ago

What does manually running /opt/plesk/php/5.6/bin/php-config --version give? (php-config should be able to figure out where its php.ini is if it needs it, but php-config is not to do with configuring PHP, but to do with configuring things that build against PHP).

comment:12 by GiulianoM, 9 years ago

here the complete output of the configure command

This was ran as root inside of the xapian-bindings-1.2.5 directory

./configure --with-php PHP_CONFIG=/opt/plesk/php/5.6/bin/php-config checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking how to create a ustar tar archive... gnutar checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking how to print strings... printf checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1966080 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... no checking if : is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for xapian-config... /usr/local/bin/xapian-config checking /usr/local/bin/xapian-config works... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for /opt/plesk/php/5.6/bin/php-config... /opt/plesk/php/5.6/bin/php-config checking /opt/plesk/php/5.6/bin/php-config version... (not supported) configure: error: Only PHP5 is supported (/opt/plesk/php/5.6/bin/php-config reports version )

comment:13 by GiulianoM, 9 years ago

command ran: /opt/plesk/php/5.6/bin/php-config --version

result: -bash: /opt/plesk/php/5.6/bin/php-config: No such file or directory

comment:14 by Olly Betts, 9 years ago

bash: /opt/plesk/php/5.6/bin/php-config: No such file or directory 

PHP_CONFIG needs to point to an executable file which actually exists. You need to find the location of the php-config corresponding to the PHP install you want to build the bindings for.

If locate is installed and set up, try:

locate php-config

Otherwise perhaps:

find /opt -name php-config

or:

find /usr -name php-config

comment:15 by GiulianoM, 9 years ago

that's all strange, because till yesterday we've got it. find and locate commands ->no success we cannot execute yum install php-devel, so we are asking to VPS support why and let us do it.

the php ini file we have found is in: /usr/local/psa/admin/conf/php.ini so in a plesk folder......

comment:16 by GiulianoM, 9 years ago

update: we've obtained to exec yum install php-devel to launch php-config, there were 2 version, one for plesk and another normal. we've used the plesk version. we arrived to configure/make/make install xapian-bindings --with-php with success, but....no xapian.so file found in the predefined php extension-dir.....

comment:17 by James Aylett, 9 years ago

Can you give the full output of configure now you have php-config installed? It should say where it detected the PHP extension dir; if it gets that wrong you can override it using an environment variable.

comment:18 by GiulianoM, 9 years ago

thank you so much James, but now we have asked official plesk support because it is really clear that it's a plesk issue/conflict with xapian. they confirm us too. some conflict between plesk 12.5 and centos xapian libs in php 5.4. the support reset the server and now it is working on it. we are waiting for them. hoping they'll resolve the conflict. the server besides had bad repo, that's why we couldnt launch yum install php-devel and use php-config command... i'll let you updated, as now i imagine you are curious as we are to know where was the trap.

comment:19 by GiulianoM, 9 years ago

addendum: we are sure about this plesk issue because we have done the all process locally on a centos 7.2 without problem.

comment:20 by James Aylett, 9 years ago

Resolution: worksforme
Status: newclosed
Summary: xapian-bindings-php configure error install centos7xapian-bindings-php configure error install centos7 with plesk

On that basis I'll close this ticket (because it works with CentOS, suggesting this is really a Plesk issue), but you can add further comments if you learn anything that would help others. I've also added mention of Plesk to the ticket summary.

comment:21 by James Aylett, 9 years ago

Type: taskdefect

comment:22 by GiulianoM, 9 years ago

i agree. thank you for all. i'll add comments when finally we can let it works with plesk to share info and experience...

comment:23 by GiulianoM, 9 years ago

just to close the circle, for info: we have abandoned the plesk way. many errors appear. no solution found. just made a fresh new install of the server centos 7.2 withou plesk. everything is working more fine. some little errors to resolve not necessarly directly related to xapian. it remains open the xapian install where plesk is running. i think many people need help/how tos/ docs about that.

comment:24 by Olly Betts, 7 years ago

Milestone: 1.2.x
Note: See TracTickets for help on using tickets.