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
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 - 1Ok, did that, compiled and installed correctly. I restarted Apache but phpinfo still reports the old version.Isius– Isius2012-03-09 19:08:24 +00:00Commented Mar 9, 2012 at 19:08
- Looks like 5.3 is in /usr/bin and 5.4 installed into /usr/localIsius– Isius2012-03-09 19:23:54 +00:00Commented 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.soin 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.botzko– botzko2012-03-09 21:01:22 +00:00Commented 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.Isius– Isius2012-03-09 23:42:20 +00:00Commented Mar 9, 2012 at 23:42
- You must use
--with-apxs2=FILEwhen you compile the php, like this:./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql ......botzko– botzko2012-03-10 06:33:22 +00:00Commented Mar 10, 2012 at 6:33
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..