# So, how do i get php4 back?

## thechris

ok, i'm an idiot.  i updated my gentoo server.  bad idea.  now apache2's config structure got eaten by the "lets mess things up" bug...

so i followed the instructions and re-emerged mod_php and apache with apache2 support and set /etc/conf.d/apache to have the -D PHP4.

i have mod_php 4.

ok, so that didn't work.  even after restarting the server over and over.

how do i actually fix this?

----------

## thechris

ok.  found the problem

apache decides to serve php docs as something new and bizzar.  now firefox attempts to download the files instead...

konqueror works fine.

still an apache issue though.  it should have never been made stable with this issue.

----------

## WyriHaximus

I suppose your problem is that after "emerge -uvD world" php5 is installed instead of php4. This worked for me: "emerge -v mod_php && /etc/init.d/apache2 restart". Make sure you use php4 and not php5 for apache, php5 is sending the file to the browser for FF. I had the same problem somehow emerge wants you to upgrade to php5  :Sad: .

Grtz,

WyriHaximus

----------

## llongi

A) PHP5 only gets installed if you're using dev-lang/php, and one of the 5er versions too, if you're using dev-lang/php version 4 it will not get automatically updated to version 5, since they are SLOTed.

B) This probably was anyway a cache problem, when files are sent to the browser etc. and you're sure that mod_php was loaded (check /var/log/apache2/error_log for this), then it normally is the browsers or some proxies cache that messes things up, not Apache. So empty your browsers cache, change browser, make sure there are no caching proxies between you and the server.

Best regards, CHTEKK.

----------

## rawbear

I did add the -D PHP4 in the proper file and restart the apache server.

I then HAD TO get OUT of firefox and back in to clear the cache.

----------

## thechris

after clearing the cache it works.

PHP4 works again, albeit it gets extremely slow at times.  a 1-2 Ghz athlon64 should have no problems with this and yet some pages take 5 minutes to load...  maybe its a mySQL issue, but ever since i updated apache, mythweb has run much slower.

----------

