I was upgrading my distro, from kali(wheezy) to sid. But when I was setting up my web server, I reinstalled all over, apache2, php, mysql etc., but I get this error when I access localhost/phpmyadmin
: that URL is not showing an index / login page of phpmyadmin, but showing the code. In my /var/www
the default is index.html, I renamed it to index.php, and it's ok, page is loaded, I do the same with my other directory in /var/www
I added index.php or foo.php and access it, no problem, but when I enter phpmyadmin
it's showing code. I tried installing phpminiadmin
and adminer
, but I get the same error, both are showing the code and not the web page.
Here is my apache2.conf
http://pastebin.com/MLYNQc6S
And here is my spec :
#php -v
PHP 5.5.7-2 (cli) (built: Dec 13 2013 00:25:07)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
# mysql --version
mysql Ver 14.14 Distrib 5.5.33, for debian-linux-gnu (i686) using readline 6.2
# apache2 -v
Server version: Apache/2.4.6 (Debian)
Server built: Aug 12 2013 18:20:23
uname -a
Linux angga.id 3.7-trunk-686-pae #1 SMP Debian 3.7.2-0+kali8 i686 GNU/Linux
and no error found in my /var/log/apache2/*log
I found this Localhost/phpmyadmin/ returns php code but didnt help.
so whats wrong with my server ?
EDIT 1 :
Like @Matt said in first comment. libapache2-mod-php5
is not installed, so I installing it with apt-get
from repo.
apt-get install libapache2-mod-php5
but its return an error, like this.
dpkg: error processing libapache2-mod-php5 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
libapache2-mod-php5
E: Sub-process /usr/bin/dpkg returned an error code (1)
I open synaptic and search for libapache2-mod-php5
there are showing two package with that name libapache2-mod-php5filter
and libapache2-mod-php5
, I check it all, and install it, success, no error found,
i restart apache2 and go to localhost/phpmyadmin
and its work.
thanks for matt.