Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't get PHP extensions to load on OS X Mavericks

So I upgraded to OS X 10.9 Mavericks and I'm trying to set up my local dev environment again. I ran xcode-select --install as mentioned in this thread which lets me compile the extensions successfully. I've confirmed that the extension exists in /usr/lib/php/extensions/no-debug-non-zts-20100525 and that I've added extension=redis.so to my php.ini file.

I haven't seen any errors related to being unable to load the extension, and phpinfo() reports the expected extension_dir and shows a extension=redis.so in its output, confirming that I did put it into the correct file. Unfortunately that's the only trace of 'redis' in the phpinfo() output.

When I go to my application, I get the error: Fatal error: Class 'Redis' not found in /Volumes/Storage/ty/Sites/audiomack/application/Bootstrap.php on line 95

I installed using sudo pecl install redis one time and by manually downloading the phpredis zip and compiling it myself once, same result.

Any ideas why PHP isn't loading extensions?

I am getting one strange warning that seems unrelated, but I will mention it for completeness: in php.ini I've set date.timezone = America/New_York, but my setting seems to be getting ignored. PHP info's "date" section shows date.timezone as 'no value' still, and gives me the warning we've all seen a hundred times:

It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /Volumes/Storage/ty/Sites/audiomack/public/phpinfo.php on line 2

edit: yes, I've restarted apache repeatedly, no dice

like image 224
Ty W Avatar asked Oct 20 '22 22:10

Ty W


1 Answers

ugh. the include_path line of the php.ini file had an opening quotation mark but no closing quote. PHP was sucking in most of the php.ini file as the value for include_path. Shocked that there weren't any syntax or parse errors thrown because of it.

like image 111
Ty W Avatar answered Oct 27 '22 09:10

Ty W