# [SOLVED] apache 2.0.53 & mod_php 5.0.3-x

## zambizzi

I've unmasked and emerged the latest mod_php for which apache 2.0.53 was a dependency.

They both emerged just fine but apparently the mime-type for php wasn't configured properly and is not recognized by apache...and when attempting to view a test php page, I'm prompted to download the file.

I'm unfamiliar w/ php and apache mime types, for that matter...what's the quickest way to fix this?

Thanks!

-vLast edited by zambizzi on Sat Apr 09, 2005 3:03 pm; edited 1 time in total

----------

## tukachinchila

You'll want to make sure your "/etc/conf.d/apache2" file has this line:

```
APACHE2_OPTS="-D PHP4"
```

Then do:

```
/etc/init.d/apache2 restart
```

If that doesn't work, can you post the output of your "/etc/apache2/conf/modules.d/70_mod_php.conf"?

----------

## JudgeNik

It is PHP5

```
APACHE2_OPTS="-D PHP5"
```

 *Quote:*   

> I've unmasked and emerged the latest mod_php for which apache 2.0.53 was a dependency. 

 

How did you unmask it?

For me "ACCEPT_KEYWORDS="~x86" emerge -v mod_php" only brings up mod_php-4.3.10 and if I try and force emerge to use any of the mod_php-5* packages it tells me they shouldn't be used...

----------

## zambizzi

I'm sorry, I was in a hurry last night and didn't get time to state the obvious.

I've already got the -D PHP5 flag in /etc/conf.d/apache2, and I have no log for the apache module..it's just not there.

As far as unmasking...I added it to package.keywords and package.unmask...voila.

EDIT:

Now it would also seem that my apache will not server *any* type of file.  It just sits there and perpetually tries to load the index.html file in the webroot (the only file in this particular directory)...nothing's happening.

Before emerging mod_mono (1.0.6) last night, apache 2.0.53 was working great for me...guess I'll yank Mono out of there.

EDIT:

Removed -D MONO and apache loads em' up just fine again...phew.

----------

## [EMOBA]

Any idea on when these packages will be moved to stable?  Is there a resource that provides the status of ebuilds?

----------

## zambizzi

 *[EMOBA] wrote:*   

> Any idea on when these packages will be moved to stable?  Is there a resource that provides the status of ebuilds?

 

http://packages.gentoo.org/

----------

## zambizzi

Apache is now completely unresponsive after rebooting the entire system. I'm probably going to just have to revert to an earlier version and see if I can get SOME 5.x version of mod_php to emerge w/o needing the latest apache...since it seems to be problematic.

Here's my question...are ebuilds being released as stable and then pulled back in as masked?

A few weeks ago I emerged apache 2.0.52-r1, and mod_php 5.0.3 on my laptop...everything works great.  This time, on my new server, I emerged a later 2.0.52-x version of apache and it appeared that *every* 5.x version of mod_php was hard masked and unavailable. 

Is that possible?  Are the devs un-(hard) masking things and then re-masking them?  I would think that to be rather sloppy, if so, since people who need support the versions of the ebuilds they use on their systems may have problems like I'm having.

Just curious...

Thanks!

----------

## or4n

zambizzi: What browser do you use?

I don't know why this happens but I had the same problem when I updated Apache (to 2.0.53) and php (to 5.0.3-rx), then someone told me to clear cache of the browser (Firefox) and after that it worked... I had this issue with Windows and Linux version of Firefox.

----------

## zambizzi

 *or4n wrote:*   

> zambizzi: What browser do you use?
> 
> I don't know why this happens but I had the same problem when I updated Apache (to 2.0.53) and php (to 5.0.3-rx), then someone told me to clear cache of the browser (Firefox) and after that it worked... I had this issue with Windows and Linux version of Firefox.

 

I find that very hard to believe, but regardless of where I am or what browser I'm using, the sites just hang and fail to load.  Apache 2.0.53 has some serious issues I think, and I'm now going to unmerge it and go back to a more reliable release until they've worked out the kinks.

Thanks!

EDIT:

After re-emerging apache 2.0.53, my problems went away...it may have had something to do w/ mod_mono so I started another thread.

----------

## _savage

Until now, my apache was running only -D SSL -D PHP5 and that's it.  Sometime last week I came across the same issue: mod_php was gone  :Sad: 

```
root@tigger ~ # emerge -p mod_php

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[blocks B     ] >=net-www/apache-2.0.52-r3 (is blocking dev-php/mod_php-4.3.10)

[ebuild  N    ] dev-php/mod_php-4.3.10 
```

and according to http://packages.gentoo.org/search/?sstring=mod_php all php5 modules are hard masked!  I am sure they weren't last week.  Also, I do feel uncomfy to unmask them manually, so I guess I just have to wait until they're unmasked again?

Does anybody have another solution?

Thanks heaps,

Jens

----------

## zambizzi

 *_savage wrote:*   

> Until now, my apache was running only -D SSL -D PHP5 and that's it.  Sometime last week I came across the same issue: mod_php was gone 
> 
> ```
> root@tigger ~ # emerge -p mod_php
> 
> ...

 

I unmasked and emerged them, ran through some stress-testing w/ disk/processor/memory intensive scripts and they did quite well.  Production ready?  Perhaps not but I don't care...close enough for me.

-v

----------

## _savage

 *zambizzi wrote:*   

> I unmasked and emerged them, ran through some stress-testing w/ disk/processor/memory intensive scripts and they did quite well.  Production ready?  Perhaps not but I don't care...close enough for me.

 

Ok, I did a 

```
root@tigger ~ # echo "~dev-php/mod_php-5.0.3" > /etc/portage/package.unmask
```

 and could merge the latest PHP5 module.  Then added APACHE2_OPTS="-D SSL -D PHP5" to my /etc/conf.d/apache2  and restarted apache.

It seems to work.  Almost...  if I browse my site locally (i.e. hop to http://tigger/index.php ) it works fine.  However, browsing to http://tigger.light-speed.de/index.php still tries to download the php file?  Is that the mime type problem you've been mentioning before??

Jens[/url]

----------

## Immortal Q

As far as I can tell, the PHP5 hard-mask is due to a threads issue and a lack of proper MPM detection either between the ebuilds or the packages themselves.  I've got everything working fine with a non-threaded mod_php and the worker MPM, but I think any other case will break things something fierce, hence the mask.  I can't find enough information on this, which annoys me - I don't see any bug reports working on this issue, and it seems that PHP5 has sort of been cast aside for the time being.

Anyone know if there's some sort of ongoing work on this issue?  Some sort of timeline on an official or canonical fix/hack?

----------

