2

I'm currently running openSuse 12.1 with php 5.3.8 and would like to upgrade to 5.4. How may I do this? I'm used to just installing software packages with yast.

2 Answers 2

1

If there is no package you can compile your own php

1. Download php, extract it and cd into the directory 2. ./configure - add options you need and do not forget --with-apxs2. It will compile the module for apache. (You can check the currunt options used to compile php in phpinfo()). You can see the help and options with ./configure --help 3. make - this will compile the php 4. make install - this will install the php 
6
  • 1
    Ok, did that, compiled and installed correctly. I restarted Apache but phpinfo still reports the old version. Commented Mar 9, 2012 at 19:08
  • Looks like 5.3 is in /usr/bin and 5.4 installed into /usr/local Commented Mar 9, 2012 at 19:23
  • Yes default location is /usr/local. You must load the new php module in apache. Search for something like this LoadModule php5_module lib64/httpd/modules/libphp5.so in apache configuration. You must change the path to the new module or just replace the old module by copy new one in the same dir. Commented Mar 9, 2012 at 21:01
  • No new module is created though. As in there are no .so files other than the 5.3 version. Commented Mar 9, 2012 at 23:42
  • You must use --with-apxs2=FILE when you compile the php, like this: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql ...... Commented Mar 10, 2012 at 6:33
0

I use OpenSUSE 12.2 and it works well with packages for SLE from this custom repository. After you add the repository, you can just switch the version of php packages in yast software manager to 5.4.9....

You might also need libpcre0 dependency which is no longer in opensuse 12.2 repo, but you can get it from here.

You can download it using wget a install it using rpm -i.

This solution is clean and can be done in five minutes and it works perfect..

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.