1Answer
  • 9
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 187

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 187
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

How to enable GMP in PHP on OS X?

Using OS X 10.11.1 (El Capitan) and PHP 5.5.29.

I would like to add the GMP extension to my PHP, but I have no clue to do so. According to the PHP manual I'm supposed compile PHP with a --with-gmp=dir option. But I don't know how to compile PHP (I doubt if I ever did it on this machine, iirc it just came with PHP by default), and I don't know what dir to use with that --with-gmp= option either.

I do have Homebrew, and I noticed a rather old old similar question however that doesn't seem to work (package no longer available).

I noticed in brew there is something called homebrew/php/php55-gmp but that suggests to something with brew tap. I have no clue what that is, and I'd rather not mess up my Homebrew config or my entire development environment (I guess that's unlikely, but I have no idea what I'm doing to my system when I mess with this tap stuff).

RocketNuts, you can simply execute:

brew install homebrew/php/php55-gmp

That's all what I did.

  • 14
Reply Report