# lighttpd + php issue

## sobers_2002

```

[ebuild  N    ] www-servers/lighttpd-1.4.4  +bzip2 -doc +fam +fastcgi +gdbm +ipv6 -ldap -lua -memcache -minimal +mysql +pcre +php -rrdtool +ssl -test -webdav -xattr 0 kB

```

i am trying to install lighttpd here with php support. i have the following

```

[ebuild   R   ] dev-php/mod_php-4.4.0-r1 

[ebuild   R   ] dev-php/php-4.4.0

```

php already installed. but on emerging lighttpd i get the following error :

```

!!! ERROR: www-servers/lighttpd-1.4.4 failed.

!!! Function has_php, Line 228, Exitcode 1

!!! Unable to find an installed dev-lang/php package

```

now dev-lang/php corresponds to php5 but i don't want to install that. how do i make this work??

thankx

Saurabh

----------

## adsmith

same question here.  

I guess the thing to do is to mask >=dev-lang/php-5, but this seems hackish.  better would be to get all the dependencies properly squared away.

----------

## sobers_2002

here is the error i am getting now while emerging php alone. (dev-lang/php) i unmerged dev-php version

and now it sucks even more

```
 * Determining SAPI(s) to build

 *   Enabled  SAPI: cli

 *   Disabled SAPI: cgi

 *   Disabled SAPI: apache

 *   Disabled SAPI: apache2

>>> Unpacking source...

>>> Unpacking php-5.0.5.tar.bz2 to /var/tmp/portage/php-5.0.5-r1/work

 * Applying php5.0.5-obj-serialize.patch ...                              [ ok ]

 * Applying php5_soap_persistence_session.diff ...                        [ ok ]

 * Applying php5-libtool-1.5.patch ...                                    [ ok ]

 * Running aclocal

TSRM/tsrm.m4:71: file `TSRM/TSRM/threads.m4' does not exist

!!! ERROR: dev-lang/php-5.0.5-r1 failed.

!!! Function php5_0-sapi_src_unpack, Line 285, Exitcode 1

!!! Unable to run aclocal successfully

```

this sucks  :Sad: (

----------

## Thread

I have the exact same question . . . . .

----------

## c4

 *Thread wrote:*   

> I have the exact same question . . . . .

 

Not sure whether you wanted to use dev-php/php or dev-lang/php with lighttpd, but if it's the later I wrote this guide some time ago that might help you with lighttpd. I'm currently running lighttpd-1.4.8 with dev-lang/php-5.1.1 and most things work fine. I've only ran into one minor issue with some php code designed speciffically for php4, but otherwise fast-cgi is working great.

See also here and here for two other topics about lighttpd / php / fast-cgi.

----------

## br41n

Same problem here, anybody?

When the error appeared i was doing an emerge lighttpd which included

```

1167906670:  ::: completed emerge (13 of 23) sys-devel/libtool-1.5.22 to /

1167906737:  ::: completed emerge (14 of 23) sys-devel/m4-1.4.7 to /

1167906741:  ::: completed emerge (15 of 23) virtual/libiconv-0 to /

1167906751:  ::: completed emerge (16 of 23) sys-devel/automake-wrapper-3-r1 to /

1167906762:  ::: completed emerge (17 of 23) sys-devel/autoconf-wrapper-4-r3 to /

1167906792:  ::: completed emerge (18 of 23) sys-devel/autoconf-2.61 to /

1167906813:  ::: completed emerge (19 of 23) sys-devel/automake-1.10 to /

```

... and at dev-lang/php-5.1.6-r8 it stopped with the threads.m4 aclocal error

----------

## br41n

Nobody knows how to solve this? Please?   :Confused: 

----------

