We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon install on OSX10.11with MAMP

Hi,

I'm trying to install phalcon.php on MacOSX10.11 with MAMP. I download the latest version of MAMP and Phalcon. After linked my MAMP php version (5.6.10) as system php default version, i build the install and works. I saw the phalcon.so on php extensions pholder in MAMP.

After it, i write on my php.ini (MAMP) the line : extension=phalcon.so. Trying to saw it with php -i command line but nothing loaded. So i tryed with zend_exention=phalcon.so but always nothing. When i run : $: php phalcon.php an error occure : /Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/phalcon.so doesn't appear to be a valid Zend extension Could not open input file: phalcon.php

I'm a bit confused about install on mac so any help or advice would be cool.



85.5k
edited Sep '15

hi,


$ cd cphalcon/build/64bits
$ make clean
$ phpize --clean
$ /Applications/MAMP/bin/php/php5.6.10/bin/phpize
$ ./configure --with-php-config=/Applications/MAMP/bin/php/php5.6.10/bin/php-config
$ make && sudo make install

dont forget to restart mamp

//edit my php.ini has:

extension=/opt/php-5613/lib/php/extensions/no-debug-non-zts-20131226/phalcon.so



6.3k
edited Sep '15

Hi Hristomir Kotzev,

Thank you for answer. I tryed it, installation works but didn't load phalcon on php, I haven't the error zend exetension enymore but i think this is the wrong phpize used cause when i run : $wheris phpize, i point on /usr/bin/phpize and not on /Applications/MAMP/bin/php/php5.6.10/bin/phpize .



85.5k

ok but if create index.php file with

phpinfo();

what version of php does it show in the web directory ?



6.3k

php 5.6.10 (MAMP version)



85.5k

so we are all good. I was right.

Now ... inside this phpinfo you have php.ini path, what value does it have ?

now this value is a file, in this file do you have exntension=/....../.phalcon.so ?



6.3k

i write myself the following line on /Applications/MAMP/bin/php/php5.6.10/conf/php.ini : zend_extension="/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/phalcon.so"



85.5k

change it to

extension=/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/phalcon.so


6.3k

i did it but doesn't work, no error, not loaded.



85.5k

did you restart the mamp ?



85.5k

ok if you type

/Applications/MAMP/bin/php/php5.6.10/bin/php -m | grep "phalcon"

does it show it ?



6.3k

nothing appened



85.5k

feels like you missed some small detail somewhere....

do you feel confortable to share teamviewer and let me check it ?



6.3k

i'm asking to my boss



85.5k

oh now I am not confortable :D

if you go to this directory

$ cd /Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/

is there phalcon.so file ?



6.3k

it's ok what do you need as infos ?



6.3k

yes phalcon.so is here



85.5k

you have skype or telegram ?



6.3k

skype add gallyoavanger



85.5k

you got friend request :D



6.3k

give me your nickname pls



6.3k

Download phalcon.so on this repo and follow instructions : https://github.com/majksner/php-phalcon-mamp (finded from an older post by raxan).

this is working fine for me



1.6k

i try to install phalcon but when i run /Applications/MAMP/bin/php/php5.6.10/bin/phpize MacBook-Pro-van-Mohamed:64bits Nosha$ /Applications/MAMP/bin/php/php5.6.10/bin/phpize grep: /Applications/MAMP/bin/php/php5.6.10/include/php/main/php.h: No such file or directory grep: /Applications/MAMP/bin/php/php5.6.10/include/php/Zend/zend_modules.h: No such file or directory grep: /Applications/MAMP/bin/php/php5.6.10/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version:
Zend Module Api No:
Zend Extension Api No:



1.6k

can you please help me ?



85.5k

u dont need to run phpize, the extensions are ready, so you just place them, follow the readme in the repo here https://github.com/majksner/php-phalcon-mamp



1.6k

Thanks for your reply i did already that and i can see phalcone in my phpinfo but the problem is that i can't start it when i type, MacBook-Pro-van-Mohamed:~ Nosha$ phalcon project blog

-bash: phalcon: command not found. So i thought i can remove it and install it again but when i install it it gives me thet error but now i can still see phalcon in my phpinfo



85.5k

phalcon doesnt work like that ( as far as i know ).

you can check some code examples here : https://github.com/phalcon/mvc ( keep in mind some of them may require a slight touch of few lines ).

here are the devtools https://github.com/phalcon/phalcon-devtools



1.6k

thanks for your help but i look like that i have to install first a devtools to mange to work with phalcon