Alternate ways of getting pecl extensions to work in OpenSolaris
Earlier, I wrote this blog on how to use PECL extensions within OpenSolaris. Now, there will be some scenario where in a simple pecl install <extension name> might not work because of how the script might have been written or what external dependencies like it depends etc.
For example, if you wanted to get mailparse PECL extension working within opensolaris, you would obviously try the following command first
|
pfexec /usr/php/bin/pecl install mailparse |
and would probably be scratching your head when you run into the below error ...
|
bash-3.2# /usr/php/bin/pecl install mailparse checking for re2c... no |
What the above error means that while PECL framework trying to build the mailparse extension , it is looking for a tool known as 're2c' (which is internally used by PHP). Unfortunately, this tool has not yet made its ways into OpenSolaris yet. I am pretty sure, this tool will soon make its way into OpenSolaris repository as well..
Okay, in these scenario, here is another quickie to get things going for you...
- Within your OpenSolaris machine, manually download mailparse extension from PECL repository
- run /usr/php/bin/phpize , followed by configure and build command.
|
[sriramn@sriramn]'~'>gunzip -c mailparse-1.1.4.tar.gz | tar xvfp -
|
Now, mailparse extension should be available under /var/php/5.2/modules directory. If you would like to include any mailparse specific extension, you will need to define them within /etc/php/5.2/php.ini
Af course, for Apache/PHP module to load these new extensions, you will need to restart Apache/PHP server by doing some thing like.. I am sure, you know this already blogs.sun.com/images/smileys/smile.gif" class="smiley" alt=":-)" title=":-)" />
svcadm restart http:apache22

