CyberPanel Community

Closed500 error on phpmyadmin link

bo
bozden #1

After two years I started to build a new server (VDS with root, 6 CPU, 16 RAM), using AlmaLinux 8.7 with CP v2.3.2. I have DNS & SSH & SSL & Firewall working and have some empty domains created. I had not touched the OLS yet.

I’m stuck at phpmyadmin link in the Databases - > PHPMyAdmin → click button menu. It opens a new tab waits a lot and eventually returns a 500 page.

Re-install and Update scripts, cache cleaning did not help.

The request is like (/usr/local/lscp/cyberpanel/logs/access log):

24.133.236.96 - - [20/Jan/2023:19:22:58 +0100] "GET /phpmyadmin/phpmyadminsignin.php?username=admin&token=A-TOKEN-HERE HTTP/1.1" 500 1240 "https://MY-DOMAIN.TLC:MYPORT/dataBases/phpMyAdmin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"

(I changed the port)

Here are some errors in the logs:

/usr/local/lscp/cyberpanel/logs/errorlog

2023-01-21 07:58:01.058437 [INFO] [24.133.236.96:42217] Content len: 0, Request line: 
GET /phpmyadmin/phpmyadminsignin.php?username=admin&token=XA4nskaGDcplrc HTTP/1.1

2023-01-21 07:58:01.058445 [INFO] [24.133.236.96:42217] HttpExtConnector state: 8, request body sent: 0, response body size: -2, response body sent:61, left in buffer: 0, attempts: 1.

2023-01-21 08:05:58.081839 [NOTICE] [24.133.236.96:42610] No request delivery notification has been received from LSAPI application, possible dead lock.

2023-01-21 08:53:07.008030 [NOTICE] [24.133.236.96:43867] ExtConn timed out while processing.
2023-01-21 08:53:08.611725 [INFO] [24.133.236.96:43867] Connection idle time too long: 301 while in state: 6 watching for event: 0, close!

CP main log file

[01.20.2023_18-44-13] Expecting value: line 1 column 1 (char 0)

[01.20.2023_23-00-03] [Errno 2] No such file or directory: '/home/cyberpanel/git'. [IncScheduler.git:90]

[01.21.2023_01-00-01] [Errno 2] No such file or directory: 'postmap': 'postmap'. [ProcessUtilities.normalExecutioner.Base]
16 replies
jo
josephgodwinke #2

Happy New Year @bozden

Reinstall phpmyadmin

$ mv /usr/local/CyberCP/public/phpmyadmin /usr/local/CyberCP/public/phpmyadmin_old
$ wget -v https://github.com/josephgodwinkimani/cyberpanel-mods/raw/main/phpmyadmin.zip
$ unzip phpmyadmin.zip

Now visit https://SERVER_URL:8090/phpmyadmin

bo
bozden #3

Happy new year to you too :slight_smile:

Do I need to move it to the original place and/or handle some chmod?

Django complains about if it is under root I think:

Using the URLconf defined in CyberCP.urls, Django tried these URL patterns, in this order:
^base/
^ ^$ [name='adminLogin']
^ ^verifyLogin$ [name='verifyLogin']
^ ^logout$ [name='logout']
^packages/
^websites/
^tuning/
^ftp/
^serverstatus/
^dns/
^users/
^dataBases/
^email/
^serverlogs/
^firewall/
^backup/
^managephp/
^manageSSL/
^api/
^filemanager/
^emailPremium/
^manageservices/
^configservercsf/
^plugins/
^emailMarketing/
^cloudAPI/
^docker/
^container/
^CloudLinux/
^IncrementalBackups/
^Terminal/

The current path, phpmyadmin/, didn't match any of these.

Can it be because I changed the port?

jo
josephgodwinke #4

I do not understand this question. Where do you want to move phpmyadmin to?

bo
bozden #5

I meant to: /usr/local/CyberCP/public/phpmyadmin

jo
josephgodwinke #6

Any folders here /usr/local/CyberCP/public/ will be served using the url https://server_url:8090/mycoolwebapphere this can be adminer etc no virtualhost is required

bo
bozden #7

It gave 500 error when I moved it under /usr/local/CyberCP/public.

I tried update (removed loaded one and replaced with the one you proposed), restart the server etc.

It can be related to other stuff. Let me play with OLS setup a bit, the following error may be the cause:

No request delivery notification has been received from LSAPI application, possible dead lock.
bo
bozden #9

Do you now this: What are the PHP version allowed by the whole OLS + CP config?

I have chosen PHP 8.1 on CP, now I find this very interesting:

No lsphp file under PHP 8.1 in OLS…

jo
josephgodwinke #10

You can use any php version available php 7.2 to php 8.1. This should be available on latest version of cyberpanel. Do an upgrade of your cYberpanel

bo
bozden #11

What I don’t understand is, lsphp resides only under lsphp73.

bo
bozden #12

I installed the extensions manually for php 7.4 and 8.1. Curious, shouldn’t CP install them whenever I select a specific version if they do not exist?

The original problem continues thou…

jo
josephgodwinke #13

I believe the issue is here. I have almalinux installed in several servers and the only version i can confidently say works perfectly is 8.3 to 8.4 only. Those servers have never presented any issues this far concerning php 7.4 - 8.1 (probably ioncube for 8.0 which no known version exists). They run on stable branch

bo
bozden #14

I initially read about AlmaLinux 8.6 support, but the provider had only 8.7 image to load.

I narrowed it down thou. Now I get a blank page, not a 500 error.
I switched the main domain to use PHP 7.4 to be sure (longer support time for bugs).

I get to phpmyadmin directory and run php index.php there and got:

PHP Warning:  PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /usr/local/lsws/lsphp74/lib64/php/modules/memcached.so (/usr/local/lsws/lsphp74/lib64/php/modules/memcached.so: undefined symbol: php_json_decode_ex), /usr/local/lsws/lsphp74/lib64/php/modules/memcached.so.so (/usr/local/lsws/lsphp74/lib64/php/modules/memcached.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/local/lsws/lsphp74/lib64/php/modules/redis.so (/usr/local/lsws/lsphp74/lib64/php/modules/redis.so: undefined symbol: php_json_decode_ex), /usr/local/lsws/lsphp74/lib64/php/modules/redis.so.so (/usr/local/lsws/lsphp74/lib64/php/modules/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

And I need to load also lsphp74-json (in PHP 8.x it is in code).

Now I can run php index.php without errors, but I still had a blank page.

After that, I enabled errors in PHP and finally got a screen!

With the following error at the bottom:

The $cfg['TempDir'] (/usr/local/CyberCP/public/phpmyadmin/tmp) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.
jo
josephgodwinke #15

You need to install said php modules [TUTORIAL] How to install any PHP modules using PEAR Package Manager

php 7.4 has always been a safe bet for running an error free cyberpanel

You need to change permissions for /usr/local/CyberCP/public/phpmyadmin such as

$ chmod -R 777 /usr/local/CyberCP/public/phpmyadmin/tmp
bo
bozden #16

Exactly what I did…

Now it works seamlessly by clicking the menu item.

Thank you for your help Joseph!

Sign in to reply