Updating to recent versions of Apache _and_ PHP on 12.3

Hi,
I’m trying to get current versions of Apache and PHP on our 12.3 environment. I have already upgraded from 12.2 to 12.3 which has helped somewhat, but I am still stuck. I need some of these updates to pass a security audit.

I have added some Repositories from the build service, first adding:

http://download.opensuse.org/repositories/devel:/languages:/php/openSUSE_12.3/devel:languages:php.repo

This allowed me to get up to php 5.6.3

Next, I needed to update apache to something more current than the stock repos, so I added this repo:

http://download.opensuse.org/repositories/Apache/openSUSE_12.3/Apache.repo

This would allow me to get to apache 2.4.10. The problem is that there then is no candidate for apache-mod_php5 and trying to install the updated apache prompts me to uninstall apache-mod_php5.

I think this is because the php repo is built with a dependency on the stock apache packages.

Is there a way to achieve this configuration (php 5.6.3 and apache 2.4.10)? Any hints would be appreciated.

Hm. On my 13.2 system (which does come with Apache 2.4.10 and PHP 5.6.1 btw), apache2-mod_php does not require any particular apache2 version:

# rpm -q --requires apache2-mod_php5
/bin/sh
/bin/sh
apache2
apache2-prefork
...

Anyway:

Is there a way to achieve this configuration (php 5.6.3 and apache 2.4.10)? Any hints would be appreciated.

Yes. Use the server:php repo instead, that is built against the Apache repo as well, and contains the same packages as devel:languages:php.
http://download.opensuse.org/repositories/server:php/Apache_openSUSE_12.3/server:php.repo

Can you post the exactly output from the zypper update command? Although my guess it complains about apache2-mmn version.

I removed the devel:languages:php repo and added the server:php repo as suggested. Then, I was able to get the same versions of apache and php (2.4.10 and 5.6.3) but I get the same error message when trying to install apache2-mod_php5. It is the mmn error as suggested:

Problem: apache2-mod_php5-5.6.3-257.3.x86_64 requires apache_mmn_20051115, but this requirement cannot be provided
uninstallable providers: apache2-2.2.22-4.7.1.x86_64[openSUSE-12.3-1.6]
apache2-2.2.22-10.1.1.i586[repo-oss]
apache2-2.2.22-10.1.1.x86_64[repo-oss]
apache2-2.2.22-10.12.1.i586[repo-update]
apache2-2.2.22-10.4.1.i586[repo-update]
apache2-2.2.22-10.8.1.i586[repo-update]
apache2-2.2.22-10.12.1.x86_64[repo-update]
apache2-2.2.22-10.4.1.x86_64[repo-update]
apache2-2.2.22-10.8.1.x86_64[repo-update]
Solution 1: Following actions will be done:
downgrade of apache2-2.4.10-17.1.x86_64 to apache2-2.2.22-10.12.1.x86_64
install apache2-2.2.22-10.12.1.x86_64 (with vendor change)
obs://build.opensuse.org/Apache → openSUSE
downgrade of apache2-prefork-2.4.10-17.1.x86_64 to apache2-prefork-2.2.22-10.12.1.x86_64
install apache2-prefork-2.2.22-10.12.1.x86_64 (with vendor change)
obs://build.opensuse.org/Apache → openSUSE
Solution 2: do not install apache2-mod_php5-5.6.3-257.3.x86_64
Solution 3: do not install apache2-mod_php5-5.6.3-257.3.x86_64
Solution 4: break apache2-mod_php5-5.6.3-257.3.x86_64 by ignoring some of its dependencies

Will it work if I ignore the dependency? Or should I try to find a repo with apache_mmn in it?

As a test, I installed the package anyway, breaking the dependency. This is what I have installed:



tid-appstg2:/etc/apache2 # zypper info apache2
Loading repository data...
Reading installed packages...




Information for package apache2:
--------------------------------
Repository: Up-to-date Apache packages (openSUSE_12.3)
Name: apache2
Version: 2.4.10-17.1
Arch: x86_64
Vendor: obs://build.opensuse.org/Apache
Installed: Yes
Status: up-to-date
Installed Size: 3.6 MiB
Summary: The Apache Web Server Version 2.4
Description:
This version of httpd is a major release of the 2.4 stable branch,
and represents the best available version of Apache HTTP Server.
New features include Loadable MPMs, major improvements to OCSP support,
mod_lua, Dynamic Reverse Proxy configuration, Improved Authentication/
Authorization, FastCGI Proxy, New Expression Parser, and a Small Object
Caching API.


 See /usr/share/doc/packages/apache2/, http://httpd.apache.org/, and
