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.

Can't upgrade to Phalcon 1.3.0

Thanks for compiling Phalcon!
Build succeed: Please restart your web server to complete the installation
root@ubuntu:~/www/cphalcon/build# /etc/init.d/ap
apache2   apparmor  apport
root@ubuntu:~/www/cphalcon/build# /etc/init.d/apache2 reload
 * Reloading web server config                          [ OK ]
root@ubuntu:~/www/cphalcon/build# phalcon
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/phalcon.so' - /usr/lib/php5/20100525+lfs/phalcon.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
ERROR: Phalcon extension isn't installed, follow these instructions to install it: http://phalconphp.com/documentation/install
root@ubuntu:~/www/cphalcon/build# PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/phalcon.so' - /usr/lib/php5/20100525+lfs/phalcon.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
^C
root@ubuntu:~/www/cphalcon/build#

from putty (full installation log):

http://pastebin.com/qd3Bh6MP

*SOLUTION: reinstall php, apache, sql. I've reinstalled all 3 and installed phalcon and now all are working. *

You need to load PDO first before Phalcon.

In your computer, have a look at the /etc/php5/apache2filter/conf.d/ folder

The ini file that loads phalcon should be prefixed to a number higher than the one PDO is. So in my system I have:

20-pdo_mysql.ini 50-phalcon.ini

That should make it work :)

edited Mar '14

ini file does not exist at all

lrwxrwxrwx 1 root root    25 Oct 20 14:57 10-pdo.ini -> ../mods-available/pdo.ini
lrwxrwxrwx 1 root root    26 Nov 16 12:49 20-curl.ini -> ../mods-available/curl.ini
lrwxrwxrwx 1 root root    24 Nov 28 10:07 20-gd.ini -> ../mods-available/gd.ini
lrwxrwxrwx 1 root root    26 Mar  7 00:27 20-intl.ini -> ../mods-available/intl.ini
lrwxrwxrwx 1 root root    28 Oct 20 14:57 20-mysqli.ini -> ../mods-available/mysqli.ini
lrwxrwxrwx 1 root root    27 Oct 20 14:57 20-mysql.ini -> ../mods-available/mysql.ini
lrwxrwxrwx 1 root root    31 Oct 20 14:57 20-pdo_mysql.ini -> ../mods-available/pdo_mysql.ini
lrwxrwxrwx 1 root root    28 Nov  4 17:52 20-xdebug.ini -> ../mods-available/xdebug.ini
-rw-r--r-- 1 root root    58 Sep 21  2012 mcrypt.ini
-rw-r--r-- 1 root root 21564 Feb 24 00:32 newrelic.ini

php.ini end:

extension=phalcon.so

root@ubuntu:/etc/php5/apache2# /etc/init.d/apache2 reload
 * Reloading web server config                                                                              [ OK ]
root@ubuntu:/etc/php5/apache2# phalcon
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/phalcon.so' - /usr/lib/php5/20100525+lfs/phalcon.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/pdo_mysql.so' - /usr/lib/php5/20100525+lfs/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0
ERROR: Phalcon extension isn't installed, follow these instructions to install it: http://phalconphp.com/documentation/install

maybe it will tell you anything usefull

root@ubuntu:/etc/php5/apache2# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/phalcon.so' - /usr/lib/php5/20100525+lfs/phalcon.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/pdo_mysql.so' - /usr/lib/php5/20100525+lfs/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0
PHP 5.4.9-4ubuntu2.4 (cli) (built: Dec 12 2013 04:26:30)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans

i've just deleted my virtualbox, i'll try to make it happen with vagrant https://github.com/phalcon/vagrant it's time to update not only Phalcon, but working environment too :) i hope official repository will work like a charm



5.6k
Accepted
answer

the solution is simple as reinstalling php, apache, sql. I've reinstalled all 3 and installed phalcon and now all are working.

I followed Nikolaos Dimopoulos tips and it works.

Just make a new file in /etc/php5/cli/conf.d/50-phalcon.ini and fill it with

; configuration for phalcon module

; priority=50

extension=phalcon.so

I am using ubuntu 14.04