Can't access to phpmyadmin in XAMPP [duplicate] - php

Problem:
I can't access localhost/phpmyadmin/
before I can access localhost/phpmyadmin/ but today when I'm trying to access this page I got weird page
also I can access localhost/xampp/ without any problem
Question:
How can I solve this problem ?

what you need to do is to add phpmyadmin to the apache configuration:
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
then restart apache:
sudo service apache2 restart
On windows, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache

A cleaner way is to create the new configuration file:
/etc/apache2/conf-available/phpmyadmin.conf
and write the following in it:
Include /etc/phpmyadmin/apache.conf
then, soft link the file to the directory /etc/apache2/conf-enabled:
sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled

You should use localhost:portnumber/phpmyadmin
Here the Portnumber is the number which you set for your web server or if you have not set it until now it is by Default - 80.

Make sure that both apache webserver and MySQL server are running. I had the same failure because I forgot to start my webserver.

when you run Xampp, check the apache port no. ex: if it is displaying port 80, then type
http://localhost:80/phpmyadmin/
After that it will display automatically
http://localhost/phpmyadmin/

I am using Linux Mint :
After installing LAMP along with PhpMyAdmin, I linked both the configuration files of Apache and PhpMyAdmin. It did the trick. Following are the commands.
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload

sudo apt-get -y --reinstall install phpmyadmin;
sudo service apache2 restart;
Hope this helps.

It generally occurs when your default port for localhost is being used by another application (like apache tomcat). Easy fix is to stop the application and simply go to localhost/phpmyadmin.
In my case it worked after stopping apache tomcat.

Sometimes it's case sensitive. Have you tried going to http://localhost/phpMyAdmin?

Based on your output, one of your plugins is messing up with the phpmyadmin. Try disabling all plugins to see if that works.
If it does, enable them one by one and check again, to find the problematic one.

Resolving same problem on Ubuntu 14.04, I use code:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
it is because since Ubuntu 13, Apache loads configuration files from the /etc/apache2/conf-enabled directory.
Ubuntu Documentation

You need reload the server.
If you use apache server
systemctl reload apache2
If you use nginx server
systemctl reload nginx

Judging by the output of the image which you linked in one of your comments:
http://imageshack.us/photo/my-images/638/erroruh.png/
... maybe you accidentally downloaded some form of the website from where you thought you were downloading phpMyAdmin. The text contains references to "Dropbox" which makes me think that the information displaying is in no way related to phpmyadmin.
Try re-installing and see if that helps...
http://www.phpmyadmin.net

Or it could be that Skype is running on the same port (it does by default).
Disable Skype or configure Skype to use another port

I also faced the same issue.
i worked on it and found out ,this is simply because i have mistakenly moved my "phpmyadmin" folder in to a some folder inside Xampp. Go through all the other folders which are inside the main "XAMPP" folder.
Then if you find the "phpmyadmin" inside another folder other than "xampp" move it back to the main "XAmpp" folder and refresh the page.
:)

A cleaner way to include the phpmyadmin config into apache2 is to create a new config file by:
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
and write in it:
Include /etc/phpmyadmin/apache.conf

