# phpmyadmin won't work from within jail



## unknownuser (May 14, 2016)

Hello guys, I am here once again.

It has been two long days since I have been working on getting phpmyadmin up and running under a FreeBSD 10.3 jail.

Essentially I am using the same exact configuration I use on the FreeBSD HOST apart from the IP's . 
My goal is to run phpmyadmin as vhost on a port and run wordpress on another on the same IP, and like I said I achieve it without any issue on the FreeBSD HOST.

However I have also tried running it as normal but I get the same error, which is either index.php index.html page not found or access denied from the server.
I am using Apache24 with mod_php55 and MariaDB.

I will past my configuration down below:
/usr/local/etc/apache24/httpd.conf
http://pastie.org/10836393

/usr/local/www/phpMyAdmin]

```
total 716
drwxr-xr-x  12 root  wheel   3072 May 13 22:12 .
drwxr-xr-x   5 root  wheel    512 May 13 22:30 ..
-rw-r--r--   1 root  wheel   1655 May  7 20:12 CONTRIBUTING.md
-rw-r--r--   1 root  wheel   9877 May  7 20:12 ChangeLog
-rw-r--r--   1 root  wheel   1810 May  7 20:12 DCO
-rw-r--r--   1 root  wheel  18092 May  7 20:12 LICENSE
-rw-r--r--   1 root  wheel   1518 May  7 20:12 README
-rw-r--r--   1 root  wheel     29 May  7 20:12 RELEASE-DATE-4.6.0
-rw-r--r--   1 root  wheel   1525 May  7 20:12 browse_foreigners.php
-rw-r--r--   1 root  wheel   6561 May  7 20:12 build.xml
-rw-r--r--   1 root  wheel   4988 May  7 20:12 changelog.php
-rw-r--r--   1 root  wheel    758 May  7 20:12 chk_rel.php
-rw-r--r--   1 root  wheel   1196 May  7 20:12 composer.json
-rw-r-----   1 root  www      381 May  7 20:12 config.inc.php
-rw-r-----   1 root  www      381 May  7 20:12 config.inc.php.sample
-rw-r--r--   1 root  wheel   4640 May  7 20:12 config.sample.inc.php
-rw-r--r--   1 root  wheel   5329 May  7 20:12 db_central_columns.php
-rw-r--r--   1 root  wheel   5901 May  7 20:12 db_datadict.php
-rw-r--r--   1 root  wheel   5862 May  7 20:12 db_designer.php
-rw-r--r--   1 root  wheel    356 May  7 20:12 db_events.php
-rw-r--r--   1 root  wheel   4929 May  7 20:12 db_export.php
-rw-r--r--   1 root  wheel   1047 May  7 20:12 db_import.php
-rw-r--r--   1 root  wheel   9914 May  7 20:12 db_operations.php
-rw-r--r--   1 root  wheel   4431 May  7 20:12 db_qbe.php
-rw-r--r--   1 root  wheel    465 May  7 20:12 db_routines.php
-rw-r--r--   1 root  wheel   2083 May  7 20:12 db_search.php
-rw-r--r--   1 root  wheel   1093 May  7 20:12 db_sql.php
-rw-r--r--   1 root  wheel    735 May  7 20:12 db_sql_autocomplete.php
-rw-r--r--   1 root  wheel    463 May  7 20:12 db_sql_format.php
-rw-r--r--   1 root  wheel   1572 May  7 20:12 db_structure.php
-rw-r--r--   1 root  wheel   4432 May  7 20:12 db_tracking.php
-rw-r--r--   1 root  wheel    360 May  7 20:12 db_triggers.php
drwxr-xr-x   5 root  wheel    512 May 13 22:12 doc
-rw-r--r--   1 root  wheel   4591 May  7 20:12 error_report.php
drwxr-xr-x   2 root  wheel    512 May 13 22:12 examples
-rw-r--r--   1 root  wheel  17583 May  7 20:12 export.php
-rw-r--r--   1 root  wheel  22486 May  7 20:12 favicon.ico
-rw-r--r--   1 root  wheel   2335 May  7 20:12 file_echo.php
-rw-r--r--   1 root  wheel  15722 May  7 20:12 gis_data_editor.php
-rw-r--r--   1 root  wheel  27491 May  7 20:12 import.php
-rw-r--r--   1 root  wheel   3460 May  7 20:12 import_status.php
-rw-r--r--   1 root  wheel  21097 May  7 20:12 index.php
drwxr-xr-x   9 root  wheel   2048 May 13 22:12 js
drwxr-xr-x  17 root  wheel   4608 May 13 22:12 libraries
-rw-r--r--   1 root  wheel    852 May  7 20:12 license.php
-rw-r--r--   1 root  wheel   1353 May  7 20:12 lint.php
drwxr-xr-x  42 root  wheel   1024 May 13 22:12 locale
-rw-r--r--   1 root  wheel   2179 May  7 20:12 navigation.php
-rw-r--r--   1 root  wheel   3999 May  7 20:12 normalization.php
-rw-r--r--   1 root  wheel   5912 May  7 20:12 phpdox.xml
-rw-r--r--   1 root  wheel    396 May  7 20:12 phpinfo.php
-rw-r--r--   1 root  wheel   1017 May  7 20:12 phpmyadmin.css.php
-rw-r--r--   1 root  wheel   2646 May  7 20:12 phpunit.xml.dist
-rw-r--r--   1 root  wheel   1101 May  7 20:12 phpunit.xml.hhvm
-rw-r--r--   1 root  wheel   1399 May  7 20:12 phpunit.xml.nocoverage
-rw-r--r--   1 root  wheel   2747 May  7 20:12 prefs_forms.php
-rw-r--r--   1 root  wheel  14703 May  7 20:12 prefs_manage.php
-rw-r--r--   1 root  wheel   1213 May  7 20:12 print.css
-rw-r--r--   1 root  wheel     26 May  7 20:12 robots.txt
-rw-r--r--   1 root  wheel   1675 May  7 20:12 schema_export.php
-rw-r--r--   1 root  wheel    804 May  7 20:12 server_binlog.php
-rw-r--r--   1 root  wheel    837 May  7 20:12 server_collations.php
-rw-r--r--   1 root  wheel    817 May  7 20:12 server_databases.php
-rw-r--r--   1 root  wheel    803 May  7 20:12 server_engines.php
-rw-r--r--   1 root  wheel   1233 May  7 20:12 server_export.php
-rw-r--r--   1 root  wheel    793 May  7 20:12 server_import.php
-rw-r--r--   1 root  wheel    808 May  7 20:12 server_plugins.php
-rw-r--r--   1 root  wheel  13937 May  7 20:12 server_privileges.php
-rw-r--r--   1 root  wheel   2125 May  7 20:12 server_replication.php
-rw-r--r--   1 root  wheel    847 May  7 20:12 server_sql.php
-rw-r--r--   1 root  wheel    981 May  7 20:12 server_status.php
-rw-r--r--   1 root  wheel    940 May  7 20:12 server_status_advisor.php
-rw-r--r--   1 root  wheel   3078 May  7 20:12 server_status_monitor.php
-rw-r--r--   1 root  wheel   1926 May  7 20:12 server_status_processes.php
-rw-r--r--   1 root  wheel   1383 May  7 20:12 server_status_queries.php
-rw-r--r--   1 root  wheel   1616 May  7 20:12 server_status_variables.php
-rw-r--r--   1 root  wheel   1833 May  7 20:12 server_user_groups.php
-rw-r--r--   1 root  wheel    817 May  7 20:12 server_variables.php
drwxr-xr-x   4 root  wheel    512 May 13 22:12 setup
-rw-r--r--   1 root  wheel   1036 May  7 20:12 show_config_errors.php
drwxr-xr-x   2 root  wheel    512 May 13 22:12 sql
-rw-r--r--   1 root  wheel   6292 May  7 20:12 sql.php
-rw-r--r--   1 root  wheel   3814 May  7 20:12 tbl_addfield.php
-rw-r--r--   1 root  wheel   6756 May  7 20:12 tbl_change.php
-rw-r--r--   1 root  wheel    990 May  7 20:12 tbl_chart.php
-rw-r--r--   1 root  wheel   3161 May  7 20:12 tbl_create.php
-rw-r--r--   1 root  wheel   4215 May  7 20:12 tbl_export.php
-rw-r--r--   1 root  wheel   1034 May  7 20:12 tbl_find_replace.php
-rw-r--r--   1 root  wheel   1432 May  7 20:12 tbl_get_field.php
-rw-r--r--   1 root  wheel   1255 May  7 20:12 tbl_gis_visualization.php
-rw-r--r--   1 root  wheel    910 May  7 20:12 tbl_import.php
-rw-r--r--   1 root  wheel   1437 May  7 20:12 tbl_indexes.php
-rw-r--r--   1 root  wheel  13728 May  7 20:12 tbl_operations.php
-rw-r--r--   1 root  wheel    455 May  7 20:12 tbl_recent_favorite.php
-rw-r--r--   1 root  wheel   2532 May  7 20:12 tbl_relation.php
-rw-r--r--   1 root  wheel  16423 May  7 20:12 tbl_replace.php
-rw-r--r--   1 root  wheel   5094 May  7 20:12 tbl_row_action.php
-rw-r--r--   1 root  wheel   1165 May  7 20:12 tbl_select.php
-rw-r--r--   1 root  wheel   1270 May  7 20:12 tbl_sql.php
-rw-r--r--   1 root  wheel   1758 May  7 20:12 tbl_structure.php
-rw-r--r--   1 root  wheel   5961 May  7 20:12 tbl_tracking.php
-rw-r--r--   1 root  wheel    141 May  7 20:12 tbl_triggers.php
-rw-r--r--   1 root  wheel   1084 May  7 20:12 tbl_zoom_select.php
drwxr-xr-x  13 root  wheel    512 May 13 22:12 templates
drwxr-xr-x   6 root  wheel    512 May 13 22:12 test
drwxr-xr-x   4 root  wheel    512 May 13 22:12 themes
-rw-r--r--   1 root  wheel    867 May  7 20:12 themes.php
-rw-r--r--   1 root  wheel   1934 May  7 20:12 transformation_overview.php
-rw-r--r--   1 root  wheel   4008 May  7 20:12 transformation_wrapper.php
-rw-r--r--   1 root  wheel   1170 May  7 20:12 url.php
-rw-r--r--   1 root  wheel   9056 May  7 20:12 user_password.php
-rw-r--r--   1 root  wheel   1033 May  7 20:12 version_check.php
-rw-r--r--   1 root  wheel   9050 May  7 20:12 view_create.php
-rw-r--r--   1 root  wheel   3879 May  7 20:12 view_operations.php
```
And here some logs:
/usr/local/www/logs/phpmyadmin-error_log

