LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-04-2023, 10:14 PM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
phpMyAdmin doesn't start


After updating from Ubuntu 20.04 to 22.04, I can't get phpMyAdmin to work.

I followed the instructions here at https://tecadmin.net/how-to-install-...-ubuntu-22-04/

When I enter localhost/phpmyadmin in my browser, I see the phpMyAdmin favicon.ico icon, but no login window.

apache2/error.log has this after I attempt to open phpMyAdmin in the browser:

Quote:
[Sun Feb 05 11:45:12.172578 2023] [core:error] [pid 8773] [client ::1:54076] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/codemirror/lib
[Sun Feb 05 11:45:12.174276 2023] [core:error] [pid 8772] [client ::1:54084] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/codemirror/addon/hint
[Sun Feb 05 11:45:12.176255 2023] [core:error] [pid 8821] [client ::1:54086] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/codemirror/addon/lint
[Sun Feb 05 11:45:12.178496 2023] [core:error] [pid 9646] [client ::1:54100] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/jquery/jquery.min.js
[Sun Feb 05 11:45:12.189018 2023] [core:error] [pid 9646] [client ::1:54100] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/bootstrap/bootstrap.bundle.min.js
[Sun Feb 05 11:45:12.190280 2023] [core:error] [pid 8821] [client ::1:54086] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/jquery/jquery-ui.min.js
[Sun Feb 05 11:45:12.191505 2023] [core:error] [pid 8772] [client ::1:54084] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/jquery/jquery.mousewheel.js
[Sun Feb 05 11:45:12.192675 2023] [core:error] [pid 8773] [client ::1:54076] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/jquery/jquery-ui-timepicker-addon.js
[Sun Feb 05 11:45:12.212309 2023] [core:error] [pid 8773] [client ::1:54076] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/codemirror/lib
[Sun Feb 05 11:45:12.213699 2023] [core:error] [pid 8772] [client ::1:54084] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/codemirror/mode/sql/sql.js
[Sun Feb 05 11:45:12.213753 2023] [core:error] [pid 8821] [client ::1:54086] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/codemirror/addon/runmode/runmode.js
[Sun Feb 05 11:45:12.213789 2023] [core:error] [pid 9646] [client ::1:54100] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/codemirror/addon/hint
[Sun Feb 05 11:45:12.216240 2023] [core:error] [pid 8839] [client ::1:54116] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/codemirror/addon/hint
[Sun Feb 05 11:45:12.216278 2023] [core:error] [pid 8774] [client ::1:54120] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/phpmyadmin/js/vendor/codemirror/addon/lint
There is a symlink in /usr/share/phpmyadmin/js/vendor/codemirror/ called lib which points to ../../../../javascript/codemirror/lib which is /usr/share/javascript

The owner of /usr/share/javascript is root.

Should I change the owner of /usr/share/javascript to www-data? Or the group to www-data?

There was no mention of /usr/share/javascript in the tutorial I followed.
 
Old 02-05-2023, 02:16 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
There is a symlink in /usr/share/phpmyadmin/js/vendor/codemirror/ called lib which points to ../../../../javascript/codemirror/lib which is /usr/share/javascript

The owner of /usr/share/javascript is root.

Should I change the owner of /usr/share/javascript to www-data? Or the group to www-data?

There was no mention of /usr/share/javascript in the tutorial I followed.
There is something wrong here. phpMyadmin zipfile extracts in a directory and doesn't use symlinks outside that directory.

In fact, I have a couple of phpMyadmin instances running in 2 different servers and in none of those there is a symlink /usr/share/phpmyadmin/js/vendor/codemirror/lib
That is a real directory containing 2 files (codemirror.css, codemirror.js)
 
Old 02-05-2023, 05:59 AM   #3
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Thanks for your reply.

Previously, I have downloaded phpmyadmin from their webpage, extracted the zip or tar, then put the directory in my /var/www/html

That works, but I thought, "that's not how it's meant to be." or why would Ubuntu have its own instance of phpmyadmin??
 
Old 02-05-2023, 04:42 PM   #4
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
I just checked on the little cloud server: the owner of /usr/share/javascript is root, but I can access MySQL using phpmyadmin on the cloud server.

Also, the set-up is very different. root is the owner of everything in /usr/share/phpmyadmin and /usr/share/javascript

Last edited by Pedroski; 02-05-2023 at 05:24 PM.
 
Old 02-05-2023, 05:31 PM   #5
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
I changed the owner of /usr/share/javascript

Quote:
sudo chown -Rv www-data:www-data /usr/share/javascript

changed ownership of '/usr/share/javascript' from root:root to www-data:www-data
Hope that won't cause any other problems on my laptop.

Now I can access MySQL from my browser using: localhost/phpmyadmin

Last edited by Pedroski; 02-05-2023 at 06:19 PM.
 
Old 02-06-2023, 02:36 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by Pedroski View Post
I changed the owner of /usr/share/javascript
sudo chown -Rv www-data:www-data /usr/share/javascript

changed ownership of '/usr/share/javascript' from root:root to www-data:www-data

Hope that won't cause any other problems on my laptop.

Now I can access MySQL from my browser using: localhost/phpmyadmin
I don't use ubuntu but looks like /usr/share/javascript is a system package, so you shouldn't change its ownership.
Look here for details.
 
Old 02-06-2023, 04:46 PM   #7
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Thanks for the link!

/etc/apache2/conf-available has javascript-common.conf, which is as below:

Quote:
Alias /javascript /usr/share/javascript/

<Directory "/usr/share/javascript/">
Options FollowSymLinks MultiViews
</Directory>
And /etc/apache2/conf-enabled has a symlink to /etc/apache2/conf-available

Also, /usr/share/nodejs contains files need by apache2 for use with phpmyadmin, but that was not a fatal error, phpadmin still started, but I also changed the owner there to www-data.

After I changed the owner from root to www-data, I don't get any errors from apache2 when starting phpmyadmin.

I don't know what other programmes apart from apache2 and phpmyadmin might want to use javascript.

If I get a problem, then I will have to deal with it. I haven't noticed any problem so far.

This is not a server set-up, just my laptop. The set-up on my little cloud server seems very different, but that is Ubuntu 20.04 Server edition.

Anyway, thanks for the advice!
 
Old 02-09-2023, 04:31 PM   #8
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
I asked the same question on stackoverflow. One of the phpadmin package maintainers gave me this link:

Specifically, this option in the php apache.conf file should fix the problem of a symlink to a directory not accessible to www-data, according to package maintainer William Desportes

Quote:
Options SymLinksIfOwnerMatch
I have not tried this yet, because phpmyadmin is working, and our new term is coming up, I need it working!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Pasting sql data into phpmyadmin & copying data from phpmyadmin pizzipie Programming 5 08-22-2021 03:04 PM
PhpMyAdmin completly installed but can not connect to Server (IP/phpmyadmin) DKI Linux - Newbie 4 11-22-2014 08:51 AM
phpMyAdmin error: client denied by server configuration: /usr/share/phpMyAdmin Kropotkin Linux - Server 2 05-15-2010 12:55 PM
phpmyadmin shows blank page; no "phpmyadmin" database in mysql qajaq Linux - Software 2 12-20-2009 12:23 PM
phpMyAdmin doesn't appear after successful intsall JavaNinja Linux - Newbie 2 01-27-2009 07:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration