# imap shared with a different openssl path

- Thread: https://externals.io/message/16150
- Original archive: https://news-web.php.net/php.internals/16150
- Started by Brian J. France on 2005-04-29T21:48:15+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #16150 — Brian J. France — 2005-04-29T21:48:15+00:00

URL: https://externals.io/message/16150#16150

I am trying to build imap as a shared extension (phpize method) with 
different path for openssl.  This seems easy, right?

phpize; ./configure --with-imap-ssl=<path>

But that doesn't work.  It seems that line 1688 in acinclude.m4 is the 
problem:

1687   dnl Fallbacks for different configure options
1688   if test "$PHP_OPENSSL" != "no"; then
1689     PHP_OPENSSL_DIR=$PHP_OPENSSL
1690   elif test "$PHP_IMAP_SSL" != "no"; then
1691     PHP_OPENSSL_DIR=$PHP_IMAP_SSL
1692   fi

The problem is $PHP_OPENSSL is blank and hits the first case setting 
$PHP_OPENSSL_DIR to blank and things blow up in a few test down.  
Something like this fixes it:

   if test "$PHP_OPENSSL" != "no" && test "$PHP_OPENSSL" != ""; then

I don't know if this would break anything or not, thoughts?

Brian

---

## #16151 — Antony Dovgal — 2005-04-29T21:59:30+00:00

URL: https://externals.io/message/16150#16151 · In reply to: #16150

On Fri, 29 Apr 2005 16:48:15 -0500
"Brian J. France" <list@firehawksystems.com> wrote:

> I am trying to build imap as a shared extension (phpize method) with 
> different path for openssl.  This seems easy, right?
> 
> phpize; ./configure --with-imap-ssl=<path>
> 
> But that doesn't work.  It seems that line 1688 in acinclude.m4 is the 
> problem:
> 
> 1687   dnl Fallbacks for different configure options
> 1688   if test "$PHP_OPENSSL" != "no"; then
> 1689     PHP_OPENSSL_DIR=$PHP_OPENSSL
> 1690   elif test "$PHP_IMAP_SSL" != "no"; then
> 1691     PHP_OPENSSL_DIR=$PHP_IMAP_SSL
> 1692   fi
> 
> The problem is $PHP_OPENSSL is blank and hits the first case setting 
> $PHP_OPENSSL_DIR to blank and things blow up in a few test down.  
> Something like this fixes it:
> 
>    if test "$PHP_OPENSSL" != "no" && test "$PHP_OPENSSL" != ""; then
> 
> I don't know if this would break anything or not, thoughts?

You should tell at least what version of PHP you're using.
Or even better: create a bug report at bugs.php.net and don't forget to 
fill up all the fields required. 

-- 
Wbr, 
Antony Dovgal aka tony2001
antony@zend.com

---

## #16152 — D.Walsh — 2005-04-29T22:29:40+00:00

URL: https://externals.io/message/16150#16152 · In reply to: #16150

> I am trying to build imap as a shared extension (phpize method) with 
> different path for openssl.  This seems easy, right?
>
> phpize; ./configure --with-imap-ssl=<path>
>
> But that doesn't work.  It seems that line 1688 in acinclude.m4 is the 
> problem:
>
> 1687   dnl Fallbacks for different configure options
> 1688   if test "$PHP_OPENSSL" != "no"; then
> 1689     PHP_OPENSSL_DIR=$PHP_OPENSSL
> 1690   elif test "$PHP_IMAP_SSL" != "no"; then
> 1691     PHP_OPENSSL_DIR=$PHP_IMAP_SSL
> 1692   fi
>
> The problem is $PHP_OPENSSL is blank and hits the first case setting 
> $PHP_OPENSSL_DIR to blank and things blow up in a few test down.  
> Something like this fixes it:
>
>   if test "$PHP_OPENSSL" != "no" && test "$PHP_OPENSSL" != ""; then
>
> I don't know if this would break anything or not, thoughts?
>
> Brian

I tried changing configure but being on a Mac it complained about my 
autoconf/automake versions so I took a different approach.

I have two openssl's installed, the original in /usr and an newer 
version in /usr/local.

I moved the openssl files from /usr to a safe place, built PHP with 
imap shared using /usr/local openssl files and copied the shared module 
to a safe place.

Moved the openssl stuff back, rebuilt PHP with imap as shared, 
installed it and then copied my saved shared module into the extensions 
folder.

Originally I made PHP without the imap imap extensionm, then I realized 
I didn't need to do any make installs since all I wanted was the shared 
module I could have copied it from the extension folder after the make 
command saving me time of building PHP a couple of time.

I now have a "Makefile" file just outside of the PHP source source that 
I use to process the PHP source that builds it in /tmp in whatever 
configuration I need without ever affecting my true install so It has 
distinct build advantages.

-- Dale

---

## #16153 — Edin Kadribasic — 2005-04-29T22:33:26+00:00

URL: https://externals.io/message/16150#16153 · In reply to: #16151

> > […]
>
> You should tell at least what version of PHP you're using.
> Or even better: create a bug report at bugs.php.net and don't forget to
> fill up all the fields required.

Not every extension can be built by running phpize in its directory due to
external dependencies. What's wrong with building it from php source root
with ./configure --with-imap=shared ?

Edin

---

## #16156 — Brian J. France — 2005-05-01T04:41:38+00:00

URL: https://externals.io/message/16150#16156 · In reply to: #16153

> > […]
>
> Not every extension can be built by running phpize in its directory 
> due to
> external dependencies. What's wrong with building it from php source 
> root
> with ./configure --with-imap=shared ?

I will try that on Monday, but my guess is it will then force PHP to be 
linked with openssl (either via --with-imap-ssl=<path> or having to set 
--openssl-dir=<path>).

This would be another problem as we don't want PHP linked with openssl 
for other reasons, like having to build/maintain/support two versions 
(0.9.7 and 0.9.6).  Yes, we know without linking openssl secure streams 
don't work and we have no problem with that.

Brian
