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.

+3


source to share


4 answers


it looks like you changed the config for the php console client, but that config is not the same for the php module in apache.



View what config is loaded for apache module

+2


source


When installing phalcon, to get the extension working, restart nginx / apache2 and also if you are using PHP as a php5-fpm service module.



$ sudo service nginx restart
$ sudo service php5-fpm restart

      

+1


source


I faced the same problem and the reason is that I recompiled php with the source, but did not recompile phalcon after that. I figured that by compiling phalcon again with correct phpize.

0


source


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.

0


source







All Articles