SOLVED apache upgrade to 2.4 has knocked out my .php extension pages

Hi

I have 2 webservers in my local openSUSE (tumbleweed but this isn’t a Tumbleweed issue).

I can see one website (with .html extensions) so Apache is running OK. I can’t see the php website. I can see the files if I turn on +Indexes in .htaccess so the virtual host config is still working OK. It was visible yesterday before the upgrade from apache 2.2 to 2.4.

Where do in look to turn php back on?

Thanks
John

There s another thread here with a different problem after the update. In that thread jetchisel pointed to this info:

http://localhost/manual/upgrading.html

Thanks hcvv.

However I’d already seen that. The essence of this problem is that the upgrade moved aside some files in /etc/apache2 and replaced them. Somewhere in those files there is a “line” with a parameter that turn on the ability to see files with the extension .php as web pages and proceed to read them and serve them to web browsers. I can’t find where that happens and what it says. I’ve googled my fingers red and must be putting the wrong search in google. It will be a simple thiong, this turning on of php, but I can’t find it.

On the other hand, because I don’t know much about this, it might be something completely different that’s the problem.

Here’s a clue:

When I set up this in a file called phpinfo.php:

<?php
    phpinfo();
?>

And I enter this in the browser:

http://urllink/php.info

.it simply downloads the file. Same with index.php.

??

Hi
You need the ‘loadmodule’ for php in your conf file, it can be enabled with the a2enmod command.

Thanks Malcolm. I ran then with php and then with php5 as arguments. I checked with this afterwards:

Tumbleweed132:/home/john # a2enmod php
"php" already present
Tumbleweed132:/home/john # a2enmod php5
"php5" already present

Then I ran apache2ctl:

Tumbleweed132:/home/john # apache2ctl -M                                                                                                                   
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/default-server.conf:7
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 mpm_prefork_module (static)
 unixd_module (static)
 systemd_module (static)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_host_module (shared)
 authz_groupfile_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 dir_module (shared)
 env_module (shared)
 expires_module (shared)
 include_module (shared)
 log_config_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 socache_shmcb_module (shared)
 userdir_module (shared)
 reqtimeout_module (shared)
 authn_core_module (shared)
 authz_core_module (shared)

The response I get in both chrome and internet explorer is this:

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.

Error 403

If I address the file index.php it still downloads

?? any thoughts?

OK it works. I did this: rebooted! And then it worked and I checked the modules again and got this:

Tumbleweed132:/home/john # apache2ctl -M
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/default-server.conf:7
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
---------------------------SNIP-----------
authz_core_module (shared)
** php5_module (shared)**

Thanks Malcolm