run zephir build error on tutorial

862 Views Asked by At

I installed zephir OK (0.3.7a) and run the test, and got error as follows:

[root@vmlinux64 test]# zephir build PHP Warning: system() has been disabled for security reasons in /usr/local/lib64/zephir/Library/CompilerFile.php on line 107 PHP Warning: file_get_contents(.temp/0.3.7a/_root_test_test_Hello.zep.js): failed to open stream: No such file or directory in /usr/local/lib64/zephir/Library/CompilerFile.php on line 110 Zephir\Exception: Cannot parse file: /root/test/test/Hello.zep

I run zephir help is ok. 0.3.7a . and I do like this:

$ zephir test
$ cd test/test/
$ vim Hello.zep 

in Hello.zep:

namespace Test;

class Hello
{
public function say()
{
echo "hello from test";
}
}

and save it, then go to ../ and run zephir build

the errors popped as above ...

I installed lnmp-1.0-full on my centOS6.5_x86_64, php version is 5.3.17.

Thanks in advance!

1

There are 1 best solutions below

0
On

I kinda had some issues too, and what I ended up doing was starting over from scratch and using the following code.

$ zephir init test
$ cd test/test/
$ vim hello.zep

Edit the file as necessary (I learned that you just keep the files and whatnot lowercase or Zephir blows up for some reason).

Then when you build, it should be fine.

As for your main issue, make sure you're running php 5.4 and above. I was running 5.3 and I ran into a bunch of problems until I upgraded my php version and then the problems magically went away.