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

Phalcon 2 installation warning in ubuntu

Hello friends, I was trying to install phalcon 2 in ubuntu vm on my laptop. I tried with apache 2.4 and php 5.6 and also php 5.5.19 but it didn't work at all. I was getting these warnings

Warning: Class "APCIterator" does not exist at compile time in /etc/phalFiles/cphalcon/phalcon/cache/backend/apc.zep on 224 [nonexistent-class]

       apc = new \APCIterator("user", prefixPattern);
    ------------------------------------------------^

Warning: Class "Phalcon\Http\ViewInterface" does not exist at compile time in /etc/phalFiles/cphalcon/phalcon/http/response.zep on 464 [nonexistent-class]

       view->disable();
    ------------------^

Warning: Function "phalcon_orm_singlequotes" does not exist at compile time in /etc/phalFiles/cphalcon/phalcon/mvc/model/query.zep on 513 [nonexistent-function]

           let escapedValue = phalcon_orm_singlequotes(value);
    ---------------------------------------------------------^

Warning: Variable "intTotalPages" declared but not used in Phalcon\Paginator\Adapter\QueryBuilder::getPaginate in /etc/phalFiles/cphalcon/phalcon/paginator/adapter/querybuilder.zep on 172 [unused-variable]

       result, row, rowcount, intTotalPages, next;
    ---------------------------------------^

and after that, I got message that phalcon was installed successfully and I needed to add phalcon extension in php.ini file. I added it at very beginning of file and restarted apache to check if phalcon was installed or not and it was not installed then i tried to add line at very end of file but still it didn't work. Please let me know how to solve these errors!!!

I think the warnings are not the problem because I get the exactly the same on a debian system.

In spite of these warnings, phalcon can be used without any problems.

Normally if a PHP extension is not loaded successfully, you can check apache error log to see details.

edited Dec '14

Did you compile phalcon with root privileges?

If yes: put to etc/php5/mods-available file phalcon.ini with content: extension=phalcon.so

then simlink this file to `etc/php5/*/conf.d/phalcon.ini' and then restart apache