# PHP fails with "checking whether IMAP works... no"

## Enverex

PHP used to work fine. I've been using it with Apache and Courier IMAP for some time but now when I went to update it I get the error "checking whether IMAP works... no" and it fails even though IMAP works fine on that server and I can still check my mail via IMAP fine. Has anyone else come across this error at all?

----------

## thestick

had the same problem . there`s an USE flag witch requires that.

please output emerge -pv php.

----------

## Enverex

```
[ebuild   R   ] dev-lang/php-4.4.2-r5  USE="apache2 berkdb bzip2* cjk cli crypt curl exif* expat gd gdbm imap ldap ming* mysql ncurses nls pcre pic readline session sockets spell sqlite* ssl truetype unicode xml zip* zlib -adabas -apache -bcmath -birdstep -calendar -cdb -cgi -ctype -db2 -dbase -dbmaker -dbx -debug -discard-path -doc -empress -empress-bcs -esoob -fastbuild -fdftk -filepro -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd-external -gmp -hardenedphp -hyperwave-api -iconv -informix -inifile -interbase -iodbc -ipv6 -java-external -java-internal -kerberos -libedit -mcal -mcve -memlimit -mhash -mnogosearch -msql -mssql -oci8 -oci8-instant-client -odbc -oracle7 -overload -ovrimos -pcntl -pfpro -posix -postgres -recode -sapdb -sharedext -sharedmem -snmp -solid -sybase -sybase-ct -sysvipc -threads -tokenizer -wddx -xmlrpc -xpm -xsl -yaz" 0 kB 
```

----------

## Enverex

Brump.

----------

## fleed

Try re-emerging courier imap to see if that makes php see it?

----------

## Enverex

Nope.

----------

## fleed

Are you using a standard port for courier imap?

----------

## Enverex

Yup.

----------

## fleed

Sorry mate, no clue what to try next, other than looking at the configure script itself to see what it's checking and failing to find.

----------

## Janne Pikkarainen

If my memory serves me right, IMAP support in PHP needs c-client libraries from uw-imapd. So please try to emerge net-libs/c-client and re-emerge PHP with IMAP support enabled after that.

----------

## budee

I was also affected by this when upgrading from php 4.4.4-r8 to php 4.4.6 always got this error:

```
checking whether IMAP works... no

configure: error: build test failed. Please check the config.log for details.

!!! ERROR: dev-lang/php-4.4.6 failed.

Call stack:

  ebuild.sh, line 1614:   Called dyn_compile

  ebuild.sh, line 971:   Called qa_call 'src_compile'

  environment, line 5113:   Called src_compile

  php-4.4.6.ebuild, line 173:   Called src_compile_normal

  php-4.4.6.ebuild, line 323:   Called php4_4-sapi_src_compile

  php4_4-sapi.eclass, line 565:   Called die

!!! configure failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/tmp/portage/dev-lang/php-4.4.6/temp/build.log'.
```

I have resolved it by re emerging curl. After that php did build without errors.

----------

## richard.scott

Ok, I know this is an old thread, but I've just had the same issue upgrading to dev-lang/php-5.2.8-r2   :Embarassed: 

I needed to re-emerge net-libs/c-client and then php for this to work!

Hope this helps someone.

Rich.

----------

