# http://localhost/phpmyadmin/ shows blank page



## Aeolian (Mar 21, 2021)

I have a problem with the configuration of phpmyadmin.

http://localhost/phpmyadmin/ first gave this error message:

*Forbidden*

You don't have permission to access this resource.

After this I had configured it to consult the index.php at this address as well: https://i.ibb.co/M7yTF28/Screenshot-2021-03-21-11-41-01.png

Then, because it only showed the code, I would have made an adjustment, after which it now only shows an empty page.

I added this to the current httpd config file:


```
<IfModule mime_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    <FilesMatch "\.php$">
    SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
    </FilesMatch>
</IfModule>

Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"

<Directory "/usr/local/www/phpMyAdmin/">
Options None
AllowOverride Limit
Require local
Require host localhost
</Directory>
```

This is my httpd-error.log:


```
[Sun Mar 21 17:04:07.683248 2021] [mpm_prefork:notice] [pid 67138] AH00169: caught SIGTERM, shutting down
[Sun Mar 21 17:04:07.806957 2021] [mpm_prefork:notice] [pid 24563] AH00163: Apache/2.4.46 (FreeBSD) configured -- resuming normal operations
[Sun Mar 21 17:04:07.807439 2021] [core:notice] [pid 24563] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Sun Mar 21 17:16:08.315191 2021] [mpm_prefork:notice] [pid 24563] AH00169: caught SIGTERM, shutting down
[Sun Mar 21 17:16:08.455118 2021] [so:warn] [pid 4762] AH01574: module php_module is already loaded, skipping
[Sun Mar 21 17:16:08.473449 2021] [mpm_prefork:notice] [pid 5077] AH00163: Apache/2.4.46 (FreeBSD) PHP/8.0.3 configured -- resuming normal operations
[Sun Mar 21 17:16:08.473523 2021] [core:notice] [pid 5077] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Sun Mar 21 17:19:19.709882 2021] [mpm_prefork:notice] [pid 5077] AH00169: caught SIGTERM, shutting down
[Sun Mar 21 17:19:19.908001 2021] [so:warn] [pid 26173] AH01574: module php_module is already loaded, skipping
[Sun Mar 21 17:19:19.926078 2021] [mpm_prefork:notice] [pid 27086] AH00163: Apache/2.4.46 (FreeBSD) PHP/8.0.3 configured -- resuming normal operations
[Sun Mar 21 17:19:19.926154 2021] [core:notice] [pid 27086] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Sun Mar 21 17:19:43.837157 2021] [php:error] [pid 30823] [client ::1:14969] script '/usr/local/www/phpMyAdmin/Setup' not found or unable to stat
[Sun Mar 21 17:19:50.631836 2021] [php:error] [pid 28744] [client ::1:14971] script '/usr/local/www/phpMyAdmin/setup/favicon.ico' not found or unable to stat, referer: http://localhost/phpmyadmin/setup/index.php
[Sun Mar 21 17:20:40.379082 2021] [mpm_prefork:notice] [pid 27086] AH00169: caught SIGTERM, shutting down
[Sun Mar 21 17:20:40.554786 2021] [mpm_prefork:notice] [pid 46424] AH00163: Apache/2.4.46 (FreeBSD) PHP/8.0.3 configured -- resuming normal operations
[Sun Mar 21 17:20:40.554886 2021] [core:notice] [pid 46424] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
[Sun Mar 21 17:41:01.185117 2021] [mpm_prefork:notice] [pid 46424] AH00169: caught SIGTERM, shutting down
[Sun Mar 21 17:41:01.345502 2021] [mpm_prefork:notice] [pid 50348] AH00163: Apache/2.4.46 (FreeBSD) PHP/8.0.3 configured -- resuming normal operations
[Sun Mar 21 17:41:01.345639 2021] [core:notice] [pid 50348] AH00094: Command line: '/usr/local/sbin/httpd -D NOHTTPACCEPT'
```


And this is my httpd-access.log:


