Search code examples
windowsphp-extensionzephir

error zephir_parser extension not loaded windows


I have followed all steps here to install zephir on windows 7 32bits I run php with wampserver 2.5, I have downloaded PHP5.6.33 and added it to wampserver successfully

I have installed visual studio 2012

I have created an extension namespace as that :

zephir init myapp

I have created this class for testing purpose

namespace Myapp;
class Coco{


    public function Harmos(double x){

        return x*x;    

    }
}

but when I call build from the namespace directory

zephir build

I have this error

the zephir parser is not loaded 
note: Zephir no longer distributed with internal parser

knowing that I have added php_zephir_parser.dll to php extension and I have Zephir Parser in phpinfo


Solution

  • In your cli php.ini you should add:

    extension=zephir_parser.dll

    not:

    extension=php_zephir_parser.dll

    Keep your php.ini open, then once you run zephir build, add your extension:

    extension=myapp.dll

    Then restart your web server each time you build.

    If you will use your extension via a web server, remember to add to both the cli and the apache/fpm php.ini files.