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.



60.8k
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



2.8k
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 .



60.8k

ok but if create index.php file with

phpinfo();

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



2.8k

php 5.6.10 (MAMP version)



60.8k

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 ?



2.8k

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"



60.8k

change it to

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


2.8k

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



60.8k

did you restart the mamp ?



60.8k

ok if you type

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

does it show it ?



2.8k

nothing appened



60.8k

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

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



2.8k

i'm asking to my boss



60.8k

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 ?



2.8k

it's ok what do you need as infos ?



2.8k

yes phalcon.so is here



60.8k

you have skype or telegram ?



2.8k

skype add gallyoavanger



60.8k

you got friend request :D



2.8k

give me your nickname pls



2.8k

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

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/zendmodules.h: No such file or directory grep: /Applications/MAMP/bin/php/php5.6.10/include/php/Zend/zendextensions.h: No such file or directory Configuring for: PHP Api Version:
Zend Module Api No:
Zend Extension Api No:

can you please help me ?



60.8k

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

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



60.8k

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

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