```
:1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery-ui.min.js?v=5.1.0 HTTP/1.1" 200 274275
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery.ba-hashchange-2.0.js?v=5.1.0 HTTP/1.1" 200 21002
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery.debounce-1.0.6.js?v=5.1.0 HTTP/1.1" 200 6746
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/menu_resizer.js?v=5.1.0 HTTP/1.1" 200 13321
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery-ui-timepicker-addon.js?v=5.1.0 HTTP/1.1" 200 297729
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/cross_framing_protection.js?v=5.1.0 HTTP/1.1" 200 838
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/rte.js?v=5.1.0 HTTP/1.1" 200 102400
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/error_report.js?v=5.1.0 HTTP/1.1" 200 21811
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/tracekit.js?v=5.1.0 HTTP/1.1" 200 122145
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/config.js?v=5.1.0 HTTP/1.1" 200 50800
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/doclinks.js?v=5.1.0 HTTP/1.1" 200 27241
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/indexes.js?v=5.1.0 HTTP/1.1" 200 55113
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/navigation.js?v=5.1.0 HTTP/1.1" 200 113452
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/common.js?v=5.1.0 HTTP/1.1" 200 10582
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/page_settings.js?v=5.1.0 HTTP/1.1" 200 2949
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/functions.js?v=5.1.0 HTTP/1.1" 200 346963
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/drag_drop_import.js?v=5.1.0 HTTP/1.1" 200 26546
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/shortcuts_handler.js?v=5.1.0 HTTP/1.1" 200 8081
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/runmode/runmode.js?v=5.1.0 HTTP/1.1" 200 6440
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/hint/show-hint.js?v=5.1.0 HTTP/1.1" 200 40437
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/mode/sql/sql.js?v=5.1.0 HTTP/1.1" 200 87239
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/hint/sql-hint.js?v=5.1.0 HTTP/1.1" 200 21515
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/codemirror/addon/lint/sql-lint.js?v=5.1.0 HTTP/1.1" 200 2180
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/lint/lint.js?v=5.1.0 HTTP/1.1" 200 19234
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/console.js?v=5.1.0 HTTP/1.1" 200 105398
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/lib/codemirror.js?v=5.1.0 HTTP/1.1" 200 884699
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/messages.php?l=en&v=5.1.0 HTTP/1.1" 200 7827
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/themes/pmahomme/img/logo_right.png HTTP/1.1" 200 4792
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/themes/dot.gif HTTP/1.1" 200 94
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/themes/pmahomme/css/printview.css?v=5.1.0 HTTP/1.1" 200 1548
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/favicon.ico HTTP/1.1" 200 24673
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/favicon.ico HTTP/1.1" 200 24673
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/ HTTP/1.1" 200 4533
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/themes/pmahomme/jquery/jquery-ui.css HTTP/1.1" 200 67189
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/hint/show-hint.css?v=5.1.0 HTTP/1.1" 200 1289
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/lib/codemirror.css?v=5.1.0 HTTP/1.1" 200 15442
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/lint/lint.css?v=5.1.0 HTTP/1.1" 200 4069
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery.min.js?v=5.1.0 HTTP/1.1" 200 102750
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/themes/pmahomme/css/theme.css?v=5.1.0&nocache=4845759222ltr&server=1 HTTP/1.1" 200 238587
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery-migrate.js?v=5.1.0 HTTP/1.1" 200 71928
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/sprintf.js?v=5.1.0 HTTP/1.1" 200 17307
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/ajax.js?v=5.1.0 HTTP/1.1" 200 73995
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/keyhandler.js?v=5.1.0 HTTP/1.1" 200 7366
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/js.cookie.js?v=5.1.0 HTTP/1.1" 200 15758
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/bootstrap/bootstrap.bundle.min.js?v=5.1.0 HTTP/1.1" 200 92458
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery.mousewheel.js?v=5.1.0 HTTP/1.1" 200 22229
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery.event.drag-2.2.js?v=5.1.0 HTTP/1.1" 200 46464
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery-ui.min.js?v=5.1.0 HTTP/1.1" 200 274275
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery.validate.js?v=5.1.0 HTTP/1.1" 200 191300
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery.ba-hashchange-2.0.js?v=5.1.0 HTTP/1.1" 200 21002
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/menu_resizer.js?v=5.1.0 HTTP/1.1" 200 13321
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery.debounce-1.0.6.js?v=5.1.0 HTTP/1.1" 200 6746
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/jquery/jquery-ui-timepicker-addon.js?v=5.1.0 HTTP/1.1" 200 297729
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/cross_framing_protection.js?v=5.1.0 HTTP/1.1" 200 838
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/rte.js?v=5.1.0 HTTP/1.1" 200 102400
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/error_report.js?v=5.1.0 HTTP/1.1" 200 21811
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/tracekit.js?v=5.1.0 HTTP/1.1" 200 122145
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/config.js?v=5.1.0 HTTP/1.1" 200 50800
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/doclinks.js?v=5.1.0 HTTP/1.1" 200 27241
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/common.js?v=5.1.0 HTTP/1.1" 200 10582
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/page_settings.js?v=5.1.0 HTTP/1.1" 200 2949
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/indexes.js?v=5.1.0 HTTP/1.1" 200 55113
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/navigation.js?v=5.1.0 HTTP/1.1" 200 113452
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/drag_drop_import.js?v=5.1.0 HTTP/1.1" 200 26546
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/functions.js?v=5.1.0 HTTP/1.1" 200 346963
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/shortcuts_handler.js?v=5.1.0 HTTP/1.1" 200 8081
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/runmode/runmode.js?v=5.1.0 HTTP/1.1" 200 6440
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/mode/sql/sql.js?v=5.1.0 HTTP/1.1" 200 87239
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/hint/sql-hint.js?v=5.1.0 HTTP/1.1" 200 21515
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/hint/show-hint.js?v=5.1.0 HTTP/1.1" 200 40437
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/addon/lint/lint.js?v=5.1.0 HTTP/1.1" 200 19234
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/codemirror/addon/lint/sql-lint.js?v=5.1.0 HTTP/1.1" 200 2180
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/dist/console.js?v=5.1.0 HTTP/1.1" 200 105398
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/js/vendor/codemirror/lib/codemirror.js?v=5.1.0 HTTP/1.1" 200 884699
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/themes/pmahomme/img/logo_right.png HTTP/1.1" 200 4792
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/themes/dot.gif HTTP/1.1" 200 94
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/themes/pmahomme/css/printview.css?v=5.1.0 HTTP/1.1" 200 1548
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/favicon.ico HTTP/1.1" 200 24673
::1 - - [21/Mar/2021:17:41:29 +0100] "GET /phpmyadmin/favicon.ico HTTP/1.1" 200 24673
127.0.0.1 - - [21/Mar/2021:17:41:37 +0100] "OPTIONS * HTTP/1.0" 200 -
```

