Have trouble installing phpmyadmin on PHP7 Apache/2.4.7 (Ubuntu)
Install it via wget and create an alias in Apache. Keep track:
Change to directory /usr/share:
cd /usr/share
Change to root user:
sudo su
Download phpMyAdmin:
wget https://files.phpmyadmin.net/phpMyAdmin/4.5.4.1/phpMyAdmin-4.5.4.1-all-languages.zip
Unzip it: (you may install unzip first)
unzip phpMyAdmin-4.5.4.1-all-languages.zip
Rename the folder:
mv phpMyAdmin-4.5.4.1-all-languages phpmyadmin
Change permissions:
chmod -R 0755 phpmyadmin
Configure apache so that it can find it correctly:
vim /etc/apache2/sites-available/000-default.conf
Anywhere after "DocumentRoot /var/www/html" insert these line:
Alias /phpmyadmin "/usr/share/phpmyadmin/"
<Directory "/usr/share/phpmyadmin/">
Order allow,deny
Allow from all
Require all granted
</Directory>
Restart Apache:
service apache2 restart
And you are ready to go!
Just took a screenshot from my current installation for you to validate it works.
PHP Fatal Error with PHP 7 and phpMyAdmin
I had a same problem, and I solved it :
apt install php7.0-mbstring
service apache2 restart
Problem installing phpmyadmin on Ubuntu 14 in Goorm IDE Environment
I guess that some php related extension packages are not found due to the end of support for Ubuntu 14.04 at last April.
So you need higher version of Ubuntu to install phpmyadmin.
GoormIDE is currently supporting Ubuntu 16.04 with "Blank" stack.
Try to create a container with Blank stack with Ubuntu 16.04 then setup the environment.
To install phpmyadmin with PHP 7.3.6:
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install -y mysql-server
service mysql start
apt-get install -y phpmyadmin
To run it:
service apache2 start
To see the application running:
- Enter http(s)://[project_url]/phpmyadmin
- You can check project_url at IDE top menu [Project] - [Running URL and Port]. There will be a URL already registered by default.
- If you don't see any URL registered, register a URL with port 80.
Error 500 after installing of phpmyadmin on ubuntu 16.04
This solved my problem:
sudo apt-get install php-gettext
PHPMyAdmin 500 Internal Server Error in Apache due to PHP Version
Important:
Please change the version number to get more security if you have phpMyAdmin exposed to the public or need features from newer phpMyAdmin versions.
This was taken from a chat. Some things might be inaccurate, but this solved the OP's problem
Install PHPMyAdmin using the following tutorial:
1.
apt purge phpmyadmin -y
cd /path/to/somefolder
wget https://files.phpmyadmin.net/phpMyAdmin/5.1.0-rc1/phpMyAdmin-5.1.0-rc1-all-languages.zip && unzip phpMyAdmin-5.1.0-rc1-all-languages.zip &&
cd phpMyAdmin-5.1.0-rc1-all-languages
apt install pwgen -y
- Make note of the output of this command, I will refer to it as pw
pwgen -s 32 1
cp config.sample.inc.php config.inc.php
- Edit config.inc.php with favorite editor, and paste the pw in this line:
. . .
$cfg['blowfish_secret'] = 'STRINGOFTHIRTYTWORANDOMCHARACTERS'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
. . .
vim /etc/apache2/conf-available/phpmyadmin-custom.conf
- Paste the following to that previous command:
Alias /phpmyadmin /path/to/that/phpMyAdmin-5.1.0-rc1-all-languages
<Directory "/path/to/that/phpMyAdmin-5.1.0-rc1-all-languages">
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
Require all granted
</Directory>
- Save the previous one using
:wq
, Run the following command
a2enconf phpmyadmin-custom && systemctl restart apache2 && mysql
- Replace
your_password_here
to your own password.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password_here';
systemctl restart mysql
It should work now.
Additional notes:
To only allow you to view phpMyAdmin, try:
<Directory "/path/to/that/phpMyAdmin-5.1.0-rc1-all-languages">
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
Require local
# Or change it to
# Require ip 127.0.0.1
# change 127.0.0.1 to your personal computers ip address,
# not to the server ip
# if you want to access phpMyAdmin from a public server, but not allow others to access it
</Directory>
I am getting this error from apache
Bro check out this link. I just added the sudo apt-get install php-gettext, and phpmyadmin works now. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819521
Related Topics
Decoding Numeric HTML Entities via PHP
How to Keep the Chinese or Other Foreign Language as They Are Instead of Converting Them into Codes
How to Upload an Image as Attachment with Slack API
Sort Array by Length and Then Alphabetically
How to Change Default Redirect Url of Laravel 5 Auth Filter
Check If a Remote Page Exists Using PHP
Is This a PHP Date() Bug, or Is There Something Wrong with My Code
Why Are $_Server["Php_Auth_User"] and $_Server["Php_Auth_Pw"] Not Set
How to Set an Absolute Include Path in PHP
PHP Merge Array(S) and Delete Double Values
PHP If Single or Double Equals
Fatal Error - Too Many Open Files
PHP Adds Keys to Decoded and Then Encoded JSON Data
Warning: Cannot Modify Header Information - Headers Already Sent
What Is the Concept of Service Container in Laravel
How to Convert Date/Time from 24-Hour Format to 12-Hour Am/Pm
Minimum Cart Amount for Specific Product Categories in Woocommerce