PHPMyAdmin Error on launch - 503 Service Unavailable

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
903
Error: When attempting to launch PHPMyAdmin from the CP for the user domain.
Tab shows: 503 Service Unavailable
Page shows: Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Environment:
- FreeBSD 11.2
- PHP FPM 5.3 (default)
- PHP FPM 7.2 2nd (nobody currently using it)
- MySQL 5.6.42
- Sites work fine
- VM was new on 11/11/2018 w/3GB memory 128GB disk, and only using 16%
- There is no Admin/Reseller/User domain.

History:
- I restored the sites to this server from another server using DA's Admin Backup & Restore earlier.
- I restored another to this server about a week ago from another server. Everything still works. I did add an IP address to the server in the address range.
- I would think I would have tested it when I first set it up, but I'm not positive. I do know that all users receive the same error.

Code:
 # ps -ax | grep fpm
 6592  -  Ss       0:19.04 php-fpm53: master process (/usr/local/php53/etc/php-fpm.conf) (php-fpm53)
 6594  -  Ss       0:01.88 php-fpm72: master process (/usr/local/php72/etc/php-fpm.conf) (php-fpm72)
57331  -  S        0:20.93 php-fpm53: pool findlocn (php-fpm53)
57332  -  S        0:22.70 php-fpm53: pool findlocn (php-fpm53)
57333  -  S        0:24.96 php-fpm53: pool findlocn (php-fpm53)
57840  -  S        0:20.11 php-fpm53: pool findlocn (php-fpm53)
58912  -  S        0:09.22 php-fpm53: pool findlocn (php-fpm53)
58917  -  S        0:22.83 php-fpm53: pool findlocw (php-fpm53)
58918  -  S        0:05.21 php-fpm53: pool findlocn (php-fpm53)
58970  -  S        0:19.34 php-fpm53: pool findlocw (php-fpm53)
58971  -  S        0:18.57 php-fpm53: pool findlocw (php-fpm53)
59369  -  S        0:02.05 php-fpm53: pool saveonh (php-fpm53)
59421  -  S        0:11.03 php-fpm53: pool findlocw (php-fpm53)
59422  -  S        0:09.65 php-fpm53: pool findlocw (php-fpm53)
59454  -  S        0:08.42 php-fpm53: pool findlocw (php-fpm53)
59486  -  S        0:00.70 php-fpm53: pool saveonh (php-fpm53)
59837  -  S        0:01.21 php-fpm53: pool findlocw (php-fpm53)
Question:
Before I reinvent the wheel trying the varied ideas from the cures on this site, I thought I'd ask if anyone actually knows what the root cause is before I start doing rituals like updating and recompiling everything and see nothing change, or end up fixing it and never knowing the cause.

Thanks!
 
Last edited:

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
Hello,

What phpMyAdmin version you use? Are you sure its requirements are met on your server: PHP version and MySQL version? PHP 5.3 is rather old and the current phpMyAdmin won't work with it.
 

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
903
What phpMyAdmin version you use? Are you sure its requirements are met on your server: PHP version and MySQL version? PHP 5.3 is rather old and the current phpMyAdmin won't work with it.
1. Php 5.3.29 & 7.2
2. phpMyAdmin-4.4.15
3. MySQL 5.6.42
4. Apache 2.4.37

It appears, even though this combination installed with the DirectAdmin installer, that:
- phpMyAdmin-4.4.15 is compatible with PHP 5.3.7 to 7.0 and MySQL 5.5, and not MySQL 5.6.42 or PHP 7.2
- phpMyAdmin-4.8.4 is compatible with PHP 5.5 to 7.2 and MySQL 5.5 and newer, and not PHP 5.3.29.

There is nothing in the middle that makes any sense so the only real option is to get PHP to 5.5. I hate supporting sites with old code.

Thanks!
 
Last edited:

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
As a possible hack would be to force phpmyadmin to work under PHP 7.x
Check and update /etc/httpd/conf/extra/httpd-hostname.conf for this.
If it works then you will need to protect your customization against being overwritten by directadmin.
 

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
903
As a possible hack would be to force phpmyadmin to work under PHP 7.x
Check and update /etc/httpd/conf/extra/httpd-hostname.conf for this.
If it works then you will need to protect your customization against being overwritten by directadmin.
Interesting! I looked at httpd-hostname.conf. I'll have to learn how I can do that with that file as I don't see any mention as to where I can specify that.
Code:
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
<Directory /var/www/html>
<FilesMatch "\.(inc|php|php3|php4|php44|php5|php52|php53|php54|php55|php56|php70|php71|php72|php6|phtml|phps)$">
AddHandler "proxy:unix:/usr/local/php53/sockets/webapps.sock|fcgi://localhost" .inc .php .php5 .php53 .phtml
</FilesMatch>
<FilesMatch "\.php72$">
AddHandler "proxy:unix:/usr/local/php72/sockets/webapps.sock|fcgi://localhost" .php72
</FilesMatch>
	Options +SymLinksIfOwnerMatch +IncludesNoExec -Indexes
	AllowOverride AuthConfig FileInfo Indexes Limit Options=Includes,IncludesNOEXEC,Indexes,ExecCGI,MultiViews,SymLinksIfOwnerMatch,None

	Require all granted
	<IfModule mod_suphp.c>
		suPHP_Engine On
		suPHP_UserGroup webapps webapps
	</IfModule>
	<IfModule mod_ruid2.c>
		RUidGid webapps webapps
	</IfModule>
	<IfModule mod_lsapi.c>
		lsapi_user_group webapps webapps
	</IfModule>
</Directory>
<Directory /var/www/html/phpMyAdmin/log>
	Require all denied
</Directory>
I might also have to update to phpMyAdmin-4.8.4 first. phpMyAdmin-4.4.15 docs state it works through 7.0, although it might work and it might state that simply because 7.0 was all that was available that time.

Thanks!
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
Something like this


Code:
<FilesMatch "\.(inc|php|php3|php4|php44|php5|php52|php53|php54|php55|php56|php70|php71|[B]php72[/B]|php6|phtml|phps)$">
    AddHandler "proxy:unix:/usr/local/[B]php72[/B]/sockets/webapps.sock|fcgi://localhost" .inc .php .php5 .[B]php72[/B] .phtml
</FilesMatch>
<FilesMatch "\.[B]php53[/B]$">
    AddHandler "proxy:unix:/usr/local/[B]php53[/B]/sockets/webapps.sock|fcgi://localhost" .[B]php53[/B]
</FilesMatch>

As soon as you make sure it's working copy the file to /usr/local/directadmin/custombuild/custom/ap2/conf/extra/
 

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
903
As soon as you make sure it's working copy the file to /usr/local/directadmin/custombuild/custom/ap2/conf/extra/
I'll give it a shot as soon as people are off it today.

I didn't see this last night I did a snapshot, changed options.conf to 5.6 & 7.3, and ran:
Code:
# ./build clean
# ./build update
# ./build all -d
It appeared to be stuck on dovecot for a very, very long time, like it was chasing its tail. Then everything froze, but I found out it was Comcast went off line for maintenance, so I tethered my phone. When I logged back into ESXi and went to the VM console window, it showed the VM was out of disk space (which doesn't make sense) so I reverted the snapshot at 3:00 AM this morning. I don't actually know if the problem was caused by dovecot chasing its tail, or dovecot was chasing its tail because of a disk space problem. I think I will try your method next since this is a live server to see if it will work as it would be preferable to leave the current leave PHP alone, and go with 5.6 and 7.3 on a new, clean server/VM where I don't need to worry about incompatibilities.

Thanks TONS!!!
 
Last edited:
Top