0

I have a php project in var/www/html. It runs when I start apache2 service is started. But I cannot access phpmyadmin where I have a database that is being used in my php project. (I had to stop lampp for starting apache2 service.) I get this error while accessing phpmyadmin when apache2 service is on. (Php project runs fine without any error.)

enter image description here

On the other hand, when I need to edit something in database, I use phpmyadmin for which I start lampp(sudo /opt/lampp/lampp start). For doing this I need to stop apache2 service. And during this time, I cannot run php project. It gives this error.

enter image description here

Can I do something like letting them work parallel? Or is there any other way?

2 Answers 2

0

you do not have to run the apache2 service manually. LAMP is all you need as we all know LAMP = Linux, Apache, Mysql and Php

2
  • When I start only LAMP, i get an error on running the project(shown in second pic).
    – vinayawsm
    Jun 20, 2015 at 13:17
  • checkout the home directory in your Apache config file. By default the home dir is /var/www. Put index.html inside /var/www and check
    – Prakash
    Jun 20, 2015 at 13:30
0

You could be running two different instances of Apache. One serving files from var/www/html and the XAMPP/LAMPP instance serving from opt/lampp/htdocs/ (That's the default LAMPP directory)

If you have that directory you could copy your project to it. Then start apache inside of LAMPP and see if it works as expected.

Note: For LLAMP your site might be found here localhost/htdocs

3
  • When I do sudo /opt/lampp/lampp start both apache and mysql will be started. I can access to phpmyadmin at this time. But I am not able to run the project after I do this. To run project, I had to stop lampp and run apache2 service as sudo service apache2 start.
    – vinayawsm
    Jun 20, 2015 at 13:31
  • where does the topic state user is using "xampp"? You do realize xampp is a totally different product and it is nothing compared to lamp?
    – Rinzwind
    Jun 20, 2015 at 14:32
  • XAMPP, the all-in-one LAMP project, used to be called LAMPP. Could you be running two different instances of apache. One serving files from var/www/html and the XAMPP/LAMPP instance serving from opt/lampp/htdocs/ (That's the default lampp directory)
    – PovertyBob
    Jun 23, 2015 at 13:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .