extensions use wrong phpize in side-by-side installs #173

Closed
pilif opened this Issue Jul 16, 2012 · 3 comments

Comments

Projects
None yet
3 participants

pilif commented Jul 16, 2012

I have both php 5.3 and 5.4 installed using --with-fpm. One 5.3 is linked, but I'm generally using a wrapper on the command line that sets up PATH correctly and both fpm's are running at the same time.

The problem is that installing any PHP extension from your tap is using the phpize that's in PATH instead of the phpize that belongs to the version of php for which the extension is installed.

For example, with php-53 linked, so /usr/local/bin/phpize pointing to the php5.3 install,

brew install php54-intl

will download the correct version of php, but then it will use /usr/local/bin/phpize, configuring the module for PHP 5.3. This leads to a binary being built that can't be loaded by PHP 5.4.

The extension should be using the correct phpize by default without forcing me to

PATH=/usr/local/Cellar/php54/5.4.4/bin/:$PATH brew install php54-intl

(which is a valid workaround)

reinink commented Jul 18, 2012

@pilif Do you think my problems are related to this issue?

pilif commented Jul 18, 2012

Yes. That's the exact same issue.

The php*-whatever Formulas all use phpize directly from PATH (which is /usr/bin/phpize, which in turn is 5.3 in case of Snow Leopard and later).

You can work around the issue by setting the PATH before calling brew install.

reinink commented Jul 18, 2012

@pilif Okay yes, that's exactly what was wrong. Tried installing APC as per your recommendation, and it worked perfect:

PATH=/usr/local/Cellar/php54/5.4.4/bin/:$PATH brew install php54-apc

Thanks. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment