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?

tks



18.0k

I found on this tutorial http://docs.phalconphp.com/en/latest/reference/tutorial.html <?php printr(getloaded_extensions()); ?> shows what extensions are installed and to my bad luck dont works.



85.0k

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



13.6k
Accepted
answer
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.");
}