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.

Phalcon 2.0.0 compilation fails on debian

Hey guys,

iam trying to upgrade Phalcon from 1.3.4 to 2.0.0. I compiled 1.3.4. with no issues and it just worked, but when i try to compile 2.0.0. i get strange error:

/home/cphalcon/build/64bits/phalcon.zep.c: In function ‘zephir_fetch_static_property_ce’:
/home/cphalcon/build/64bits/phalcon.zep.c:6559: warning: passing argument 2 of ‘zend_read_static_property’ discards qualifiers from pointer target type
/usr/include/php5/Zend/zend_API.h:321: note: expected ‘char *’ but argument is of type ‘const char *’
/home/cphalcon/build/64bits/phalcon.zep.c: In function ‘zephir_update_static_property_ex’:
/home/cphalcon/build/64bits/phalcon.zep.c:6669: warning: passing argument 2 of ‘zend_std_get_static_property’ discards qualifiers from pointer target type
/usr/include/php5/Zend/zend_object_handlers.h:147: note: expected ‘char *’ but argument is of type ‘const char *’
/home/cphalcon/build/64bits/phalcon.zep.c: At top level:
/home/cphalcon/build/64bits/phalcon.zep.c:126687: error: ‘ZEND_FE_END’ undeclared here (not in a function)
make: *** [phalcon.lo] Error 1

Git says its up-to-day, I've even cloned repository again, tried to compile 2.0.x, yet the same issue. Iam running ("slightly") older Linux version 2.6.32-5-amd64 (Debian 2.6.32-48squeeze6) ([email protected]) (gcc version 4.3.5 (Debian 4.3.5-4) ), PHP Version 5.3.3-7.

Could this be the reason, or?

I have exactly the same problem on

centos-release-6-6.el6.centos.12.2.x86_64 PHP 5.3.3 (cli) (built: Oct 30 2014 20:12:53)

Is this problem solved? Could the problem be php version?



33.4k
Accepted
answer

I think is caused due to the old version of PHP, Zephir generates extensions for PHP up to 5.3.21



266
Accepted
answer

I've just used 1.3.4 version of phalcon on github. Indeed, it is caused by older version of PHP.

I think is caused due to the old version of PHP, Zephir generates extensions for PHP up to 5.3.21

My PHP version is 5.4.39, but I still get the same issue. Any advice?



807

Succesfully compiled 2.0.0 on Debian 8 with PHP Version 5.6.7-1.

I think is caused due to the old version of PHP, Zephir generates extensions for PHP up to 5.3.21

edited May '15

Sorry. I don't speak english.

I same problem. but i success install.

yum install php-devel <- low version php-devel problem

remove php-devel.

edit cphalcon/build/install file. And set your php path.

if [ -f Makefile ]; then make clean /usr/local/php/bin/phpize --clean fi

/usr/local/php/bin/phpize && ./configure --enable-phalcon --with-php-config=/usr/local/php/bin/php-config && make && make install && echo -e "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web server to complete the installation"