```
$ tail -f /usr/jails/bsdsrv2/usr/local/www/logs/phpmyadmin-error_log
[Fri May 13 23:22:22.107330 2016] [:error] [pid 2336] [client 192.168.1.130:61272] script '/usr/local/www/apache24/data/phpMyAdminindex.php' not found or unable to stat
[Fri May 13 23:22:22.116199 2016] [:error] [pid 2337] [client 192.168.1.130:61273] script '/usr/local/www/apache24/data/phpMyAdminindex.php' not found or unable to stat
```

/usr/local/www/logs/phpmyadmin-access_log

```
[Fri May 13 23:22:22.107330 2016] [:error] [pid 2336] [client 192.168.1.130:61272] script '/usr/local/www/apache24/data/phpMyAdminindex.php' not found or unable to stat
[Fri May 13 23:22:22.116199 2016] [:error] [pid 2337] [client 192.168.1.130:61273] script '/usr/local/www/apache24/data/phpMyAdminindex.php' not found or unable to stat
^X^C
$ tail -f /usr/jails/bsdsrv2/usr/local/www/logs/phpmyadmin-access_log
10.1.0.2 - - [13/May/2016:23:30:42 +0000] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.20 (FreeBSD) PHP/5.6.21 (internal dummy connection)"
10.1.0.2 - - [13/May/2016:23:30:43 +0000] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.20 (FreeBSD) PHP/5.6.21 (internal dummy connection)"
192.168.1.130 - - [13/May/2016:23:30:50 +0000] "GET /phpmyadmin/index.php HTTP/1.1" 200 3011 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
192.168.1.130 - - [13/May/2016:23:31:32 +0000] "GET /phpmyadmin/index.php HTTP/1.1" 200 3011 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
192.168.1.130 - - [13/May/2016:23:31:32 +0000] "GET /phpmyadmin/index.php HTTP/1.1" 200 3011 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
192.168.1.130 - - [13/May/2016:23:31:36 +0000] "GET / HTTP/1.1" 200 3043 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
192.168.1.130 - - [13/May/2016:23:31:36 +0000] "GET / HTTP/1.1" 200 3045 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
192.168.1.130 - - [13/May/2016:23:31:56 +0000] "-" 408 - "-" "-"
192.168.1.130 - - [13/May/2016:23:31:56 +0000] "-" 408 - "-" "-"
10.1.0.2 - - [13/May/2016:23:31:59 +0000] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.20 (FreeBSD) PHP/5.6.21 (internal dummy connection)"
```

I don't have any issue running wordpress or hosting any webpage, even as vhost, the only problem I have is with phpmyadmin and also adminer. I have tried all kinds of settings, moving the phpmyadmin folder in different locations, also giving the entire folder 777 to see if it would make any difference but it did not. 

I am completely lost here. Please advise


----------



## unknownuser (May 16, 2016)

Admin can this thread be moved to "Web and Network Services" please? Thanks


----------

