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 with MAMP 4.0.6

Hi,

I tried to install phalcon in MAMP 4.0.6 on mac os sierra. I use phalcon.so from https://github.com/majksner/php-phalcon-mamp I put the file in /Applications/MAMP/bin/php/php7.0.12/lib/php/extensions/no-debug-non-zts-20151012/ I add extension=phalcon.so in the php.ini file in /Applications/MAMP/bin/php/php7.0.12/conf/

When I launch servers in MAMP, only mysql start. If I comment ;extension=phalcon.so, apache and mysql start.

this command /Applications/MAMP/bin/php/php7.0.12/bin/php -m | grep "phalcon" give me : dyld: Library not loaded: /Applications/MAMP/Library/lib/libcurl.4.dylib Referenced from: /Applications/MAMP/bin/php/php7.0.12/bin/php Reason: Incompatible library version: php requires version 9.0.0 or later, but libcurl.4.dylib provides version 7.0.0

/Applications/MAMP/Library/bin/curl-config --version give me : libcurl 7.50.3 It seems to be one of the latest...

Please help me !!!



806

Does it come from the symlink ? ls -l /Applications/MAMP/bin/php/php7.0.12/lib/php/extensions/no-debug-non-zts-20151012/ total 14936 -rwxr-xr-x 1 XXX admin 15500 24 oct 18:27 apc.so -rwxr-xr-x 1 XXX admin 109416 24 oct 18:27 apcu.so -rwxr-xr-x 1 XXX admin 19492 24 oct 18:49 gettext.so -rwxr-xr-x 1 XXX admin 472680 24 oct 18:33 imagick.so -rwxr-xr-x 1 XXX admin 1159244 24 oct 18:49 imap.so -rwxr-xr-x 1 XXX admin 51284 24 oct 18:49 mcrypt.so -rwxr-xr-x 1 XXX admin 135704 24 oct 18:24 memcached.so -rwxr-xr-x 1 XXX admin 89708 24 oct 18:23 msgpack.so -rwxr-xr-x 1 XXX admin 169248 24 oct 18:25 oauth.so -rwxr-xr-x 1 XXX admin 362004 24 oct 18:49 opcache.so -rwxr-xr-x 1 XXX admin 58984 24 oct 18:49 pdo_pgsql.so -rwxr-xr-x 1 XXX admin 198220 24 oct 18:49 pgsql.so [email protected] 1 XXX admin 4168744 24 nov 13:49 phalcon.so -rwxr-xr-x 1 XXX admin 65208 24 oct 18:49 tidy.so -rwxr-xr-x 1 XXX admin 15836 24 oct 18:30 uploadprogress.so -rwxr-xr-x 1 XXX admin 389648 24 oct 18:29 xdebug.so -rwxr-xr-x 1 XXX admin 71332 24 oct 18:29 yaml.so -rwxr-xr-x 1 XXX admin 57760 24 oct 18:28 yaz.so



806

if I try to launch apache with command line : /Applications/MAMP/Library/bin/apachectl -e info -k restart httpd not running, trying to start

If I change port configuration (8000 rather than 8888), I have : /Applications/MAMP/Library/bin/apachectl -e info -k restart httpd not running, trying to start (48)Address already in use: make_sock: could not bind to address [::]:8000 (48)Address already in use: make_sock: could not bind to address 0.0.0.0:8000 no listening sockets available, shutting down Unable to open logs



43.9k
edited Dec '16

Hi,

You said that without extension=phalcon.so in php.ini apache server start. Does php work in that case ? phpinfo() ? Is curl loaded ?

If yes, try to load phalcon extension using a file like /etc/php/7.0/apache2/conf.d/30-phalcon.ini where you will put extension=phalcon.so in it. Phalcon should be loaded after all others php extensions.



806

Hi Le51 (pastaga ;)) php works, phpinfo works, curl loaded :

curl

cURL support enabled

cURL Information 7.50.3

Age 3

Features

AsynchDNS No

CharConv No

Debug No

GSS-Negotiate No

IDN Yes

IPv6 Yes

krb4 No

Largefile Yes

libz Yes

NTLM Yes

NTLMWB Yes

SPNEGO No

SSL Yes

SSPI No

TLS-SRP Yes

