# Trouble installing php5-imap



## millionaire_mind (May 25, 2010)

I'm having trouble installing php5-imap.  I think it was installed with squirrelmail, but now I don't want squirrelmail, but I do want php5-imap.  Here is what happens when I try to install:


```
xxx-xxx-xxx-xxx# make install clean
===>  Building for php5-imap-5.3.2
/bin/sh /usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap/libtool --mode=compile cc  -I. -I/usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap 
-DPHP_ATOM_INC -I/usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap/include -I/usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap/main -I/usr
/ports/mail/php5-imap/work/php-5.3.2/ext/imap -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr
/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include/c-client  -I/usr/local
/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr
/local/include/php/ext/date/lib -DHAVE_CONFIG_H  -O2 -fno-strict-aliasing -pipe   -c /usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap
/php_imap.c -o php_imap.lo
 cc -I. -I/usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap -DPHP_ATOM_INC -I/usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap/include -I/usr
/ports/mail/php5-imap/work/php-5.3.2/ext/imap/main -I/usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap -I/usr/local/include/php -I/usr/local
/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext
/date/lib -I/usr/local/include/c-client -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local
/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -fno-strict-aliasing -pipe -c 
/usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap/php_imap.c  -fPIC -DPIC -o .libs/php_imap.o
In file included from /usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap/php_imap.c:44:
/usr/local/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /usr/ports/mail/php5-imap/work/php-5.3.2/ext/imap/php_imap.c:44:
/usr/local/include/php/ext/pcre/php_pcre.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/php/ext/pcre/php_pcre.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before 'pcre'
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/mail/php5-imap.
xxx-xxx-xxx-xxx#
```


----------



## SirDice (May 25, 2010)

Looks like you're missing devel/pcre.


----------



## millionaire_mind (May 25, 2010)

I tried doing a "make install clean" on "devel/pcre" and still got the error on "php5-imap" install.  All these problems started when I removed squirrelmail, so I just reinstalled squirrelmail and now my server won't boot up and I have my hosting company looking into it.  Meanwhile, the entire company is at a standstill.  This is not good!!!


----------



## DutchDaemon (May 25, 2010)

devel/pcre should have already been pulled in by lang/php5. If you don't have it, something went wrong with your PHP5 installation/upgrade (20100409 in /usr/ports/UPDATING).


----------



## millionaire_mind (May 25, 2010)

Can you please tell me what "20100409 in /usr/ports/UPDATING" says, because my server is down.


----------



## DutchDaemon (May 25, 2010)

Think you saw it before:


```
20100409:
  AFFECTS: users of lang/php5
  AUTHOR: ale@FreeBSD.org

  As of php 5.3, a few extensions were removed from or included into the core
  php5 package.  Follow the steps below to update your installation.

  1) Delete the following packages (if installed):
     - php5-dbase
     - php5-ncurses
     - php5-pcre
     - php5-spl
     - php5-ming
     - php5-mhash

  2) Rebuild php5 and all ports depending on it.
```

The successful rebuild/reinstall of php5 should have installed devel/pcre already (replacing php5-pcre).


----------



## millionaire_mind (May 25, 2010)

Thanks  DutchDaemon, I didn't realize it was the same one.  If my hosting company can get the machine back on I'll look into it.  I don't see how re-installing squirrelmail can cause it to not boot up.


----------



## millionaire_mind (May 25, 2010)

I was just notified that the server is waiting for "apache mod_ssl pass phrase".  I installed the certificate yesterday, but didn't realize that I'd have to enter the passphrase every time the server reboots.


----------



## DutchDaemon (May 25, 2010)

Yes, but it can be circumvented (at your own risk, of course) -> http://www.modssl.org/docs/2.8/ssl_faq.html#ToC31


----------

