Noah
Noah

Reputation: 4751

Can't open phpmyadmin, require_once(./libraries/common.inc.php): failed to open stream: No such file or directory

When I do php /usr/share/phpmyadmin/index.php, I get this.

PHP Warning: require_once(./libraries/common.inc.php): failed to open stream: No such file or directory in /usr/share/phpmyadmin/index.php on line 33 PHP Fatal error: require_once(): Failed opening required './libraries/common.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/phpmyadmin/index.php on line 33

The common.inc.php file seems to be there.

I didn't make any changes and hadn't used phpmyadmin in a while.


Update: Here is a search:

# find / -name "common.inc.php" -print
/usr/share/phpmyadmin/setup/lib/common.inc.php
/usr/share/phpmyadmin/libraries/common.inc.php

index.php is at /usr/share/phpmyadmin/index.php, so this looks right to me.

Upvotes: 3

Views: 18194

Answers (4)

rüff0
rüff0

Reputation: 943

cd /usr/share/php mv php-gettext php-gettext.orig && ln -s php-php-gettext php-gettext

works for me. on Debian 4.3.3

Upvotes: 1

BenLue
BenLue

Reputation: 1

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839923

Hi, this is what I did to "fix" the problem locally.

cd /usr/share/php mv php-gettext php-gettext.orig ln -s php-php-gettext php-gettext

symbolic linking within the original php-gettext/gettext.inc doesn't work and generates the error, but linking directory to directory does work. Of course, it will break things once the problem is fixed formally, so before updating you may want to reverse those changes.

Additionally this was also in my /var/log/apache2/error.log:

Upvotes: -1

Noah
Noah

Reputation: 4751

I had some other errors with mysql that I thought were unrelated. This is the message I got repeatedly every second for about a minute whenever I started or stopped mysqld:

2014-11-23 12:27:42 871 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11 2014-11-23 12:27:42 871 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

I followed this post to fix them (copied below): https://stackoverflow.com/a/24840903/2183008

# cd /var/lib/mysql
# mkdir bak
# mv ibdata1 bak/
# mv ib_logfile* bak/
# cp -a bak/ibdata1 ibdata1
# cp -a bak/ib_logfile* .
# rm -rf bak
# service mysqld restart

That fixed the errors when launching and now phpmyadmin loads fine now.

Upvotes: 0

TipuZaynSultan
TipuZaynSultan

Reputation: 783

Try to find the directory ./libraries/ in the PhpMyAdmin base directory. And see if the file common.inc.php is there or not. It is mandatory that the file should be there not anywhere else. You already said that it's there. But please check if that's in the right directory.

If nothing fixes the issue then try RE-INSTALLING PhpMyAdmin... I will suggest you take a BACKUP of your DATABASES first.

Upvotes: 0

Related Questions