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.

How to test if the extension is installed

Hi Folks!

I'm newbie to the phalcon framework. I've installed the extension and when run phpinfo() shows only the call to phalcon.ini on php.ini. How may I know if it's installed?



I found on this tutorial <?php print_r(get_loaded_extensions()); ?> shows what extensions are installed and to my bad luck dont works.


Look at your phpinfo() output which php.ini is loaded and add there, also check if apache's logs has any messages related to phalcon.

edited Apr '14

From my default check.php:

if (!class_exists("\\Phalcon\Version")) {
    die("Foodly requires the Phalcon extension to run.");
} elseif (\Phalcon\Version::getId() < 1030000) {
    die("Foodly requires at least Phalcon version 1.3.0 to run.");
} elseif (!file_exists(APPLICATION_PATH . 'config/config.php')) {
    die("Configuration file missing.");
} elseif (!file_exists(APPLICATION_PATH . '../vendor/autoload.php')) {
    die("Composer autoloader missing.");