Extension doesn't load on mac os
Hi all, I have installed phalcon with instruction but it doesn't work for me. Installation went good, no errors. I have added to my php.ini extension: extension=/opt/local/lib/php/extensions/no-debug-non-zts-20090626/phalcon.so (extension=phalcon.so doesn't work too) but I haven't phalcon on loaded extensions list. When I am trying run tutorial app I have error class Phalcom/Loader not found.
If you run php -v from the command line, does it show any errors?
No, php -v: PHP 5.3.27 (cli) (built: Aug 1 2013 21:25:46) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
Did you try this with extension=phalcon.so?
extension=/opt/local/lib/php/extensions/no-debug-non-zts-20090626/phalcon.so won't work as far as I know.
Yes, I tried, doesn't work
Does php -i | grep extension_dir show /opt/local/lib/php/extensions/no-debug-non-zts-20090626 as the extension directory?
Yes: extension_dir => /opt/local/lib/php/extensions/no-debug-non-zts-20090626 => /opt/local/lib/php/extensions/no-debug-non-zts-20090626
OK, if you run php -d extension=phalcon.so -r 'echo (int)class_exists("Phalcon\\Loader"), "\n";', what does it display?
Displayed: 1
This means that php.ini you added extension=phalcon.so is not parsed by your php — you should probably use a different php.ini.
You will need to look at the output of php -i and check what php.ini is used.
In my case:
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
Scan this dir for additional .ini files => /etc/php5/cli/conf.d
Additional .ini files parsed => /etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-apc.ini,
/etc/php5/cli/conf.d/20-memcache.ini,
/etc/php5/cli/conf.d/20-mysql.ini,
/etc/php5/cli/conf.d/20-mysqli.ini,
/etc/php5/cli/conf.d/20-pdo_mysql.ini,
/etc/php5/cli/conf.d/20-pdo_sqlite.ini,
/etc/php5/cli/conf.d/20-phalcon.ini,
/etc/php5/cli/conf.d/20-sqlite3.ini,
/etc/php5/cli/conf.d/98-igbinary.ini,
/etc/php5/cli/conf.d/mcrypt.ini,
/etc/php5/cli/conf.d/pmta.ini,
/etc/php5/cli/conf.d/vld.ini
Hmm, my php -i Configuration File (php.ini) Path => /opt/local/etc/php5 Loaded Configuration File => (none) Scan this dir for additional .ini files => /opt/local/var/db/php5 Additional .ini files parsed => /opt/local/var/db/php5/curl.ini, /opt/local/var/db/php5/gd.ini, /opt/local/var/db/php5/iconv.ini, /opt/local/var/db/php5/mbstring.ini, /opt/local/var/db/php5/mcrypt.ini, /opt/local/var/db/php5/mysql.ini, /opt/local/var/db/php5/zip.ini
Well, I think this explains it — your php does not pick up your php.ini
Please try to create /opt/local/var/db/php5/phalcon.ini and put extension=phalcon.so into it and see if it solves the issue.
Still doesn't work but file is loaded: Configuration File (php.ini) Path => /opt/local/etc/php5 Loaded Configuration File => (none) Scan this dir for additional .ini files => /opt/local/var/db/php5 Additional .ini files parsed => /opt/local/var/db/php5/curl.ini, /opt/local/var/db/php5/gd.ini, /opt/local/var/db/php5/iconv.ini, /opt/local/var/db/php5/mbstring.ini, /opt/local/var/db/php5/mcrypt.ini, /opt/local/var/db/php5/mysql.ini, /opt/local/var/db/php5/phalcon.ini, /opt/local/var/db/php5/zip.ini
And php -m does not show phalcon in the list of loaded extensions?
php -m show phalcon on the list, so ext is loaded
I have installed Phusion Passenger: Apache/2.2.22 (Unix) Phusion_Passenger/3.0.18 PHP/5.5.0 DAV/2 That's not a problem ?
In fact, yes. When you ran php -v on the terminal before, PHP 5.3 shows up, but you have installed PHP 5.5. You're probably configuring the wrong php.ini
Create a page on your website with echo phpinfo(); and look for the correct php.ini file. El 04/08/2013 08:06, "Michał Kopańko" [email protected] escribió:
I have installed Phusion Passenger: Apache/2.2.22 (Unix) Phusion_Passenger/3.0.18 PHP/5.5.0 DAV/2 That's not a problem ?
— Reply to this email directly or view it on GitHubhttps://github.com/phalcon/cphalcon/issues/994#issuecomment-22070685 .
You are right, my php.ini (from phpinfo()): Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /usr/local/php5/lib Loaded Configuration File /usr/local/php5/lib/php.ini Scan this dir for additional .ini files /usr/local/php5/php.d
But I edited right php.ini and it still doesn't work.
Please check what extension_dir is for your PHP 5.5 and copy pahlcon.so there.
I did it.. still doesn't work :(
Did you compile it with PHP 5.5 headers? Or with 5.3? 5.3 won't work with 5.5 and vice versa.