# devel/pear inside jail



## nforced (Feb 4, 2015)

I can't install PEAR inside one of mail jails

```
root@www:/usr/ports/devel/pear # make install clean
===>  Staging for pear-1.9.4_3
===>  pear-1.9.4_3 depends on file: /usr/local/include/php/main/php.h - found
===>  pear-1.9.4_3 depends on file: /usr/local/lib/php/20131226/xml.so - found
===>  Generating temporary packing list


******************************************************************************
FATAL ERROR! We cannot initialize the temp directory. Please be sure to give
full write access to this directory and the install directory.

'/tmp/pear' was given.sed: /var/ports/basejail/usr/ports/devel/pear/work/stage/usr/local/share/pear/peclcmd.php: No such file or directory
*** Error code 1

Stop.
make: stopped in /basejail/usr/ports/devel/pear
```
I can go to
/var/ports/basejail/usr/ports/devel/pear/work/stage/usr/local/share but there is no pear/peclcmd.php inside.

I wonder what "*We cannot initialize the temp directory*" means, it doesn't look like this has to do anything with /tmp?


----------



## junovitch@ (Feb 4, 2015)

Old bugs are new again.  Take a look here and see if there is any helpful info.

https://forums.freebsd.org/threads/php-get-errors-when-trying-to-install-pear-via-ports.14089/

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=153723


----------



## nforced (Feb 5, 2015)

Thanks!
open_basedir inside php.ini was really the cause, I saw this thread before but since it was 2011 I thought it's outdated but looks like it's not.


----------



## junovitch@ (Feb 6, 2015)

So port issue?  Would a new PR @ https://bugs.freebsd.org/bugzilla/ with the details for the fix be needed?


----------



## nforced (Feb 6, 2015)

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197363

I saw Martin Wilke comment in another similar issue that makes me wonder is this a real bug or just something to consider when installing PEAR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=180636


> pear works perfectly fine with php5.5 when you use /usr/ports as default
> path, not any custom php.ini, see here
> http://po.miwibox.org:1288/bulk/latest-per-pkg/pear/1.9.4_1/ , if you
> have a php.ini please remove or move it somewhere else, install it and
> put your php.ini back on place


----------