HTTP2 No

GSSAPI No

KERBEROS5 No

UNIX_SOCKETS Yes

PSL No

Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, smb, smbs, smtp, smtps, telnet, tftp

Host x86_64-apple-darwin13.4.0

SSL Version OpenSSL/1.0.2j

ZLib Version 1.2.8

The path

Configuration File (php.ini) Path /Applications/MAMP/bin/php/php7.0.12/conf

Loaded Configuration File /Applications/MAMP/bin/php/php7.0.12/conf/php.ini

I don't find something like your url

find /Applications/MAMP -name "php.ini" -print /Applications/MAMP/bin/php/php5.4.45/conf/php.ini /Applications/MAMP/bin/php/php5.5.38/conf/php.ini /Applications/MAMP/bin/php/php5.6.27/conf/php.ini /Applications/MAMP/bin/php/php7.0.12/conf/php.ini /Applications/MAMP/conf/php5.1.6/php.ini /Applications/MAMP/conf/php5.2.17/php.ini /Applications/MAMP/conf/php5.3.10/php.ini /Applications/MAMP/conf/php5.3.13/php.ini /Applications/MAMP/conf/php5.3.14/php.ini /Applications/MAMP/conf/php5.3.20/php.ini /Applications/MAMP/conf/php5.3.27/php.ini /Applications/MAMP/conf/php5.3.28/php.ini /Applications/MAMP/conf/php5.3.29/php.ini /Applications/MAMP/conf/php5.3.5/php.ini /Applications/MAMP/conf/php5.3.6/php.ini /Applications/MAMP/conf/php5.4.10/php.ini /Applications/MAMP/conf/php5.4.19/php.ini /Applications/MAMP/conf/php5.4.20/php.ini /Applications/MAMP/conf/php5.4.21/php.ini /Applications/MAMP/conf/php5.4.23/php.ini /Applications/MAMP/conf/php5.4.25/php.ini /Applications/MAMP/conf/php5.4.26/php.ini /Applications/MAMP/conf/php5.4.3/php.ini /Applications/MAMP/conf/php5.4.30/php.ini /Applications/MAMP/conf/php5.4.32/php.ini /Applications/MAMP/conf/php5.4.33/php.ini /Applications/MAMP/conf/php5.4.34/php.ini /Applications/MAMP/conf/php5.4.35/php.ini /Applications/MAMP/conf/php5.4.38/php.ini /Applications/MAMP/conf/php5.4.39/php.ini /Applications/MAMP/conf/php5.4.4/php.ini /Applications/MAMP/conf/php5.4.42/php.ini /Applications/MAMP/conf/php5.4.45/php.ini /Applications/MAMP/conf/php5.5.10/php.ini /Applications/MAMP/conf/php5.5.14/php.ini /Applications/MAMP/conf/php5.5.17/php.ini /Applications/MAMP/conf/php5.5.18/php.ini /Applications/MAMP/conf/php5.5.19/php.ini /Applications/MAMP/conf/php5.5.22/php.ini /Applications/MAMP/conf/php5.5.23/php.ini /Applications/MAMP/conf/php5.5.26/php.ini /Applications/MAMP/conf/php5.5.3/php.ini /Applications/MAMP/conf/php5.5.30/php.ini /Applications/MAMP/conf/php5.5.31/php.ini /Applications/MAMP/conf/php5.5.32/php.ini /Applications/MAMP/conf/php5.5.33/php.ini /Applications/MAMP/conf/php5.5.34/php.ini /Applications/MAMP/conf/php5.5.35/php.ini /Applications/MAMP/conf/php5.5.36/php.ini /Applications/MAMP/conf/php5.5.37/php.ini /Applications/MAMP/conf/php5.5.38/php.ini /Applications/MAMP/conf/php5.5.5/php.ini /Applications/MAMP/conf/php5.5.7/php.ini /Applications/MAMP/conf/php5.5.9/php.ini /Applications/MAMP/conf/php5.6.0/php.ini /Applications/MAMP/conf/php5.6.1/php.ini /Applications/MAMP/conf/php5.6.10/php.ini /Applications/MAMP/conf/php5.6.14/php.ini /Applications/MAMP/conf/php5.6.16/php.ini /Applications/MAMP/conf/php5.6.17/php.ini /Applications/MAMP/conf/php5.6.18/php.ini /Applications/MAMP/conf/php5.6.19/php.ini /Applications/MAMP/conf/php5.6.2/php.ini /Applications/MAMP/conf/php5.6.20/php.ini /Applications/MAMP/conf/php5.6.21/php.ini /Applications/MAMP/conf/php5.6.22/php.ini /Applications/MAMP/conf/php5.6.23/php.ini /Applications/MAMP/conf/php5.6.24/php.ini /Applications/MAMP/conf/php5.6.25/php.ini /Applications/MAMP/conf/php5.6.26/php.ini /Applications/MAMP/conf/php5.6.27/php.ini /Applications/MAMP/conf/php5.6.3/php.ini /Applications/MAMP/conf/php5.6.6/php.ini /Applications/MAMP/conf/php5.6.7/php.ini /Applications/MAMP/conf/php7.0.0/php.ini /Applications/MAMP/conf/php7.0.1/php.ini /Applications/MAMP/conf/php7.0.10/php.ini /Applications/MAMP/conf/php7.0.11/php.ini /Applications/MAMP/conf/php7.0.12/php.ini /Applications/MAMP/conf/php7.0.2/php.ini /Applications/MAMP/conf/php7.0.3/php.ini /Applications/MAMP/conf/php7.0.4/php.ini /Applications/MAMP/conf/php7.0.5/php.ini /Applications/MAMP/conf/php7.0.6/php.ini /Applications/MAMP/conf/php7.0.7/php.ini /Applications/MAMP/conf/php7.0.8/php.ini /Applications/MAMP/conf/php7.0.9/php.ini



