# mod_php installation problem, ebuild mod_php-4.2.2.ebuild co

## spike

After emerge mod_php it tells me to:

ebuild /var/db/../..../mod_php-4.2.2.ebuild config

when I did this i got an error message telling me to 

ebuild foo.ebuild digest  :Sad: 

when I did this: ebuild foo.ebuild digest

!!! doebuild: foo.ebuild not found.  :Sad: 

After some fuzzeling out of frustration  :Mad:   I thought it was something like:ebuild mod_php-4.2.2.ebuild digest

I again did run:ebuild /var/db/../..../mod_php-4.2.2.ebuild config

>>> md5  :Wink:  php-4.2.2.tar.bz2  :Shocked: 

but after restarting apache still it only returns the php code!

Help!   :Rolling Eyes: 

----------

## ptheborg

This bug bothered me for days!

Solution back then was simply emerge portage-2.0.13.

But since a couple of days I've been using portage-2.0.27 and in this version it's fixed.

Version 2.0.23 and 2.0.25 were broken......

----------

## ice_cool

I have a similar problem:

```

bash-2.05a# ebuild /var/db/pkg/dev-php/php-4.2.1-r3/php-4.2.1-r3.ebuild config

/usr/sbin/ebuild.sh: pkg_config: command not found

```

(it does the same for php-4.2.2)

----------

## craftyc

 *ptheborg wrote:*   

> 
> 
> But since a couple of days I've been using portage-2.0.27 and in this version it's fixed.

 

I use this version of portage yet still get the same error as ice-cool.

----------

## mksoft

See this post for a possible solution to pkg_config issue.

----------

## Dobs

spike, back to your original problem, i had the same problem ...

after doing the ebuild digest and ebuild config, you still have to tell apache to load the php module.

in /etc/conf.d/apache make suer the line about APACHE_OPTS="-D SSL -D PHP4" is uncommented 

you may also have to edit the /etc/apache/conf/apache.conf file

make sure to add 

LoadModule php4_module          extramodules/libphp4.so

it was my understanding that emerge was supposed to fix the /etc/apache/conf/apache.conf  file and you were to edit the /etc/conf.d/apache file at least this is what i thought emerge told me when i merged the php_mod ... i could be wrong.  Could this be a bug in the php ebuild ?? or am i just being dumb and missing something ?

----------

## ptheborg

Dobs and spike, like I said, I had that digest problem too.

It went away when I installed portage-2.0.13 and now I've got portage-2.0.27 and 2.0.28 and they work flawlessly...........

crafty_c, that pkg_config problem is something different from the digest problem.....or am I wrong????   :Confused: 

----------

## Dobs

yeah that pkg_config problem is something different, you can figure it out if you go to that post mksoft mentioned earlier.  

i fergot to mentiont i actually added 3 lines to my /etc/apache/conf/apache.conf file

LoadModule php4_module extramodules/libphp4.so 

AddModule mod_php4.c

AddType application/x-httpd-php .php

not sure if you need all of those, but my php seems to be working fine after adding those 3 lines

----------

## ptheborg

it's relatively simple to figure out what the ebuild config would add to apache.conf

just open the ebuild in your favorite text editor and scroll down to the pkg_config section. Then you can copy paste those bash commands into a terminal and voila, everything will be configured for you. This way you do it manually automatic   :Wink: 

(This was the workaround I used untill I discovered the newer portage versions didn't have this problem)

----------

## rac

Outside initial install, to Networking & Security.

----------

