• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

phpMyAdmin fails after deleting a record from table

Toxalot

Basic Pleskian
Using Plesk 11.5.30 Update #19

Whenever I delete a record from a table using the delete link (on phpMyAdmin Browse tab), I get a "server not found" error saying "Firefox can't find the server at :8443." Well, actually the frame appears blank. I only see the message if I was browsing outside of frames or if I view frame source. If I view the table again, the record is indeed gone. So the problem doesn't appear to be with the delete itself, but with the redirect afterwards.
 
Hello,

Check Error log: /var/log/sw-cp-server/error_log

Nothing written to log when problem occurs. I assume it's doing a Post/Redirect/Get, but it's not including the HTTP_HOST in the redirect. The URL it's trying to get has the protocol, port, path, and query string, but no host.
 
I consider this a bug. Is there a place to report bugs or should it be submitted as a feature request? If I have to vote for both bugs and feature requests, I need more than 20.
 
---------------------------------------------------------------
PRODUCT, VERSION, MICROUPDATE, OPERATING SYSTEM, ARCHITECTURE
Plesk 11.5.30 #35 Centos 6.5 x64

PROBLEM DESCRIPTION
I'm using phpMyAdmin 3.5.8.2. Whenever I browse a table and use the delete link on a record, I get a blank page or error page after confirming.

STEPS TO REPRODUCE
1) First Scenario
- left click a table browse link to browse a table within frames
- click a delete link for a record
- click OK

or

2) Second Scenario
- right click a table browse link and open in new window or tab to break out of frames
- click a delete link for a record
- click OK

ACTUAL RESULT
1) Blank white page in frame
2) Server not found error message

EXPECTED RESULT
In both cases, I expect to see the table again in browse view.

ANY ADDITIONAL INFORMATION
The delete succeeds, but after the delete there is an HTTP redirect to https://:8443/domains/databases/phpMyAdmin/sql.php?blah-blah-etc Notice how the hostname is missing.
---------------------------------------------------------------
 
Hi,

can you just check if there are any hints in "/usr/local/psa/admin/logs/panel.log" that might help?

Regards,
Kristian
 
Hi,

I've narrowed it down to the following file:
/usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php

On line 45
Code:
$base_url .= isset($parsed['host'])    ? $parsed['host'] : (vz::in_vzcp_proxy() ? array_shift($tmp_host) : $_SERVER['SERVER_NAME']);

The Variable $_SERVER['SERVER_NAME'] stays empty.
I'm not sure why yet.

Regards,
Kristian
 
Hi again,

as a workaround if one replaces Line 45 in /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/config.default.php it works.
Here is a patch.

Code:
--- config.default.php.save    2013-08-14 01:39:20.261076171 +0200
+++ config.default.php    2014-03-12 08:58:40.023942467 +0100
@@ -42,7 +42,7 @@
 $base_url .= isset($parsed['user']) ? ($parsed['user'] . (isset($parsed['pass']) ? (':' . $parsed['pass']) : '') . '@') : '';
 if (vz::in_vzcp_proxy())
     $tmp_host = explode(':', $_SERVER['HTTP_X_FORWARDED_HOST']);
-$base_url .= isset($parsed['host'])    ? $parsed['host'] : (vz::in_vzcp_proxy() ? array_shift($tmp_host) : $_SERVER['SERVER_NAME']);
+$base_url .= isset($parsed['host'])    ? $parsed['host'] : (vz::in_vzcp_proxy() ? array_shift($tmp_host) : preg_replace('#:[0-9]+$#', '', $_SERVER['HTTP_HOST']));
 $base_url .= ':';
 $base_url .= isset($parsed['port']) ? $parsed['port'] : (vz::in_vzcp_proxy() ? $_SERVER['HTTP_X_VZCP_PSA_PORT'] : $_SERVER['SERVER_PORT']);
 $cfg['PmaAbsoluteUri'] = $base_url . '/domains/databases/phpMyAdmin';

Regards,
Kristian
 
Hi,

I am no Parallels employee.
I have however reported this as a bug to Parallels Support (#1866121) and hope to see this fixed in either a microupdate or at least in future releases.
Maybe Igor can give some feedback if my Support-Ticket actually reached the right place.

I'll be meeting some guys from Parallels at the WorldHostingDays in a couple of weeks and follow up on this.

Regards,
Kristian
 
Yes, bug was reported as PPPM-1395 and under developer's investigation now. I haven't any ETA when fix will be included to microupdate.
 
Back
Top