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 Loader error

After the installation followed from here https://www.digitalocean.com/community/tutorials/how-to-install-and-get-started-with-phalcon-on-an-ubuntu-12-04-vps when i run my Index.php. error ocured PHP Fatal error: Class 'Phalcon\Loader' not found in /home/amitoj/localhost/hello/public/index.php on line 5 how to resolve this? Thanks!



2.5k

Hi, does your phpinfo show that phalcon is installed ?



1.6k

php info doesn't show anything about phalcon.



2.5k

As phalcon is a php extension, it needs to be loaded with.
To do so, you have to set in the php.ini the following line extension=phalcon.so.
If you already did so, have you restart apache, in order to make it to load the edited php.ini and the phalcon.so extension ?



1.6k

yes i have done this and i got PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/phalcon.so' - /usr/lib/php5/20100525+lfs/phalcon.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Fatal error: Class 'Phalcon\Loader' not found in /home/amitoj/localhost/hello/public/index.php on line 6

its your configuration of your apache have you tried to start the apache ?



1.6k

Yes, As I am using Ubuntu 12.04 and i have use this command

sudo service apache2 restart

have you tried to link the phalcon extension your php extension

edited Mar '15

just locate /usr/lib/php5 and paste the extension that you download then just include it in the php.ini file

just change the mode of the folder just add chmod +x 777 and the folder of php

I'm sure your phalcon build process failed.

  1. make sure your php version is bigger that 5.3 by using #php -v comand (I suggest 5.6.1+ for Phalcon 2)
  2. cleanup your all previous installation and configs and do like this manual: Phalcon1 installation for Phalcon 1 and Phalcon2 installation

Installing Phalcon is very esay specially in ubuntu.