Getting "No input file specified" when accessing Phpmyadmin

Whether im using server Ip or Server username to connect to Phpmyadmin,
all I get is “No input file specified” output.

Even when I use https://host.domain.tld:port-number/phpmyadmin/ its still says No input file specified.

I have done this and no changes;
chown -R root:www-data /etc/phpmyadmin/
chown -R hestiamail:www-data /usr/share/phpmyadmin/tmp/

You should not use neither the ip nor the hostname + Hestia port, only the hostname/phpmyadmin or whatever-domain-you-host/phpmyadmin

Said that, check the logs to know what the root cause is.

Note: Replace HereTheDomain by the domain you are using to access phpmyadmin.

If you are using Nginx check this log:

/var/log/nginx/domains/HereTheDomain.error.log

If you are using Nginx+Apache2 check this log:

/var/log/apache2/domains/HereTheDomain.error.log

Then you are using Nginx+Apache2, check the other dir.

I realized those two DIR have so many ERROR log files some dating back in years. I have deleted them so as to generate fresh errors logs. After which, – even after Apache2 restart, there is no single error log file inside the /var/log/apache2/domains/ nor /var/log/nginx/domains/


Still getting this error.

And no error log for that domain?

Show the web conf for that domain (replace YourUser and YourDomain by the actual data).

cat /home/YourUser/conf/web/YourDomain/nginx.conf
cat /home/YourUser/conf/web/YourDomain/apache2.conf
cat /etc/apache2/conf.d/phpmyadmin.inc
 sudo cat /etc/apache2/conf.d/phpmyadmin.inc

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php
    <IfModule mpm_event_module>
        # Use www.conf instead
        <FilesMatch \.php$>
            SetHandler "proxy:fcgi://127.0.0.1:9000"
        </FilesMatch>
    </IfModule>
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/sql>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/vendor>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/templates>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/locale>
    Order Deny,Allow
    Deny from All
</Directory>
ubuntu@cpanel:~$ sudo cat /home/myusername/conf/web/mydomainname_.com/nginx.conf
#=========================================================================#
# Default Web Domain Template                                             #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS   #
# https://hestiacp.com/docs/server-administration/web-templates.html      #
#=========================================================================#

server {
        listen      XXXXXXXX:80;
        server_name mydomainname_.com www.mydomainname_.com;
        error_log   /var/log/apache2/domains/mydomainname_.com.error.log error;

        include /home/myusername/conf/web/mydomainname_.com/nginx.forcessl.conf*;

        location ~ /\.(?!well-known\/|file) {
                deny all;
                return 404;
        }

        location / {
                proxy_pass http://XXXXXXXX:8080;

                location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|odt|ods|odp|odf|tar|wav|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
                        try_files  $uri @fallback;

                        root       /home/myusername/web/mydomainname_.com/public_html;
                        access_log /var/log/apache2/domains/mydomainname_.com.log combined;
                        access_log /var/log/apache2/domains/mydomainname_.com.bytes bytes;

                        expires    max;
                }
        }

        location @fallback {
                proxy_pass http://XXXXXXXX:8080;
        }

        location /error/ {
                alias /home/myusername/web/mydomainname_.com/document_errors/;
        }

        include /home/myusername/conf/web/mydomainname_.com/nginx.conf_*;
}
ubuntu@cpanel:~$ sudo cat /home/myusername/conf/web/mydomainname_.com/apache2.conf
#=========================================================================#
# Default Web Domain Template                                             #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS   #
# https://hestiacp.com/docs/server-administration/web-templates.html      #
#=========================================================================#

