PhpMyAdmin Fatal error: Class 'PMA_Error'

mileZ

Verified User
Joined
Feb 9, 2012
Messages
25
Hi Guys,

when I go on phpMyAdmin I got this error

Code:
Fatal error: Class 'PMA_Error' not found in /var/www/html/phpMyAdmin-3.5.0-all-languages/libraries/Error_Handler.class.php on line 103

And I'm not able to stop mySQL on DA. When I do that I have this error:

Code:
Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

what can I do to fix it?

Thank you in advance.

mileZ
 
Hi Sellerone,


thnx for the quick replay!

I tried with:

# mysql restart

and I got this error

Code:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
 
The mysql command is a client; thats why it gives the root password thing. You need to restart the server: mysqld. Perhaps without the path you can restart it, otherwise /etc/init.d/mysqld restart might work.
 
Hi Arieh,

the restarting on ssh seems to be ok. But my fatal error on PhpMyAdmin remains.
 
Did you try reinstall phpMyAdmin?

Code:
cd /usr/local/directadmin/custombuild
./build clean
./build update
./build phpmyadmin

Regards
 
Hi Sellerone,

when I run the command

Code:
./build phpmyadmin

I have this message

Code:
chmod: cannot access `/var/www/html/phpMyAdmin-3.5.0-all-languages/scripts': No such file or directory

thank you.
 
Try remove the existent one.

mv /var/www/html/phpMyAdmin-3.5.0-all-languages/ /var/www/html/phpmyadmin_OLD

then re run ./build phpmyadmin

Regards
 
You need to find a way to reduce ram usage or ask your vps provider to give you more ram.
 
I have only 2 Drupal low traffic websites on this VPS. How can I find out what is using so much ram?
 
Apart from the cause of this error in this case, there may be a chance that there is something wrong with the error reporting class. I'm also seeing 'PMA_Error' not found once in a while.

This is line 103:

PHP:
        $error = new PMA_Error($errno, htmlspecialchars($errstr), $errfile, $errline);

If you put

PHP:
print_r($errstr);

just one line above that you will see the actual error.

In my case this was:

include() [function.include]: Unable to find the wrapper "compress.bzip2" - did you forget to enable it when you configured PHP?

The odd thing is it only rarely shows up. And I don't know whats wrong with the php for displaying the error, the file containing the class is included in the same file the fatal error is showing so its there.

As for showing whats going on with your memory:

Code:
while read command percent rss; do if [[ "${command}" != "COMMAND" ]]; then rss="$(bc <<< "scale=2;${rss}/1024")"; fi; printf "%-26s%-8s%s\n" "${command}" "${percent}" "${rss}"; done < <(ps -A --sort -rss -o comm,pmem,rss | head -n 11)

This will show a top 10 list of processes and how much memory in % they take, and how much ram in MB (the RSS)
 
As for showing whats going on with your memory:

Code:
while read command percent rss; do if [[ "${command}" != "COMMAND" ]]; then rss="$(bc <<< "scale=2;${rss}/1024")"; fi; printf "%-26s%-8s%s\n" "${command}" "${percent}" "${rss}"; done < <(ps -A --sort -rss -o comm,pmem,rss | head -n 11)

This will show a top 10 list of processes and how much memory in % they take, and how much ram in MB (the RSS)
Great piece of Code, Arieh. I've just put it onto my local desktop system; much cleaner than running top when all I need is the list.

For example, my current output:
Code:
COMMAND                   %MEM    RSS
Xorg                      7.9     314.62
kontact                   7.5     298.47
kmix                      5.0     198.60
firefox-bin               3.4     137.82
chromium                  2.4     96.53
plasma-desktop            2.1     84.91
vlc                       1.9     75.31
krunner                   1.7     70.89
kwin                      1.7     67.84
kalarm                    1.6     63.91
Do you have any other nice little snippets we could benefit from? :)

Jeff
 
Don't think that I do, but if you use top, I could recommend htop if you don't have it already. Its more extended in many ways, like colors, cpu core display, how much memory is in use and allocated, sorting, easy configuration on what to show.
 
Back
Top