# [SOLVED] php 5.3.4 is not working after update

## while true

Ola,

since last weeks update (I presume) I have problem with my localhost.

At the end of update I found this:

 *Quote:*   

> * Messages for package dev-lang/php-5.3.4:
> 
>  * Installing php.ini for cli into /etc/php/cli-php5.3
> 
>  * 
> ...

 

so I did:

```
eselect php set cli php5.3

eselect php set cgi php5.3

eselect php set apache2 php5.3
```

I can not run joomla on localhost, and some php functions stoped working, or are not working correctly. 

http://localhost/ gives 'It works!' page, so php is working, but something is wrong...

I would like to switch to one version previously, I believe php 5.2.x, how to do this?

or if there is a fix for this version of php, maybe just some configurations...

I am new to gentoo, and I do not know what else to post,

but I can post anything you guys need to help me out.

Thank you.

ps. hope I'm in right section, sorry admin  :Wink: 

----------

## Mousee

Please follow this documentation as a reference (and for future upgrades):  http://www.gentoo.org/proj/en/php/php-guide.xml

The greatest and most useful thing you'll learn from that documentation, besides using eselect, is the fact that you can "slot" your PHP installs.

So you can have PHP 5.2.16 and PHP 5.3.4 installed at the same time and easily switch between them (and in fact, you can use both at the same time - with a bit of hackery).

Thus, as per your inquiry, simply run the following to add PHP 5.2 to another "slot":  emerge dev-lang/php:5.2

And of course use eselect to switch over to it once it's been installed.

It's likely that Joomla may not be compatible with PHP 5.3 yet - unfortunately I don't use that software so I can't say for certain, but several functions did indeed change in PHP 5.3 that appear to cause breakage in scripts with poor programming practices.

----------

## while true

Hello Mousee,

Sorry for delayed reply, 

although I read and followed your instructions the next day you posted.

I am not a native English speaker, but I think I got most out of your link. 

I switched back to php 5.2 without any problems.

It seems like it is time to start coding a better php code  :Wink: 

thank you (again, kheh) for straight forward and pin-point answer.

----------

