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.

Zephir Error : Unable to load dynamic library '/usr/lib/php5/20121212/'

Hi, I'm a PHP developer. I really like the Zephir project. It's just an awesome tool, who want build C-Extension of their PHP application/modules.

Today, i installed 'Zephir' on my ubuntu machine. After spending some hour(going through zephir docs) with Zephir I noticed 2 things. - The 'config.json' file which suppose to be created inside of "utlis" folder(as of zephir doc) it's getting created outside of "utlis" folder. - After successfully testing 1st example 'Greeting'(as of zephir doc ) when i created the 2nd example of "Filter" Class & tried to build the extension by "zephir build" command i got following error..

Error message : PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/' - /usr/lib/php5/20121212/ undefined symbol: zephirUtilsBark_init in Unknown on line 0

In fact, i feel whenever i tried to create a new Class inside "utlis" folder i got that error. I made some quick google search about the error but didn't get any result.

Guys any idea, what's going wrong... ?


Hi I think you must to upload file utils.zep, that useful solve problem for you

edited Mar '14

Hi Duythien, thanks for your quick response. But, i can't able to understand.. which file to upload & where.. ?

Actually, my folder/files structure is like this..

------All files of 'ext' folder

So, can you help me to understand which file(filter.zep/greeting.zep) i need to upload & at where ? Actually, i was going through the zephir docs (

edited Mar '14

@mi6crazyheart I test filter.zep and success,but the first complie not workking i try the second the success( i am use Ubuntu 12.04)

    cd utils && zephir compile
    cd  ext
   sudo make install
edited Mar '14

@duythien Thx a lot. I exactly couldn't able to understand your english but your given CODES did the magic. Now, that error has removed. It's working fine. Thanks a once again for your quick response.

One more thing i want to tell to Zephir Docs owner.. the following code

$f = new Utils\Filter();
echo $f->alpha("$he$02l3'121lo."); // prints "hello"

should be changed to..

$f = new Utils\Filter();
echo $f->alpha("he$02l3'121lo."); // prints "hello" ---$ SIGN REMOVED from String---

ELSE , with '$' sign it is printing "llo". Because, with '$' sign PHP take it as a variable.