ben.kaminski ben.kaminski - 1 year ago 80
MySQL Question

Upgrading to macOS Sierra breaks PHP/MYSQL configuration

So I recently upgraded to macOS Sierra (Beta) and it broke my PHP/MySQL config... no real surprise there but... what's weird is that some quick terminal commands show me that PHP and MySQL are both up and running! For example... PHP:

myusername@myworkstation  /private/etc/apache2/other  php -v
PHP 5.6.24 (cli) (built: Aug 9 2016 16:05:05)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

So, I decided to run

apachectl configtest

And herein lies the problem:

httpd: Syntax error on line 537 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/+entropy-php.conf: Cannot load /usr/local/php5/ into server: dlopen(/usr/local/php5/, 10): Symbol not found: _environ\n Referenced from: /usr/local/php5/\n Expected in: /usr/sbin/httpd\n

So the problem is that the OS can't find or can't load PHP... any ideas how to resolve this? Seems like an incorrect path but wondering if anything changed on the OS side that caused this? Not much in the OS Sierra bandwidth concerning this issue. Hoping to connect with other dev's that have run into this issue as of late or someone who might better understand how to get back up and running again.

Thanks in advance for any help and in the meantime, I'll continue my fix attempts in hopes this can be quickly resolved.

Answer Source

I had a similar issue. Seems like sierra overwrites the config files. I got php working by uncommenting the php loadmodule line in httpd.conf. My websites are working again but all my vhost stuff seems to be gone. I will recreate the configs and add to this if it helped.