43.9k

Hi,

On linux/unix box, php offer the ability to control the order on how php extensions are loaded and use for that files (or symlinks) in a directory wich path is something like .../apache2/conf.d/ for php on a webserver and .../cli/conf.d/ for php command line tasks.



806

Hi,

Thank you for your support!

there is no conf.d directory. This line give no result : find /Applications/MAMP -name "conf.d" -print

And if I look for just conf directory, I have : find /Applications/MAMP -name "conf" -print

/Applications/MAMP/bin/php/php5.4.45/conf

/Applications/MAMP/bin/php/php5.5.38/conf

/Applications/MAMP/bin/php/php5.6.27/conf

/Applications/MAMP/bin/php/php7.0.12/conf

/Applications/MAMP/bin/phpPgAdmin/conf

/Applications/MAMP/bin/phpPgAdmin/plugins/GuiControl/conf

/Applications/MAMP/bin/phpPgAdmin/plugins/Report/conf

/Applications/MAMP/conf



806

in MAMP/conf/apache I modified httpd.conf after

LoadModule php7_module /Applications/MAMP/bin/php/php7.0.12/modules/libphp7.so

I added

LoadModule phalcon_module /Applications/MAMP/bin/php/php7.0.12/lib/php/extensions/no-debug-non-zts-20151012/phalcon.so

But I have an error message....



43.9k

if others modules are loaded in httpd.conf, phalcon must come at the last position (after gd, crypt, mysql and so on) because they are needed by phalcon itself



806

LoadModule php7_module /Applications/MAMP/bin/php/php7.0.12/modules/libphp7.so

LoadModule phalcon_module /Applications/MAMP/bin/php/php7.0.12/lib/php/extensions/no-debug-non-zts-20151012/phalcon.so

libphp.so is the last .so file loaded in the httpd.conf

But I have an error message when I start apache (misconfiguration). Have you an idea about syntax ?



43.9k

hi,

But I have an error message when I start apache

well, what kind of error ?



806

in french : Apache pas pu être démarré. S'il vous plaît vérifier l'installation et la configuration de MAMP.

My translation : apache have not been started. Please, check install and configuration of MAMP.

It happens only when I change the httpd.conf. If I change the php.ini, apache doesn't work but there is no dialog box...



43.9k

what an helpfull error message :-/

I'm sorry, I can't help you further, as I don't own any mac.

Maybe try another approach: https://docs.docker.com/docker-for-mac/

and use: https://github.com/sergeyklay/phalcon-compose



806

ok, I will look at that.

Thank you for your time ;)