I use php80, mysql57, apache2.4 and phpMyAdmin5-php80.


----------



## Emrion (Mar 21, 2021)

Have you installed www/mod_php80?

As a general rule, you should proceed (if it isn't already the case) step by step. Apache can display a simple html page? If yes, write the most simple php page (index.php) and test it.


> <?php phpinfo(); ?>



And if it works, you can try phpmyadmin. Do you have installed it with the port or pkg system?


----------



## Aeolian (Mar 22, 2021)

I switched back to PHP 74 because otherwise Adminder would no longer be compatible. 
mod_php74 did not solve the issue.
The PHP info page and Adminer both work well. Another thing I have noticed is that when the blank page of phpMyAdmin appears, I can see the correct code of the page when I click on 'View Page Source'.


----------



## SirDice (Mar 22, 2021)

Aeolian said:


> ```
> Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
> <Directory "/usr/local/www/phpMyAdmin/">
> ```


Don't put slashes at the end of the directories here. If you add slashes you must open it with http://<myserver>/phpmyadmin/. Without the slashes this works too http://<myserver>/phpmyadmin.

```
Alias /phpmyadmin "/usr/local/www/phpMyAdmin" 
<Directory "/usr/local/www/phpMyAdmin">
```

And add a `DirectoryIndex` to include index.php, it's looking for index.html by default, which doesn't exist. So it falls back to directory browsing, which is disabled by default, hence the "Forbidden".



			mod_dir - Apache HTTP Server Version 2.4


----------



## Emrion (Mar 22, 2021)

mod_phpXx is mandatory if you want to use php with Apache (well, almost).

It's probably an error with php (and, by chance, just a php extension missing). You can change the setting in php.ini to make this error appear on the page.

Also, you didn't answer, but phpmyadmin exists both in the port and packages collection. If you install it with one of these means, most of the dependencies will be pulled on your machine.


----------



## SirDice (Mar 22, 2021)

Emrion said:


> mod_phpXx is mandatory if you want to use php with Apache (well, almost).


Not if you use php-fpm.


----------



## Emrion (Mar 22, 2021)

Hence the almost...


----------

