Messed up my LAMP- how to reinstall?

Hi guys, I am new to opensuse.

Currently I am running openuse 12.3, and I installed the LAMP. It was working actually, but until I decided to add a virtualhost on the machine, then come the disaster.
I really don’t know how to set up the virtualhost in the first place, so I googled some resources and followed their step. But somehow I messed it up and I don’t remember what I had done because It was too many thing I have done in order to make it work, but I failed. Now I can’t even running the server with the php and mysql.

If I navigate to

localhost/phpMyAdmin/index.php

instead of display the page, the browser download the index.php file.

Also, I created a html file (test.html) in the document root (srv/www/htdocs/), when navigate it, it shows all the html tags all along, as it on the text editor. Not the web page where it should be.

It get me so frustrated, so, is anyone here can show how can I resintall the whole package again? Because it seem there is no particular uninstall button that can completely remove the whole package (apache, php5, mysql, phpmyadmin) . When I try to run zypper to install the packages from the respo, it say they are already installed. But I still can’t use it,

Thanks

Did you install by pattern? The pattern name for LAMP in zypper is ‘lamp_server.’ To remove by pattern,

zypper rm -t pattern lamp_server

That would leave the config files added for the vhosts, wouldn’t it?

Yes, the OP will have some cleaning up to do.

AFAICS a removal of some files in /etc/apache2/vhosts.d should be enough. There should be a .conf file in there, which is included from httpd.conf, so removal of that file and a restart of apache should do the trick.

Actually I success to reinstall the apache again. There is no .conf file inside the directory. But, somehow it is still cannot work. That’s why I want to reintall the whole package again, because now I can’t figure out what went wrong.