<VirtualHost XXXXXXXX:8080>

    ServerName mydomainname_.com
    ServerAlias www.mydomainname_.com
    ServerAdmin info@mydomainname_.com
    DocumentRoot /home/myusername/web/mydomainname_.com/public_html
    ScriptAlias /cgi-bin/ /home/myusername/web/mydomainname_.com/cgi-bin/
    Alias /vstats/ /home/myusername/web/mydomainname_.com/stats/
    Alias /error/ /home/myusername/web/mydomainname_.com/document_errors/
    #SuexecUserGroup myusername myusername
    CustomLog /var/log/apache2/domains/mydomainname_.com.bytes bytes
    CustomLog /var/log/apache2/domains/mydomainname_.com.log combined
    ErrorLog /var/log/apache2/domains/mydomainname_.com.error.log

    IncludeOptional /home/myusername/conf/web/mydomainname_.com/apache2.forcessl.conf*

    <Directory /home/myusername/web/mydomainname_.com/stats>
        AllowOverride All
    </Directory>
    <Directory /home/myusername/web/mydomainname_.com/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
    </Directory>

    <FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php/php7.4-fpm-mydomainname_.com.sock|fcgi://localhost"
    </FilesMatch>
    SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

    IncludeOptional /home/myusername/conf/web/mydomainname_.com/apache2.conf_*
    IncludeOptional /etc/apache2/conf.d/*.inc
</VirtualHost>

Show the output of these commands:

dpkg -l | grep phpmyadmin
apache2ctl -M | grep mpm

@sahsanu Im getting somewhere,
The error logs are back.
Here is the error from /var/log/nginx/domains/mydomain.com.error.log ::
open_basedir restriction in effect. File(/usr/share/phpmyadmin/index.php) is not within the allowed path(s):

dpkg -l | grep phpmyadmin
ii  php-phpmyadmin-motranslator            5.2.0-1build1                                all          translation API for PHP using Gettext MO files
ii  php-phpmyadmin-shapefile               2.1-5                                        all          translation API for PHP using Gettext MO files
ii  php-phpmyadmin-sql-parser              5.4.1-2                                      all          validating SQL lexer and parser
ii  phpmyadmin                             4:5.1.1+dfsg1-5ubuntu1                       all          MySQL web administration tool
:~# apache2ctl -M | grep mpm
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using cpanel.mmydomain.com. Set the 'ServerName' directive globally to suppress this message
 mpm_event_module (shared)

What happened here? What’s the reason you have installed phpmyadmin as system package?

Execute this script as root to remove the current phpmyadmin and install it using Hestia’s way.

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh

Before I do that, here is the full Error Message.
Mark that earlier, I had tried to set up a custom shared folder via open_basedir which is now working fine- Thanks to you.

[Mon Oct 21 10:31:45.684376 2024] [proxy_fcgi:error] [pid 876663:tid 876689] [client XXXXX:0] AH01071: Got error ‘PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/usr/share/phpmyadmin/index.php) is not within the allowed path(s): (/home/MYUSERNAME/CUSTOM_FOLDER:/tmp) in Unknown on line 0PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0Unable to open primary script: /usr/share/phpmyadmin/index.php (Operation not permitted)’, referer: MyDomainName.com is for sale | www.brandforce.com
“mydomainname.com.error.log”

At the end it reads referer:
//mydomainname dot com/phpmyadmin/mymainname.com dot error dot log

Its getting rewtitten otherwise when I post

To move on you must fix the phpmyadmin installation

Done.

PMA Hestia-SSO plugin has been successfully removed/disabled
[ * ] Backing up old configuration files…
[ * ] Marking phpmyadmin as held in apt…
phpmyadmin set on hold.
[ * ] Removing old folders…
[ * ] Creating new folders…
rm: cannot remove ‘/etc/apache2/conf.d/phpmyadmin.conf’: No such file or directory
[ * ] Installing phpMyAdmin version v5.2.1…
[ * ] Creating localhost configuration…
[ * ] Dropping database (could throw an error if successful)…
PMA Hestia-SSO plugin has been successfully installed

Getting same error - Do I need to Restart Apache?

Execute this:

curl -fsSL https://7j.gg/fixperms | sudo bash -s --

And restart the server.

Done,
Same error.
And im getting same error message from the log:
proxy_fcgi:error] [pid 876663:tid 876689] [client XXXXX:0] AH01071: Got error ‘PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/usr/share/phpmyadmin/index.php) is not within the allowed path(s): (/home/MYUSERNAME/CUSTOM_FOLDER:/tmp) in Unknown on line 0PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0Unable to open primary script: /usr/share/phpmyadmin/index.php (Operation not permitted)

Hello @sahsanu Please recall this : The directory (/home/XYZ/commn_folder_x) is not setup properly when using open_basedir Since its pointing to open_basedir

May be we need to add /usr/share/phpmyadmin at open_basedir ?