How do I upgrade php on openSuse?
10,023
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
Related videos on Youtube
Author by
Isius
Updated on September 18, 2022Comments
-
Isius over 1 year
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.
-
Isius about 12 yearsOk, did that, compiled and installed correctly. I restarted Apache but phpinfo still reports the old version.
-
botzko about 12 yearsYes 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. -
Isius about 12 yearsNo new module is created though. As in there are no .so files other than the 5.3 version.
-
botzko about 12 yearsYou must use
--with-apxs2=FILE
when you compile the php, like this:./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql ......
-
thinice about 12 yearsapxs2 comes from apache2-prefork-dev (that is on debian, it's from dev headers for your mpm you chose). You can save yourself hassle by doing: ` ./configure --with-apxs2=
which apxs2
--prefix=/usr --with--[etc etc]`