Run the Apache server, note down the port number(eg:8081)
Open your browser and type localhost:8081(or apache's port number)

Just change -
$cfg['Servers'][$i]['host'] = 'localhost';
in config.inc.ph. i.e. from existing to localhost if you installed it locally

Restarting the xampp services helped me

Make sure you still have phpMyAdmin maybe you deleted it in your htdocs folder?
Get the latest version: http://www.phpmyadmin.net/home_page/downloads.php
Unzip then place the phpMyAdmin (rename the folder if it has version numbers) in your htdocs folder.
Make sure Skype is disabled as it will some times run on the same port as your XAMPP install... I'm not sure why but apache installed via xampp on some windows 7 machines ive seen apache not run if skype is on after 10years of IT work.
So make sure apache is running, mysql is running and hit:
localhost/phpMyAdmin
You should get some kind of install prompt. Step through this you will learn lots along the way. But basically its one config file that needs some settings.

I had the same problem. Couldn't access http://localhost/joomla neither.
and I did not quite understand the other answers.
The simple solution for me:
stop all actions in xampp (I had apache and mysql running. apache on port 80 and 7000something)
quit firefox
restart the actions (apache and mysql)
restart firefox.
open http://localhost/phpmyadmin (or http://localhost/joomla - whatever it be)
voila!
Now apache runs on port 80 and 443 and mysql on 3306.

What you need to do is to add phpmyadmin to the apache configuration:⠀⠀⠀⠀⠀⠀⠀
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
Then restart apache:
sudo service apache2 restart
On ubuntu 18.0.1, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
http://127.0.0.1/phpmyadmin/

Related

Apache2 server can't find files in same folder

Absolute beginner here, correct me if I've done mistakes.
I'm trying to create a login system on an apache2 server (OS: Ubuntu server 20.04 LTE) and I can access all pages from another computer(OS Win10 home) in the same WiFi-net but they won't connect to each other even though they're in the same folder. Chrome says
Not Found
The requested URL was not found on this server.
Apache/2.4.41 (Ubuntu) Server at 192.168.0.184 Port 80
Meaning I can't switch between pages using links nor use a php-file to handle the form-input. http://ip-adress shows all the avaliable files in /var/www/html but they can't connect to each other.
Opera says above too
You need to enable mod_rewrite, To enable run the Following command:
sudo a2enmod rewrite
Then restart apache2 by the Following command :
sudo service apache2 restart

Not found comes out when laravel project moves to production server

When project is in local. This view can be seen from putting url "localhost/contact ". But
When the project is in production server , "Not Found
The requested URL /contact was not found on this server." Is displayed.
How can I solve this problem. Thanks
Route::get('/contact', 'ContactController#index')->name('contact.index');
This could be due to many issues. I would suggest you to check whether your .htaccess is defined correctly and you have enabled mod_rewrite in your server. The method for this differs based on your server whether its Apache or Nginx. Follow the method suggested in the official documentation as in the image below.
If you are using Apache server, don't forget to run the following commands to enable mod_rewrite and restart apache.
sudo a2enmod rewrite
sudo systemctl restart apache2
You can run a laravel project in two ways.
php artisan serve (Development server)
using apache server (localhost/project_folder/public/)
if you are using 2nd method(apache) try this.
sudo a2enmod rewrite
sudo service apache2 restart

Apache2, Wordpress index.php not executed, just text file

I have a problem with apache2, wordpress and php.
I configured virtual hosts and copied the existing wordpress (installed in single host).
The web server is working fine and loads the index.php, but doesn't execute it.
Check mod-enabled folder in your apache. You must have two files their php5.load and php5.conf. If not present, its means php support is not their.To enable php support use command a2enmod php5
It is because your apache2 can't execute php.
In my case, I install libapache2-mod-php by:
aptitude install libapache2-mod-php7.0
Then restart apache by:
/etc/init.d/apache2 restart
May it help you.

How do I access phpMyAdmin?

I installed phpMyAdmin on my computer. I used Apache as my http server. However, every time I go to http://localhost/phpMyAdmin/, this screen appears:
How do I make it so that this login screen appears instead:
You may be better off to install an integrated suite, such as:
XAMPP - Linux/Windows/Apple
* store web pages in htdocs
WAMP - Windows
MAMP - Apple
Then, just going to the address localhost will give you a menu, with all components (apache, phpmyadmin, tomcat, etc etc)
They are all free, so why not?
Add this
DirectoryIndex index.php
to /etc/phpmyadmin/apache.conf (or wherever your apache.conf or httpd.conf or whatever is).
If you happen to be running on Windows, look for the Apache webserver directory.
XAMPP Users: If you have installed it as a service, changes to configuration files seem to take effect only when you restart the service through the Services panel and not via the XAMPP control panel.
Use http://localhost/phpMyAdmin/index.php
or
Check your host config, check the DirectoryIndex param.
I found that when I entered root in the username and left the password blank I got in
You need to edit your apache2 config file to include PHPmyadmin.
Do this:
gedit /etc/apache2/apache2.conf
OR nano /etc/apache2/apache2.conf
Add this to the end of your config file:
Include /etc/phpmyadmin/apache.conf
Save then restart Apache:
/etc/init.d/apache2 restart

I can't access http://localhost/phpmyadmin/

Problem:
I can't access localhost/phpmyadmin/
before I can access localhost/phpmyadmin/ but today when I'm trying to access this page I got weird page
also I can access localhost/xampp/ without any problem
Question:
How can I solve this problem ?
what you need to do is to add phpmyadmin to the apache configuration:
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
then restart apache:
sudo service apache2 restart
On windows, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
A cleaner way is to create the new configuration file:
/etc/apache2/conf-available/phpmyadmin.conf
and write the following in it:
Include /etc/phpmyadmin/apache.conf
then, soft link the file to the directory /etc/apache2/conf-enabled:
sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled
You should use localhost:portnumber/phpmyadmin
Here the Portnumber is the number which you set for your web server or if you have not set it until now it is by Default - 80.
Make sure that both apache webserver and MySQL server are running. I had the same failure because I forgot to start my webserver.
when you run Xampp, check the apache port no. ex: if it is displaying port 80, then type
http://localhost:80/phpmyadmin/
After that it will display automatically
http://localhost/phpmyadmin/
I am using Linux Mint :
After installing LAMP along with PhpMyAdmin, I linked both the configuration files of Apache and PhpMyAdmin. It did the trick. Following are the commands.
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
sudo apt-get -y --reinstall install phpmyadmin;
sudo service apache2 restart;
Hope this helps.
It generally occurs when your default port for localhost is being used by another application (like apache tomcat). Easy fix is to stop the application and simply go to localhost/phpmyadmin.
In my case it worked after stopping apache tomcat.
Sometimes it's case sensitive. Have you tried going to http://localhost/phpMyAdmin?
Based on your output, one of your plugins is messing up with the phpmyadmin. Try disabling all plugins to see if that works.
If it does, enable them one by one and check again, to find the problematic one.
Resolving same problem on Ubuntu 14.04, I use code:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
it is because since Ubuntu 13, Apache loads configuration files from the /etc/apache2/conf-enabled directory.
Ubuntu Documentation
You need reload the server.
If you use apache server
systemctl reload apache2
If you use nginx server
systemctl reload nginx
Judging by the output of the image which you linked in one of your comments:
http://imageshack.us/photo/my-images/638/erroruh.png/
... maybe you accidentally downloaded some form of the website from where you thought you were downloading phpMyAdmin. The text contains references to "Dropbox" which makes me think that the information displaying is in no way related to phpmyadmin.
Try re-installing and see if that helps...
http://www.phpmyadmin.net
Or it could be that Skype is running on the same port (it does by default).
Disable Skype or configure Skype to use another port
I also faced the same issue.
i worked on it and found out ,this is simply because i have mistakenly moved my "phpmyadmin" folder in to a some folder inside Xampp. Go through all the other folders which are inside the main "XAMPP" folder.
Then if you find the "phpmyadmin" inside another folder other than "xampp" move it back to the main "XAmpp" folder and refresh the page.
:)
A cleaner way to include the phpmyadmin config into apache2 is to create a new config file by:
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
and write in it:
Include /etc/phpmyadmin/apache.conf
Run the Apache server, note down the port number(eg:8081)
Open your browser and type localhost:8081(or apache's port number)
Just change -
$cfg['Servers'][$i]['host'] = 'localhost';
in config.inc.ph. i.e. from existing to localhost if you installed it locally
Restarting the xampp services helped me
Make sure you still have phpMyAdmin maybe you deleted it in your htdocs folder?
Get the latest version: http://www.phpmyadmin.net/home_page/downloads.php
Unzip then place the phpMyAdmin (rename the folder if it has version numbers) in your htdocs folder.
Make sure Skype is disabled as it will some times run on the same port as your XAMPP install... I'm not sure why but apache installed via xampp on some windows 7 machines ive seen apache not run if skype is on after 10years of IT work.
So make sure apache is running, mysql is running and hit:
localhost/phpMyAdmin
You should get some kind of install prompt. Step through this you will learn lots along the way. But basically its one config file that needs some settings.
I had the same problem. Couldn't access http://localhost/joomla neither.
and I did not quite understand the other answers.
The simple solution for me:
stop all actions in xampp (I had apache and mysql running. apache on port 80 and 7000something)
quit firefox
restart the actions (apache and mysql)
restart firefox.
open http://localhost/phpmyadmin (or http://localhost/joomla - whatever it be)
voila!
Now apache runs on port 80 and 443 and mysql on 3306.
What you need to do is to add phpmyadmin to the apache configuration:⠀⠀⠀⠀⠀⠀⠀
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
Then restart apache:
sudo service apache2 restart
On ubuntu 18.0.1, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
http://127.0.0.1/phpmyadmin/

Categories