http://httpd.apache.org/docs-2.4/upgrading.html.
tid-appstg2:/etc/apache2 # zypper info php5
Loading repository data...
Reading installed packages...




Information for package php5:
-----------------------------
Repository: PHP and extensions (openSUSE_12.3)
Name: php5
Version: 5.6.3-257.3
Arch: x86_64
Vendor: obs://build.opensuse.org/server:php
Installed: Yes
Status: up-to-date
Installed Size: 9.9 MiB
Summary: PHP5 Core Files
Description:
This package contains the PHP5 core files, including PHP binary (CLI)
and PHP configuration (php.ini). This package must be installed in
order to use PHP. Additionally, extension modules and server modules
(e.g. for Apache) may be installed.


Additional documentation is available in package php-doc.
tid-appstg2:/etc/apache2 # zypper info apache2-mod_php5
Loading repository data...
Reading installed packages...




Information for package apache2-mod_php5:
-----------------------------------------
Repository: PHP and extensions (openSUSE_12.3)
Name: apache2-mod_php5
Version: 5.6.3-257.3
Arch: x86_64
Vendor: obs://build.opensuse.org/server:php
Installed: Yes
Status: up-to-date
Installed Size: 9.2 MiB
Summary: PHP5 Module for Apache 2.0
Description:
PHP is a server-side, cross-platform HTML embedded scripting language.
If you are completely new to PHP and want to get some idea of how it
works, have a look at the Introductory tutorial. Once you get beyond
that, have a look at the example archive sites and some of the other
resources available in the links section.


Please refer to /usr/share/doc/packages/php5/README.SUSE for
information on how to load the module into the Apache webserver.
tid-appstg2:/etc/apache2 #

apache gives an error when starting:


-- Logs begin at Tue, 2012-10-02 13:13:25 CDT, end at Thu, 2014-11-20 14:37:41 CST. --
Nov 20 14:37:40 tid-appstg2.rc2.brands start_apache2[5142]: httpd2-prefork: Syntax error on line 116 of /etc/apache2/httpd.conf: Syntax error on line 33 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2/mod_php5.so into server: /usr/lib64/apache2/mod_php5.so: undefined symbol: unixd_config
Nov 20 14:37:40 tid-appstg2.rc2.brands systemd[1]: apache2.service: control process exited, code=exited status=1
Nov 20 14:37:40 tid-appstg2.rc2.brands systemd[1]: Unit apache2.service entered failed state
Nov 20 14:37:40 tid-appstg2.rc2.brands systemd[1]: Starting The Apache Webserver...
Nov 20 14:37:40 tid-appstg2.rc2.brands start_apache2[5163]: httpd2-prefork: Syntax error on line 116 of /etc/apache2/httpd.conf: Syntax error on line 33 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2/mod_php5.so into server: /usr/lib64/apache2/mod_php5.so: undefined symbol: unixd_config
Nov 20 14:37:40 tid-appstg2.rc2.brands systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Nov 20 14:37:41 tid-appstg2.rc2.brands start_apache2[5183]: httpd2-prefork: Syntax error on line 116 of /etc/apache2/httpd.conf: Syntax error on line 33 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2/mod_php5.so into server: /usr/lib64/apache2/mod_php5.so: undefined symbol: unixd_config
Nov 20 14:37:41 tid-appstg2.rc2.brands systemd[1]: apache2.service: control process exited, code=exited status=1
Nov 20 14:37:41 tid-appstg2.rc2.brands systemd[1]: Failed to start The Apache Webserver.
Nov 20 14:37:41 tid-appstg2.rc2.brands systemd[1]: Unit apache2.service entered failed state
lines 1-11/11 (END)

Then you added the wrong repo.
The version built against the Apache repo requires apache_mmn_20120211, and it has version 5.6.3-257.2, not 5.6.3-257.3.
https://build.opensuse.org/package/binary/server:php/php5?arch=x86_64&filename=apache2-mod_php5-5.6.3-257.2.x86_64.rpm&repository=Apache_openSUSE_12.3

The repo URL should be:
http://download.opensuse.org/repositories/server:/php/Apache_openSUSE_12.3/

I did post a link to the correct .repo file in my previous post.