php error: download info.php instead of see it

I am installing phpvirtualbox on OpenSUSE 42.1 trying to installing it I came from this error:

http://i65.tinypic.com/219dhzp.png

So I try to check my php configuration creating this page info.php:


<?php
phpinfo();
?>

But I’m getting the info.php page to download.

I installed php5 of course!

sudo zypper in php5

then I try to check if it’s loaded


> sudo apache2ctl -M
AH00557: httpd-prefork: apr_sockaddr_info_get() failed for linux-rza6
AH00558: httpd-prefork: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
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_core_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)

But I’m not see any php5 module loaded.

I’m not sure what to edit on php.ini to fix this… ¿Any one?

Hi
Use a2enmod command to list and enable;


a2enmod: enable/disable an apache module in APACHE_MODULES in /etc/sysconfig/apache2

usage: a2enmod -d] module
       a2enmod -l                    list modules
       a2enmod -q module             query if module is installed

I guess that you have a Apache2 server running on a system where that PHP script is and that you try to browse it from another or the same machine (you do explain much).

IIRC you have to configure apache that it should use PHP. Did you do that?

I looked in my 13.1 apache config. I found

boven:/etc/apache2/sysconfig.d # grep php  *
loadmodule.conf:LoadModule php5_module                    /usr/lib64/apache2/mod_php5.so
boven:/etc/apache2/sysconfig.d #

Looks that malcolm has a better solution.

yes i have php + apache on same server…

Reaally lost here what should I do?

I thought that I have to install the mod and php5 + apache will handle it…

(sorry my english)


/etc/apache2/sysconfig.d> grep php *
/etc/apache2/sysconfig.d>

Hi
Is apache2-mod_php5 installed?

yes it is:

~> zypper search php5 | grep mod
i | apache2-mod_php5                     | Módulo PHP5 para Apache 2.0.                                                  | package   

Hi
So does it show up in;


a2enmod -l

If so, then query it with the q option.

nope it does not show up:


@linux-rza6:~> sudo a2enmod -l
root's password:
actions alias auth_basic authn_file authz_host authz_groupfile authz_core authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl socache_shmcb userdir reqtimeout authn_core

Ok found a workaround in the google+ group:

Eik M.
Yesterday 6:46 PM

what i do is… installing yast http-server. then start it over yast and follow the setup and activate php scripting language over yast. after this start apache2 on boot over yast service manager. last thing open firewall ports 80 and 443 over yast. ready… or reboot and then ready… this requires php5 and apache php5_mod are installed already…

So I installed yast http-server open the port that phpvirtualbox needed restart apache and that it.

this just make it work… moving on.

thanks!
regards
maniat1k