Phalcon installation does not work. Where/how do I load extension=phalcon.so

March 24, 2014 4.6k views
Phalcon installation does not work. Where/how do I load extension=phalcon.so I cannot see where to load it / type it in the php.ini Is this how to do it (see last line): ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; ; If you wish to have an extension loaded automatically, use the following ; syntax: ; ; extension=modulename.extension ; ; For example, on Windows: ; ; extension=msql.dll ; ; ... or under UNIX: ; ; extension=msql.so ; ; ... or with a path: ; ; extension=/path/to/extension/msql.so ; ; If you only provide the name of the extension, PHP will look for it in its ; default extension directory. ; ; extension=phalcon.so ;
2 comments
  • I've successfully installed phalcon.so, added the extension to the php.ini file and used both (with and without the path) and still it won't show in phpinfo(). I can't seem to trace the fault in any log file either.

    I think it has a lot to do with dependencies. There should be a way to install phalcon with the right dependencies for the specific version. No one should install the latest from github.

    This will get version 1.3.2 for instance.

    git clone -b 1.3.2 --single-branch git://github.com/phalcon/cphalcon.git

    The solution may be you have to install the dependencies at the version the above branch was originally created with. I'm still trying to locate this information.

    The only solution I can think of is to make sure the extension is copied into the default extension directory. There may be access rights restrictions elsewhere.

  • Phalcon cannot panda(SIC) to all the flavours of Linux.

    When in doubt, turn on logging.

    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/phalcon.so' - /usr/lib/php5/20121212/phalcon.so: cannot open shared object file: No such file or directory in Unknown on line 0

    Then goggle it! :)

    list /etc/php5/apache2/conf.d and /etc/php5/apache2/conf.d/

    You need to add a phalcon.ini, and after PDO.
    Go into the /etc/php5/mods-available directory and sudo nano phalcon.ini, add the following:-

    ; configuration for php phalcon module
    ; priority=50
    extension=phalcon.so

    Save and exit.

    Soft link

    /etc/php5/cli/conf.d# sudo ln -s /etc/php5/mods-available/phalcon.ini 50-phalcon.ini

    /etc/php5/apache2/conf.d# sudo ln -s /etc/php5/mods-available/phalcon.ini 50-phalcon.ini

    Remove the extension=phalcon.so from both php.ini files (/etc/php5/apache2/ and /etc/php5/cli)

    Restart

1 Answer
hey,

from the looks of your post, you have the appropriate line commented.

try to remove the semi-colon from before the extension declaration:

; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.
;
extension=phalcon.so

see http://en.wikipedia.org/wiki/Comment_(computer_programming) for more info.
Have another answer? Share your knowledge.