We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

zephir error

Hi,everyone. I have installed zephir and tried to the first example(utils.zep),but it can not work.

The message is "PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/utils.so"


[[email protected]]# php -v

PHP 5.6.30 (cli) (built: Jan 19 2017 22:50:24)

Copyright (c) 1997-2016 The PHP Group

Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies


[[email protected]]# php -m

[PHP Modules]

bcmath bz2 calendar Core ctype curl date dom ereg exif fileinfo filter ftp gd gettext gmp hash iconv json libxml mbstring mcrypt mhash mysql mysqli openssl pcntl pcre PDO pdo_mysql pdo_sqlite phalcon Phar readline Reflection session shmop SimpleXML sockets SPL sqlite3 standard tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib

My system is centos 6.8.

Does anyone have the same problem?



77.7k
Accepted
answer

Where does utils.zep come from? The zephir repo does not have any examples...

Also, make sure you've read the documentation properly before posting errors :P

https://docs.zephir-lang.com/en/latest/install.html



2.3k
edited Apr '17

I got the utils.zep code from documentation. https://docs.zephir-lang.com/en/latest/tutorial.html

sorry, I had read the documentation, but I thought php5.6 is also ok. Because I do not want to upgrade my php version yet...

Anyway, thanks a lot!

edited Apr '17

It should work with PHP5.6 too, just make sure you compile with zephir build --backend=ZendEngine2 (--backend=ZendEngine3 corresponds to PHP7)



2.3k
edited Apr '17

It should work with PHP5.6 too, just make sure you compile with zephir build --backend=ZendEngine2 (--backend=ZendEngine3 corresponds to PHP7)

I will try.

Thank you very much!


it does not work. And I noted that the function BaseBackend::getActiveBackend() can offer ZendEngine2 to Backend param if the php version is less than 7.2......



2.3k

It is ok when I replace zend_error_noreturn with zend_error.