Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Set php-config while Phalcon install on Centos

Hi,

I'm using multiple PHP version on server (PHP 5.6, PHP7, Apache 2.4, EA4, Centos 6.8)

When i try to upgrade phalcon 3.0.2 for PHP7, i got some errors.

When i try to install ./install:

php-config is not installed

When i try to set php-config like that (https://github.com/phalcon/cphalcon/issues/1752)

/opt/cpanel/ea-php70/root/usr/bin/phpize --enable-phalcon --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/

And CUSTOM_PHP_INSTALLATION_PATH:

CUSTOM_PHP_INSTALLATION_PATH=/opt/cpanel/ea-php70/root/usr/bin/phpize
$CUSTOM_PHP_INSTALLATION_PATH/root/usr/bin/phpize  --clean
$CUSTOM_PHP_INSTALLATION_PATH/root/usr/bin/phpize
./configure --with-php-config=$CUSTOM_PHP_INSTALLATION_PATH/root/usr/bin/php-config

I got same error:

Cannot find config.m4.

Make sure that you run '/opt/cpanel/ea-php70/root/usr/bin/phpize' in the top level source directory of the module

How can i install or set php-config for php7?

Thanks



10.5k

I tried following codes:

cd /root/cphalcon/ext && /opt/cpanel/ea-php70/root/usr/bin/phpize --clean && /opt/cpanel/ea-php70/root/usr/bin/phpize && ./configure --enable-phalcon --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config && make && make install

Installation is failed:

Cleaning..

Configuring for:

PHP Api Version: 20151012

Zend Module Api No: 20151012

Zend Extension Api No: 320151012

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for a sed that does not truncate output... /bin/sed

checking for cc... cc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether cc accepts -g... yes

checking for cc option to accept ISO C89... none needed

checking how to run the C preprocessor... cc -E

checking for icc... no

checking for suncc... no

checking whether cc understands -c and -o together... yes

checking for system library directory... lib

checking if compiler supports -R... no

checking if compiler supports -Wl,-rpath,... yes

checking build system type... x86_64-unknown-linux-gnu

checking host system type... x86_64-unknown-linux-gnu

checking target system type... x86_64-unknown-linux-gnu

checking for PHP prefix... /opt/cpanel/ea-php70/root/usr

checking for PHP includes... -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib

checking for PHP extension directory... /opt/cpanel/ea-php70/root/usr/lib64/php/modules

checking for PHP installed headers prefix... /opt/cpanel/ea-php70/root/usr/include/php

checking if debug is enabled... no

checking if zts is enabled... no

checking for re2c... no

configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.

checking for gawk... gawk

checking whether to enable phalcon... yes, shared

checking whether HAVE_BUNDLED_PCRE is declared... yes

checking for ext/pcre/php_pcre.h... yes

checking whether HAVE_JSON is declared... yes

checking for ext/json/php_json.h... yes

checking for a sed that does not truncate output... (cached) /bin/sed

checking for fgrep... /bin/grep -F

checking for ld used by cc... /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... 1572864

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

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 ar... ar

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/bin/nm -B output from cc object... ok

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 cc supports -fno-rtti -fno-exceptions... no

checking for cc option to produce PIC... -fPIC -DPIC

checking if cc PIC flag -fPIC -DPIC works... yes

checking if cc static flag -static works... yes

checking if cc supports -c -o file.o... yes

checking if cc supports -c -o file.o... (cached) yes

checking whether the cc 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

configure: creating ./config.status

config.status: creating config.h

config.status: executing libtool commands

/bin/sh /root/cphalcon/ext/libtool --mode=compile cc -I. -I/root/cphalcon/ext -DPHP_ATOM_INC -I/root/cphalcon/ext/include -I/root/cphalcon/ext/main -I/root/cphalcon/ext -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/cphalcon/ext/phalcon.c -o phalcon.lo

libtool: compile: cc -I. -I/root/cphalcon/ext -DPHP_ATOM_INC -I/root/cphalcon/ext/include -I/root/cphalcon/ext/main -I/root/cphalcon/ext -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/cphalcon/ext/phalcon.c -fPIC -DPIC -o .libs/phalcon.o

In file included from /root/cphalcon/ext/php_phalcon.h:11,

from /root/cphalcon/ext/php_ext.h:4,

from /root/cphalcon/ext/phalcon.c:14:

/root/cphalcon/ext/kernel/globals.h:61: error: expected specifier-qualifier-list before 'zend_uint'

In file included from /root/cphalcon/ext/phalcon.h:14,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/forms/element.zep.h:38: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Forms_Element'

In file included from /root/cphalcon/ext/phalcon.h:16,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/model/validator.zep.h:12: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Model_Validator'

In file included from /root/cphalcon/ext/phalcon.h:30,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/db/adapter.zep.h:63: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Db_Adapter'

In file included from /root/cphalcon/ext/phalcon.h:32,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/logger/adapter.zep.h:22: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Logger_Adapter'

In file included from /root/cphalcon/ext/phalcon.h:52,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/application.zep.h:15: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Application'

In file included from /root/cphalcon/ext/phalcon.h:58,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/dispatcher.zep.h:38: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Dispatcher'

In file included from /root/cphalcon/ext/phalcon.h:108,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/router.zep.h:47: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Router'

In file included from /root/cphalcon/ext/phalcon.h:134,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/assets/collection.zep.h:41: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Assets_Collection'

In file included from /root/cphalcon/ext/phalcon.h:160,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/cli/console.zep.h:9: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Cli_Console'

In file included from /root/cphalcon/ext/phalcon.h:162,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/cli/dispatcher.zep.h:17: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Cli_Dispatcher'

In file included from /root/cphalcon/ext/phalcon.h:164,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/cli/router.zep.h:25: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Cli_Router'

In file included from /root/cphalcon/ext/phalcon.h:193,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/debug/dump.zep.h:17: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Debug_Dump'

In file included from /root/cphalcon/ext/phalcon.h:223,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/forms/form.zep.h:38: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Forms_Form'

In file included from /root/cphalcon/ext/phalcon.h:233,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/http/response/headers.zep.h:14: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Http_Response_Headers'

In file included from /root/cphalcon/ext/phalcon.h:239,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/loader.zep.h:25: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Loader'

In file included from /root/cphalcon/ext/phalcon.h:255,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/collection.zep.h:53: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Collection'

In file included from /root/cphalcon/ext/phalcon.h:266,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/micro.zep.h:37: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Micro'

In file included from /root/cphalcon/ext/phalcon.h:275,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/model/manager.zep.h:69: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Model_Manager'

In file included from /root/cphalcon/ext/phalcon.h:277,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/model/metadata/apc.zep.h:9: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Model_MetaData_Apc'

In file included from /root/cphalcon/ext/phalcon.h:278,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/model/metadata/files.zep.h:9: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Model_MetaData_Files'

In file included from /root/cphalcon/ext/phalcon.h:279,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/model/metadata/libmemcached.zep.h:10: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Model_MetaData_Libmemcached'

In file included from /root/cphalcon/ext/phalcon.h:280,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/model/metadata/memcache.zep.h:10: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Model_MetaData_Memcache'

In file included from /root/cphalcon/ext/phalcon.h:281,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/model/metadata/memory.zep.h:9: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Model_MetaData_Memory'

In file included from /root/cphalcon/ext/phalcon.h:282,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/model/metadata/redis.zep.h:10: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Model_MetaData_Redis'

In file included from /root/cphalcon/ext/phalcon.h:286,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/model/metadata/xcache.zep.h:9: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Model_MetaData_Xcache'

In file included from /root/cphalcon/ext/phalcon.h:310,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/router/annotations.zep.h:14: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_Router_Annotations'

In file included from /root/cphalcon/ext/phalcon.h:319,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/mvc/view.zep.h:63: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Mvc_View'

In file included from /root/cphalcon/ext/phalcon.h:347,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/translate/adapter/csv.zep.h:10: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Translate_Adapter_Csv'

In file included from /root/cphalcon/ext/phalcon.h:353,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/validation.zep.h:26: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Validation'

In file included from /root/cphalcon/ext/phalcon.h:356,

from /root/cphalcon/ext/phalcon.c:15:

/root/cphalcon/ext/phalcon/validation/message/group.zep.h:21: error: expected '=', ',', ';', 'asm' or 'attribute' before 'zephir_init_properties_Phalcon_Validation_Message_Group'

In file included from /root/cphalcon/ext/phalcon.c:25:

/root/cphalcon/ext/kernel/fcall.h: In function 'zephir_return_call_function':

/root/cphalcon/ext/kernel/fcall.h:586: warning: passing argument 1 of '_zval_ptr_dtor' from incompatible pointer type

/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_variables.h:112: note: expected 'struct zval *' but argument is of type 'struct zval **'

/root/cphalcon/ext/kernel/fcall.h: In function 'zephir_return_call_zval_function':

/root/cphalcon/ext/kernel/fcall.h:623: warning: passing argument 1 of '_zval_ptr_dtor' from incompatible pointer type

/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_variables.h:112: note: expected 'struct zval *' but argument is of type 'struct zval **'

/root/cphalcon/ext/kernel/fcall.h: In function 'zephir_return_call_class_method':

/root/cphalcon/ext/kernel/fcall.h:664: warning: passing argument 1 of '_zval_ptr_dtor' from incompatible pointer type

/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_variables.h:112: note: expected 'struct zval *' but argument is of type 'struct zval **'

make: *** [phalcon.lo] Error 1



67.7k

can you give me teamviewer with a sudo terminal to the machine ?



10.5k
Accepted
answer

I solved with following tried commands:

cd /root/cphalcon/build/php7/64bits
/opt/cpanel/ea-php70/root/usr/bin/phpize --enable-phalcon --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config
./configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config
make
sudo make install