Loaded Phalcon module but still not found
I have installed Phalcon on my vServer and it seems to be loaded, but if I try to start the website I get the error
PHP Fatal error: Class 'Phalcon\\Config\\Adapter\\Ini' not found in /home...
php -v
PHP 5.6.10 (cli) (built: Jun 11, 2015 08:33:51 AM) Copyright (c) 1997-2015. PHP Zend Engine v2.6.0 Team, Copyright (c) 1998-2015 Zend Technologies
I followed the instructions on the Phalcon website. If I list php modules using php -m
Phalcon, I don't have any errors, I just don't know why it doesn't work!
Also, Phalcon is not listed on phpinfo (); p.
source to share
Sometimes when phalcon is installed it will create a separate file .ini
for itself and add the extension to it. This is common on Mac and Linux operating systems. In such a situation, enter php --ini
. You should see an exit similar to the following ...
Configuration File (php.ini) Path: /usr/local/etc/php/5.6
Loaded Configuration File: /usr/local/etc/php/5.6/php.ini
Scan for additional .ini files in: /usr/local/etc/php/5.6/conf.d
Additional .ini files parsed: /usr/local/etc/php/5.6/conf.d/ext-mongodb.ini,
/usr/local/etc/php/5.6/conf.d/ext-phalcon.ini
As you can see, phalcon has created a file /usr/local/etc/php/5.6/conf.d/ext-phalcon.ini
.
DECISION:
Open the file with sudo nano /usr/local/etc/php/5.6/conf.d/ext-phalcon.ini
, copy the line /usr/local/etc/php/5.6/php.ini
where the extension is loaded and paste if you are using XAMPP, copy the line to /Applications/XAMPP/xamppfiles/etc/php.ini
Restart the server and check if that works.
source to share