Apache does not recognize *.php files...

Hi!
yesterday everything was working fine. I installed Zend Server CE. Then I uninstalled Zend Server CE and installed PHP5 + Apache using Yast and now *.php files my Firefox want to download not display.

Apache:
apache2
apache2-mod_php5
apache2-prefork
apache2-utils
libapr-util1
libapr1
libapr1-devel

Php:
php5
apache2-mod_php5
php5-mysql
php5-pdo

OpenSuSe 10.2

Did you enable the loading of the php5 module in /etc/sysconfig/apache2, variable APACHE_MODULES?

PS: I hope you don’t intend to expose this webserver to users, because 10.2 is out of support and PHP has had many security fixes since then.

grep “.php” /etc/apache2/conf.d/php5.conf
(don’t know on 10.2)

APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir "

This OpenSuSe 10.2 as OS on my laptop not as a server and what you mean out of support? 10.2 is the latest stable OpenSuSe?
Sorry I`m new on linux.

—> grep “.php” /etc/apache2/conf.d/php5.conf

<IfModule mod_php5.c>
AddHandler application/x-httpd-php .php4
AddHandler application/x-httpd-php .php5
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .php4s
AddHandler application/x-httpd-php-source .php5s
AddHandler application/x-httpd-php-source .phps
DirectoryIndex index.php4
DirectoryIndex index.php5
DirectoryIndex index.php

11.2 is the latest release.

But why I`s out of support?

openSUSE releases have a lifetime. The lifetime of 10.2 has ended. It’s simply not possible for the developpers to maintain every version released.
If this is a production critical server, I suggest you switch to SUSE Linux Enterprise Server, it has a much longer lifetime.

Thnx for information.
But i still have problem with apache+php!! :frowning:
How I can fix it?

You need php5 in there. But really, for your own safety, please don’t use this 10.2 as a production server.

But really, for your own safety, please don’t use this 10.2 as a production server.

ok! :slight_smile: I`ll know this now! :wink:

–> my php problem:

  1. /etc/sysconfig/apache2
    To “APACHE_MODULES=” added “mod_php5”

  2. /etc/apache2/sysconfig.d/loadmodule.conf
    Added LoadModule php5_module /usr/lib/apache2/mod_php5.so

  3. /etc/init.d/apache2 restart

And now it works! :slight_smile:

But interesting why it did not happened automatically when I selected using Yast!

You didn’t need step 2. Step 1 causes step 2 to happen. And php5 is sufficient, it will prepend mod_ if needed.

What’s installed and what’s loaded are separately controlled in openSUSE’s Apache.

Happened to me after updating MySQL to Version 5.5.8
Now running OpenSUSE 11.4 Factory
Removing Apache, PHP, MySQL cleanly and then re-installing using Zypper did not automatic put the settings in the files as described.

Thank you very much for sharing this Solution :wink: