# PHP5 without PEAR?

## Hossie

Hi,

I just emerged apache2, php5 and mysql4 with the help of the gentoo-wiki. Everything just works fine and I'm really happy with it. As I read through the phpinfo() I saw that the ./configure command was called with "--without-pear", I thought I forgot to enable pear.

But:

```
tuxy hossie # equery u dev-lang/php | grep pear

+pear
```

I emerged it with the pear-use flag, still PHP compiled with "--without-pear" and PEAR is not available.

A test script also doesnt work:

```
tuxy htdocs # cat test.php

<?php

require_once("Net/Ping.php");

?>

-->

Warning: main(Net/Ping.php) [function.main]: failed to open stream: No such file or directory
```

Is it a bug or am I just too stupid?

----------

## !equilibrium

emerge PEAR-PEAR

----------

## Hossie

I already have that installed.

```
emerge -s PEAR-PEAR

Searching...

[ Results for search key : PEAR-PEAR ]

[ Applications found : 2 ]

*  dev-php/PEAR-PEAR

      Latest version available: 1.3.6-r1

      Latest version installed: 1.3.6-r1

      Size of downloaded files: 148 kB

      Homepage:    http://pear.php.net/

      Description: PEAR Base System

      License:     PHP

[...]
```

 :Sad: 

----------

## !equilibrium

 *Hossie wrote:*   

> *  dev-php/PEAR-PEAR

 

uhmmm this is my packages.keywords:

 *Quote:*   

> dev-lang/php ~x86
> 
> app-admin/eselect ~x86
> 
> app-text/aspell ~x86
> ...

 

is your similar? (maybe can help to unmerge PEAR-PEAR, erase all the PEAR dir and re-emerge the package to be sure that all stuff is created)

----------

## hank2000

Hmm, looks like I have the same problem on my box as well.

pear refuses to be compiled in php.

Am I on the right way here?

There is a hwoto: http://gentoo-wiki.com/HOWTO_PHP_5_with_PEAR but it didn't help.

My configuration is:

```

/etc/portage/package.keywords:

dev-lang/php ~x86

app-admin/eselect-php ~x86

app-admin/eselect ~x86

#Packages needed by PEAR

dev-php/PEAR-PEAR ~x86

dev-php/PEAR-Archive_Tar ~x86

dev-php/PEAR-Console_Getopt ~x86

dev-php/PEAR-XML_RPC ~x86

```

```

/etc/portage/package.use:

dev-lang/php pear xml

```

and the emerge call is:

```
USE="dba gd cli" emerge  dev-lang/php
```

More information needed?

I suspect a problem between the ebuild and the configure.

Any ideas is this worth filing a bugreport or not?

Thanks and cheers

Heinrich

----------

## MOL_PL

PEAR still doesnt work, how to fix it ?

```
[ebuild   R   ] dev-lang/php-5.1.4  USE="apache2 berkdb cli crypt ftp gd imap mhash mysql mysqli ncurses nls pcre readline reflection session snmp sockets spell spl ssl unicode xml zlib -apache -bcmath -bzip2 -calendar -cdb -cgi -cjk -ctype -curl -curlwrappers -db2 -dbase -debug -discard-path -doc -exif -fastbuild -flatfile -force-cgi-redirect -gd-external -gdbm -gmp -hardenedphp -hash -hyperwave-api -iconv -inifile -interbase -iodbc -ipv6 -java-external -kerberos -ldap -libedit -mcve -memlimit -ming -msql -mssql -oci8 -odbc -pcntl -pdo -pdo-external -pic -posix -postgres -qdbm -recode -sapdb -sasl -sharedext -sharedmem -simplexml -soap -sqlite -sysvipc -threads -tidy -tokenizer -truetype -vm-goto -vm-switch -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip" 0 kB

```

```
 dev-php/PEAR-PEAR

      Latest version available: 1.4.9-r1

      Latest version installed: 1.4.9-r1

      Size of files: 324 kB

      Homepage:      http://pear.php.net/

      Description:   PEAR Base System (PEAR, Archive_Tar, Console_Getopt, XML_RPC).

      License:       PHP

```

How to start pear ?

```
Configure Command     './configure' '--prefix=/usr/lib64/php5' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' [color=red]'--without-pear'[/color] '
```

I have amd64, adn this package is masked

```

ev-php/PEAR-File_Passwd [ Masked ]

      Latest version available: 1.1.6

      Latest version installed: 1.1.6

      Size of files: 23 kB

      Homepage:      http://pear.php.net/File_Passwd

      Description:   Manipulate many kinds of password files.

      License:       PHP

```

Could it be the reason why doesnt it work ?

the PEAR_Info() shows:

```
PEAR Credits

PEAR Config

auto_discover    0

bin_dir    /usr/bin

cache_dir    /tmp/pear/cache

cache_ttl    3600

data_dir    /usr/share/php/data

default_channel    pear.php.net

doc_dir    /usr/share/php/docs

ext_dir    /usr/lib64/php5/lib/php/extensions/no-debug-non-zts-20050922

master_server    pear.php.net

php_bin    /usr/lib64/php5/bin/php

php_dir    /usr/share/php

preferred_mirror    pear.php.net

preferred_state    stable

remote_config    

sig_bin    /usr/local/bin/gpg

sig_keydir    /etc/pearkeys

sig_type    gpg

test_dir    /usr/share/php/tests

umask    22

verbose    1

PEAR Packages

Index

Warning: Invalid argument supplied for foreach() in /usr/share/php/PEAR/Info.php on line 235

|

```

----------

