PHPmyadmin - i see php code…

Discussion in 'Installation/Configuration' started by SebastianK, Feb 9, 2022.

  1. SebastianK

    SebastianK New Member

    Hi,
    I change url to phpmyadmin… next i bank to default url. Now i see php code.
    Look in url https://eoglaszamy.pl/phpmyadmin/

    how to repair this?

    system : Ubuntu, autoinstall isp config
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    What web server are you using? In Apache you need to install php-fpm and enable that config then restart Apache. If other wherever, I don't know if the top if my head.
     
  3. SebastianK

    SebastianK New Member

    I use Apache.

    I have all fpm-config

    php info -> https://eoglaszamy.pl/phpinfo.php

    Code:
    [email protected]:/var/www/eoglaszamy.pl/web# aptitude search fpm
    p   libfpm-helper0                                                                              - ASP.NET backend for FastCGI Process Manager - helper lib                                           
    p   mono-fpm-server                                                                             - ASP.NET backend for FastCGI Process Manager                                                       
    i   php-fpm                                                                                     - server-side, HTML-embedded scripting language (FPM-CGI binary) (default)                           
    i   php5.6-fpm                                                                                  - server-side, HTML-embedded scripting language (FPM-CGI binary)                                     
    i   php7.0-fpm                                                                                  - server-side, HTML-embedded scripting language (FPM-CGI binary)                                     
    i   php7.1-fpm                                                                                  - server-side, HTML-embedded scripting language (FPM-CGI binary)                                     
    i   php7.2-fpm                                                                                  - server-side, HTML-embedded scripting language (FPM-CGI binary)                                     
    i   php7.3-fpm                                                                                  - server-side, HTML-embedded scripting language (FPM-CGI binary)                                     
    i   php7.4-fpm                                                                                  - Język skryptowy po stronie serwera osadzany w HTML (plik binarny FPM-CGI)                         
    i   php8.0-fpm                                                                                  - server-side, HTML-embedded scripting language (FPM-CGI binary)                                     
    i A php8.1-fpm                                                                                  - server-side, HTML-embedded scripting language (FPM-CGI binary)           
    on settings in ispconfig:
    [​IMG]

    [​IMG]

    Code:
    Następujące pakiety zostaną PONOWNIE zainstalowane:
      php-fpm php5.6-fpm php7.0-fpm php7.1-fpm php7.2-fpm php7.3-fpm php7.4-fpm php8.1-fpm
    0 pakietów aktualizowanych, 0 instalowanych, 8 ponownie instalowanych, 0 do usunięcia i 32 nieaktualizowanych.
    Do pobrania 10,0 MB archiwów. Zajęte po rozpakowaniu: 0 B.
    Pobieranie: 1 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php-fpm all 2:8.1+92+ubuntu20.04.1+deb.sury.org+2 [7 352 B]
    Pobieranie: 2 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php5.6-fpm amd64 5.6.40-57+ubuntu20.04.1+deb.sury.org+1 [1 316 kB]
    Pobieranie: 3 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php7.0-fpm amd64 7.0.33-57+ubuntu20.04.1+deb.sury.org+1 [1 333 kB]
    Pobieranie: 4 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php7.1-fpm amd64 7.1.33-44+ubuntu20.04.1+deb.sury.org+1 [1 376 kB]
    Pobieranie: 5 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php7.2-fpm amd64 7.2.34-28+ubuntu20.04.1+deb.sury.org+1 [1 446 kB]
    Pobieranie: 6 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php7.3-fpm amd64 7.3.33-1+ubuntu20.04.1+deb.sury.org+1 [1 424 kB]
    Pobieranie: 7 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php7.4-fpm amd64 7.4.27-1+ubuntu20.04.1+deb.sury.org+1 [1 443 kB]
    Pobieranie: 8 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 php8.1-fpm amd64 8.1.2-1+ubuntu20.04.1+deb.sury.org+1 [1 669 kB]                                                             
    Pobrano 10,0 MB w 8s (1 322 kB/s)                                                                                                                                                                     
    (Odczytywanie bazy danych ... 202662 pliki i katalogi obecnie zainstalowane.)
    Przygotowywanie do rozpakowania pakietu .../0-php-fpm_2%3a8.1+92+ubuntu20.04.1+deb.sury.org+2_all.deb ...
    Rozpakowywanie pakietu php-fpm (2:8.1+92+ubuntu20.04.1+deb.sury.org+2) nad (2:8.1+92+ubuntu20.04.1+deb.sury.org+2) ...
    Przygotowywanie do rozpakowania pakietu .../1-php5.6-fpm_5.6.40-57+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
    Rozpakowywanie pakietu php5.6-fpm (5.6.40-57+ubuntu20.04.1+deb.sury.org+1) nad (5.6.40-57+ubuntu20.04.1+deb.sury.org+1) ...
    Przygotowywanie do rozpakowania pakietu .../2-php7.0-fpm_7.0.33-57+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
    Rozpakowywanie pakietu php7.0-fpm (7.0.33-57+ubuntu20.04.1+deb.sury.org+1) nad (7.0.33-57+ubuntu20.04.1+deb.sury.org+1) ...
    Przygotowywanie do rozpakowania pakietu .../3-php7.1-fpm_7.1.33-44+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
    Rozpakowywanie pakietu php7.1-fpm (7.1.33-44+ubuntu20.04.1+deb.sury.org+1) nad (7.1.33-44+ubuntu20.04.1+deb.sury.org+1) ...
    Przygotowywanie do rozpakowania pakietu .../4-php7.2-fpm_7.2.34-28+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
    Rozpakowywanie pakietu php7.2-fpm (7.2.34-28+ubuntu20.04.1+deb.sury.org+1) nad (7.2.34-28+ubuntu20.04.1+deb.sury.org+1) ...
    Przygotowywanie do rozpakowania pakietu .../5-php7.3-fpm_7.3.33-1+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
    Rozpakowywanie pakietu php7.3-fpm (7.3.33-1+ubuntu20.04.1+deb.sury.org+1) nad (7.3.33-1+ubuntu20.04.1+deb.sury.org+1) ...
    Przygotowywanie do rozpakowania pakietu .../6-php7.4-fpm_7.4.27-1+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
    Rozpakowywanie pakietu php7.4-fpm (7.4.27-1+ubuntu20.04.1+deb.sury.org+1) nad (7.4.27-1+ubuntu20.04.1+deb.sury.org+1) ...
    Przygotowywanie do rozpakowania pakietu .../7-php8.1-fpm_8.1.2-1+ubuntu20.04.1+deb.sury.org+1_amd64.deb ...
    Rozpakowywanie pakietu php8.1-fpm (8.1.2-1+ubuntu20.04.1+deb.sury.org+1) nad (8.1.2-1+ubuntu20.04.1+deb.sury.org+1) ...
    Konfigurowanie pakietu php7.3-fpm (7.3.33-1+ubuntu20.04.1+deb.sury.org+1) ...
    NOTICE: Not enabling PHP 7.3 FPM by default.
    NOTICE: To enable PHP 7.3 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.3-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Konfigurowanie pakietu php7.4-fpm (7.4.27-1+ubuntu20.04.1+deb.sury.org+1) ...
    NOTICE: Not enabling PHP 7.4 FPM by default.
    NOTICE: To enable PHP 7.4 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.4-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Konfigurowanie pakietu php5.6-fpm (5.6.40-57+ubuntu20.04.1+deb.sury.org+1) ...
    NOTICE: Not enabling PHP 5.6 FPM by default.
    NOTICE: To enable PHP 5.6 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php5.6-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Konfigurowanie pakietu php7.2-fpm (7.2.34-28+ubuntu20.04.1+deb.sury.org+1) ...
    NOTICE: Not enabling PHP 7.2 FPM by default.
    NOTICE: To enable PHP 7.2 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.2-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Konfigurowanie pakietu php8.1-fpm (8.1.2-1+ubuntu20.04.1+deb.sury.org+1) ...
    NOTICE: Not enabling PHP 8.1 FPM by default.
    NOTICE: To enable PHP 8.1 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php8.1-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Konfigurowanie pakietu php-fpm (2:8.1+92+ubuntu20.04.1+deb.sury.org+2) ...
    Konfigurowanie pakietu php7.1-fpm (7.1.33-44+ubuntu20.04.1+deb.sury.org+1) ...
    NOTICE: Not enabling PHP 7.1 FPM by default.
    NOTICE: To enable PHP 7.1 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.1-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Konfigurowanie pakietu php7.0-fpm (7.0.33-57+ubuntu20.04.1+deb.sury.org+1) ...
    NOTICE: Not enabling PHP 7.0 FPM by default.
    NOTICE: To enable PHP 7.0 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.0-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Przetwarzanie wyzwalaczy pakietu man-db (2.9.1-1)...
    Przetwarzanie wyzwalaczy pakietu systemd (245.4-4ubuntu3.15)...
    Przetwarzanie wyzwalaczy pakietu php7.3-fpm (7.3.33-1+ubuntu20.04.1+deb.sury.org+1)...
    NOTICE: Not enabling PHP 7.3 FPM by default.
    NOTICE: To enable PHP 7.3 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.3-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Przetwarzanie wyzwalaczy pakietu php7.4-fpm (7.4.27-1+ubuntu20.04.1+deb.sury.org+1)...
    NOTICE: Not enabling PHP 7.4 FPM by default.
    NOTICE: To enable PHP 7.4 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.4-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Przetwarzanie wyzwalaczy pakietu php5.6-fpm (5.6.40-57+ubuntu20.04.1+deb.sury.org+1)...
    NOTICE: Not enabling PHP 5.6 FPM by default.
    NOTICE: To enable PHP 5.6 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php5.6-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Przetwarzanie wyzwalaczy pakietu php7.2-fpm (7.2.34-28+ubuntu20.04.1+deb.sury.org+1)...
    NOTICE: Not enabling PHP 7.2 FPM by default.
    NOTICE: To enable PHP 7.2 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.2-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Przetwarzanie wyzwalaczy pakietu php8.1-fpm (8.1.2-1+ubuntu20.04.1+deb.sury.org+1)...
    NOTICE: Not enabling PHP 8.1 FPM by default.
    NOTICE: To enable PHP 8.1 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php8.1-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Przetwarzanie wyzwalaczy pakietu php7.1-fpm (7.1.33-44+ubuntu20.04.1+deb.sury.org+1)...
    NOTICE: Not enabling PHP 7.1 FPM by default.
    NOTICE: To enable PHP 7.1 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.1-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    Przetwarzanie wyzwalaczy pakietu php7.0-fpm (7.0.33-57+ubuntu20.04.1+deb.sury.org+1)...
    NOTICE: Not enabling PHP 7.0 FPM by default.
    NOTICE: To enable PHP 7.0 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.0-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
     
    Last edited: Feb 9, 2022
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    The message you posted shows the commands to enable a php-fpm config, make sure you use the default version for your OS (and don't a2enconf multiple versions, just one).
     
  5. SebastianK

    SebastianK New Member

    Now is this:
    [​IMG]

    and i see ->

    [​IMG]
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Did you restart apache after enabling a php-fpm config? (The prompt would have instructed you to do so when running the a2enmod/a2enconf commands.)
     
  7. SebastianK

    SebastianK New Member

    From terminal

    Code:
    [email protected]:/var/www/eoglaszamy.pl/web# a2enmod
    Your choices are: access_compat actions alias allowmethods asis auth_basic auth_digest auth_form authn_anon authn_core authn_dbd authn_dbm authn_file authn_socache authnz_fcgi authnz_ldap authz_core authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex brotli buffer cache cache_disk cache_socache cern_meta cgi cgid charset_lite data dav dav_fs dav_lock dbd deflate dialup dir dump_io echo env expires ext_filter fcgid file_cache filter headers heartbeat heartmonitor http2 ident imagemap include info lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat ldap log_debug log_forensic lua macro md mime mime_magic mpm_event mpm_prefork mpm_worker negotiation passenger proxy proxy_ajp proxy_balancer proxy_connect proxy_express proxy_fcgi proxy_fdpass proxy_ftp proxy_hcheck proxy_html proxy_http proxy_http2 proxy_scgi proxy_uwsgi proxy_wstunnel python ratelimit reflector remoteip reqtimeout request rewrite sed session session_cookie session_crypto session_dbd setenvif slotmem_plain slotmem_shm socache_dbm socache_memcache socache_redis socache_shmcb speling ssl status substitute suexec unique_id userdir usertrack vhost_alias xml2enc
    Which module(s) do you want to enable (wildcards ok)?
    
    [email protected]:/var/www/eoglaszamy.pl/web# a2enconf
    Your choices are: apache2-doc charset httpoxy javascript-common localized-error-pages other-vhosts-access-log php5.6-cgi php5.6-fpm php7.0-cgi php7.0-fpm php7.1-cgi php7.1-fpm php7.2-cgi php7.2-fpm php7.3-cgi php7.3-fpm php7.4-cgi php7.4-fpm php8.0-cgi php8.0-fpm php8.1-fpm phpmyadmin roundcube security serve-cgi-bin
    Which conf(s) do you want to enable (wildcards ok)?
    
    [email protected]:/var/www/eoglaszamy.pl/web# service apache2 restart
    [email protected]:/var/www/eoglaszamy.pl/web# service apache2 reload
    [email protected]:/var/www/eoglaszamy.pl/web# service apache2 restart
    And on /phpmyadmin i see code
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If you issue command a2enmod or a2enconf with no parameters the command does nothing. Give as parameter the module or configuration you want to enable. Read man a2enconf and man a2enmod.
    If you used the ISPCOnfig autoinstaller, the system should work when the installation finished. Were there errors during autoinstall run? Did you alter something after autoinstall?
    Maybe start examining what is wrong from the beginning, with this:
    https://www.howtoforge.com/community/threads/please-read-before-posting.58408/
     
    Last edited: Feb 9, 2022
  9. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    The commands should be as you posted, eg.
    Just use the version for your os, not all of them.
     
    SebastianK likes this.
  10. SebastianK

    SebastianK New Member

    Thanks :) this is it!
     

Share This Page