# MediaWiki setup



## Psypro (Dec 12, 2015)

Back ground information

Followed the excellent howto on : https://www.digitalocean.com/commun...ginx-mysql-and-php-femp-stack-on-freebsd-10-1

(I have before followed the howto for Wordpress and apache a (linux): 
https://www.raspberrypi.org/learning/lamp-web-server-with-wordpress/worksheet/)

Onto the problem:
The webserver is running, 
Mediawiki is installed with pkg
When is connect to the webserwer address in browser, first mediawiki page is showing
But is fails with a "500" error msg when i push the mediawiki link for starting the setup.

What I have tried so fare:
`chown -R www:www /usr/local/www/nginx` 

`chmod 755 mw-config/*`


----------



## Psypro (Dec 12, 2015)

nginx.conf

```
user  www;
worker_processes  2;
error_log /var/log/nginx/error.log info;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    access_log /var/log/nginx/access.log;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  192.168.0.158;
        root /usr/local/www/nginx;
        include mediawiki.conf;
        index index.php index.html index.htm;

        location / {
            try_files $uri $uri/ =404;
        }

        error_page      500 502 503 504  /50x.html;
        location = /50x.html {
            root /usr/local/www/nginx-dist;
        }

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                include fastcgi_params;
        }
    }
}
```


----------



## Psypro (Dec 12, 2015)

rc.conf

```
hostname="BSD"
keymap="no.kbd"
ifconfig_re0="DHCP"
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
allscreens_flags="-f gallant.fnt"
xrdp_enable="YES"
xrdp_sesman_enable="YES"
mysql_enable="YES"
nginx_enable="YES"
php_fpm_enable="YES"
```


----------



## Psypro (Dec 12, 2015)

```
2015/12/11 23:15:55 [notice] 1510#0: exit
2015/12/11 23:15:55 [notice] 1509#0: exit
2015/12/11 23:15:55 [notice] 1508#0: signal 20 (SIGCHLD) received
2015/12/11 23:15:55 [notice] 1508#0: worker process 1510 exited with code 0
2015/12/11 23:15:55 [notice] 1508#0: worker process 1509 exited with code 0
2015/12/11 23:15:55 [notice] 1508#0: exit
2015/12/11 23:15:55 [notice] 1861#0: using the "kqueue" event method
2015/12/11 23:15:55 [notice] 1861#0: nginx/1.8.0
2015/12/11 23:15:55 [notice] 1861#0: OS: FreeBSD 11.0-CURRENT
2015/12/11 23:15:55 [notice] 1861#0: kern.osreldate: 1100090, built on 1100091
2015/12/11 23:15:55 [notice] 1861#0: hw.ncpu: 2
2015/12/11 23:15:55 [notice] 1861#0: net.inet.tcp.sendspace: 32768
2015/12/11 23:15:55 [notice] 1861#0: kern.ipc.somaxconn: 128
2015/12/11 23:15:55 [notice] 1861#0: getrlimit(RLIMIT_NOFILE): 116919:116919
2015/12/11 23:15:55 [notice] 1862#0: start worker processes
2015/12/11 23:15:55 [notice] 1862#0: start worker process 1863
2015/12/11 23:15:55 [notice] 1862#0: start worker process 1864
2015/12/11 23:15:55 [notice] 1862#0: signal 23 (SIGIO) received
2015/12/11 23:16:03 [error] 1863#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header from$
2015/12/11 23:16:06 [error] 1863#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header from$
2015/12/11 23:19:17 [error] 1863#0: *4 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header from$
2015/12/11 23:19:18 [error] 1863#0: *4 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header from$
2015/12/11 23:19:21 [error] 1863#0: *4 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header from$
2015/12/11 23:23:08 [error] 1863#0: *8 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header from$
2015/12/11 23:24:05 [info] 1863#0: *9 client timed out (60: Operation timed out) while waiting for request, client: 192.168.0.158, server: 0.0.0.0:80
2015/12/11 23:36:17 [error] 1863#0: *12 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 07:58:19 [error] 1863#0: *14 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 07:58:22 [error] 1863#0: *14 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 07:59:54 [error] 1863#0: *17 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:08:57 [info] 1863#0: *20 client closed connection while waiting for request, client: 192.168.0.133, server: 0.0.0.0:80
2015/12/12 08:08:57 [info] 1863#0: *19 client closed connection while waiting for request, client: 192.168.0.133, server: 0.0.0.0:80
2015/12/12 08:12:41 [error] 1863#0: *21 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:46:40 [error] 1863#0: *23 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:46:40 [error] 1863#0: *23 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:46:42 [error] 1863#0: *23 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:46:57 [info] 1863#0: *25 client closed connection while waiting for request, client: 192.168.0.133, server: 0.0.0.0:80
2015/12/12 08:59:12 [error] 1864#0: *29 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:59:13 [error] 1864#0: *29 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:59:14 [error] 1864#0: *29 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:59:14 [error] 1864#0: *29 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:59:14 [error] 1864#0: *29 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:59:14 [error] 1864#0: *29 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function json_encode() in /usr/local/www/nginx/includes/json/FormatJson.php on line 291" while reading response header fro$
2015/12/12 08:59:22 [info] 1864#0: *28 client closed connection while waiting for request, client: 192.168.0.133, server: 0.0.0.0:80
```


----------



## Psypro (Dec 12, 2015)

PHP seems to be working?

info.php

```
PHP Version 5.6.16
System FreeBSD BSD 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r291495: Mon Nov 30 23:14:34 UTC 2015 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Build Date Dec 9 2015 05:24:27
Configure Command './configure' '--with-layout=GNU' '--localstatedir=/var' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--enable-mysqlnd' '--with-libxml-dir=/usr/local' '--with-pcre-regex=/usr/local' '--with-zlib-dir=/usr' '--program-prefix=' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--with-regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd11.0' 'build_alias=amd64-portbld-freebsd11.0' 'CC=cc' 'CFLAGS=-O2 '-pipe' '-fstack-protector' '-fno-strict-aliasing'' 'LDFLAGS= '-fstack-protector'' 'LIBS=-lpthread' 'CPPFLAGS=' 'CPP=cpp' 'CXX=c++' 'CXXFLAGS=-O2 '-pipe' '-fstack-protector' '-fno-strict-aliasing'
Server API FPM/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/etc
Loaded Configuration File /usr/local/etc/php.ini
Scan this dir for additional .ini files /usr/local/etc/php
Additional .ini files parsed /usr/local/etc/php/extensions.ini
PHP API 20131106
PHP Extension 20131226
Zend Extension 220131226
Zend Extension Build API220131226,NTS
PHP Extension Build API20131226,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling disabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
DTrace Support disabled
Registered PHP Streams php, file, glob, data, http, ftp
Registered Stream Socket Transports tcp, udp, unix, udg
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
```


----------



## Psypro (Dec 12, 2015)

I am guessing it is something with the nginx.conf

Went to mediawiki irc serer at Freenode

Chated with : nyuszika7h 

`pkg install php5-json`

That installed and older version of php. Early reading og error log seems to indicate the error regarding php and json is gone. Stil a new php error remains.


----------



## Psypro (Dec 12, 2015)

error

```
2015/12/12 09:55:20 [notice] 638#0: using the "kqueue" event method
2015/12/12 09:55:20 [notice] 638#0: nginx/1.8.0
2015/12/12 09:55:20 [notice] 638#0: OS: FreeBSD 11.0-CURRENT
2015/12/12 09:55:20 [notice] 638#0: kern.osreldate: 1100090, built on 1100091
2015/12/12 09:55:20 [notice] 638#0: hw.ncpu: 2
2015/12/12 09:55:20 [notice] 638#0: net.inet.tcp.sendspace: 32768
2015/12/12 09:55:20 [notice] 638#0: kern.ipc.somaxconn: 128
2015/12/12 09:55:20 [notice] 638#0: getrlimit(RLIMIT_NOFILE): 116919:116919
2015/12/12 09:55:20 [notice] 639#0: start worker processes
2015/12/12 09:55:20 [notice] 639#0: start worker process 640
2015/12/12 09:55:20 [notice] 639#0: start worker process 641
2015/12/12 09:55:20 [notice] 639#0: signal 23 (SIGIO) received
2015/12/12 09:56:00 [error] 640#0: *2 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Class 'DOMDocument' not found in /usr/local/www/nginx/includes/cache/LocalisationCache.php on line 653" while reading response header from ups$
```


----------



## Psypro (Dec 12, 2015)

info.php

```
PHP Version 5.4.45

System FreeBSD BSD 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r291495: Mon Nov 30 23:14:34 UTC 2015 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Build Date Dec 9 2015 07:30:07
Configure Command './configure' '--with-layout=GNU' '--localstatedir=/var' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--enable-mysqlnd' '--with-libxml-dir=/usr/local' '--with-pcre-regex=/usr/local' '--with-zlib-dir=/usr' '--program-prefix=' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--with-regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd11.0'
Server API FPM/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/etc
Loaded Configuration File /usr/local/etc/php.ini
Scan this dir for additional .ini files /usr/local/etc/php
Additional .ini files parsed /usr/local/etc/php/extensions.ini
PHP API 20100412
PHP Extension 20100525
Zend Extension 220100525
Zend Extension Build API220100525,NTS
PHP Extension Build API20100525,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling disabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
DTrace Support disabled
Registered PHP Streams php, file, glob, data, http, ftp
Registered Stream Socket Transports tcp, udp, unix, udg
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

[IMG]http://192.168.0.158/info.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42[/IMG]This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

PHP Credits
Configuration
cgi-fcgi
php-fpm active

Directive Local Value Master Value
cgi.discard_path 0 0
cgi.fix_pathinfo 0 0
cgi.force_redirect 1 1
cgi.nph 0 0
cgi.redirect_status_env no value no value
cgi.rfc2616_headers 0 0
fastcgi.error_header no value no value
fastcgi.logging 1 1
fpm.config no value no value

Core
PHP Version 5.4.45

Directive Local Value Master Value
allow_url_fopen On On
allow_url_include Off Off
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset UTF-8 UTF-8
default_mimetype text/html text/html
disable_classes no value no value
disable_functions no value no value
display_errors Off Off
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl Off Off
enable_post_data_reading On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 22527 22527
exit_on_timeout Off Off
expose_php On On
extension_dir /usr/local/lib/php/20100525 /usr/local/lib/php/20100525
file_uploads On On
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/local/share/pear .:/usr/local/share/pear
log_errors On On
log_errors_max_len 1024 1024
mail.add_x_header On On
mail.force_extra_parameters no value no value
mail.log no value no value
max_execution_time 30 30
max_file_uploads 20 20
max_input_nesting_level 64 64
max_input_time 60 60
max_input_vars 1000 1000
memory_limit 128M 128M
open_basedir no value no value
output_buffering 4096 4096
output_handler no value no value
post_max_size 8M 8M
precision 14 14
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv Off Off
report_memleaks On On
report_zend_debug On On
request_order GP GP
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i 
serialize_precision 17 17
short_open_tag Off Off
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
user_ini.cache_ttl 300 300
user_ini.filename .user.ini .user.ini
variables_order GPCS GPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
zend.detect_unicode On On
zend.enable_gc On On
zend.multibyte Off Off
zend.script_encoding no value no value

date
date/time support enabled
"Olson" Timezone Database Version 2014.8
Timezone Database internal
Default timezone UTC

Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value

ereg
Regex Library Bundled library enabled

json
json support enabled
json version 1.2.1

libxml
libXML support active
libXML Compiled Version 2.9.3
libXML Loaded Version 20903
libXML streams enabled

mysqlnd
mysqlnd enabled
Version mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $
Compression not supported
SSL supported
Command buffer size 4096
Read buffer size 32768
Read timeout 31536000
Collecting statistics Yes
Collecting memory statistics No
Tracing n/a
Loaded plugins mysqlnd,example,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API Extensions no value

mysqlnd statistics
bytes_sent 0
bytes_received 0
packets_sent 0
packets_received 0
protocol_overhead_in 0
protocol_overhead_out 0
bytes_received_ok_packet 0
bytes_received_eof_packet 0
bytes_received_rset_header_packet 0
bytes_received_rset_field_meta_packet 0
bytes_received_rset_row_packet 0
bytes_received_prepare_response_packet 0
bytes_received_change_user_packet 0
packets_sent_command 0
packets_received_ok 0
packets_received_eof 0
packets_received_rset_header 0
packets_received_rset_field_meta 0
packets_received_rset_row 0
packets_received_prepare_response 0
packets_received_change_user 0
result_set_queries 0
non_result_set_queries 0
no_index_used 0
bad_index_used 0
slow_queries 0
buffered_sets 0
unbuffered_sets 0
ps_buffered_sets 0
ps_unbuffered_sets 0
flushed_normal_sets 0
flushed_ps_sets 0
ps_prepared_never_executed 0
ps_prepared_once_executed 0
rows_fetched_from_server_normal 0
rows_fetched_from_server_ps 0
rows_buffered_from_client_normal 0
rows_buffered_from_client_ps 0
rows_fetched_from_client_normal_buffered 0
rows_fetched_from_client_normal_unbuffered 0
rows_fetched_from_client_ps_buffered 0
rows_fetched_from_client_ps_unbuffered 0
rows_fetched_from_client_ps_cursor 0
rows_affected_normal 0
rows_affected_ps 0
rows_skipped_normal 0
rows_skipped_ps 0
copy_on_write_saved 0
copy_on_write_performed 0
command_buffer_too_small 0
connect_success 0
connect_failure 0
connection_reused 0
reconnect 0
pconnect_success 0
active_connections 0
active_persistent_connections 0
explicit_close 0
implicit_close 0
disconnect_close 0
in_middle_of_command_close 0
explicit_free_result 0
implicit_free_result 0
explicit_stmt_close 0
implicit_stmt_close 0
mem_emalloc_count 0
mem_emalloc_amount 0
mem_ecalloc_count 0
mem_ecalloc_amount 0
mem_erealloc_count 0
mem_erealloc_amount 0
mem_efree_count 0
mem_efree_amount 0
mem_malloc_count 0
mem_malloc_amount 0
mem_calloc_count 0
mem_calloc_amount 0
mem_realloc_count 0
mem_realloc_amount 0
mem_free_count 0
mem_free_amount 0
mem_estrndup_count 0
mem_strndup_count 0
mem_estndup_count 0
mem_strdup_count 0
proto_text_fetched_null 0
proto_text_fetched_bit 0
proto_text_fetched_tinyint 0
proto_text_fetched_short 0
proto_text_fetched_int24 0
proto_text_fetched_int 0
proto_text_fetched_bigint 0
proto_text_fetched_decimal 0
proto_text_fetched_float 0
proto_text_fetched_double 0
proto_text_fetched_date 0
proto_text_fetched_year 0
proto_text_fetched_time 0
proto_text_fetched_datetime 0
proto_text_fetched_timestamp 0
proto_text_fetched_string 0
proto_text_fetched_blob 0
proto_text_fetched_enum 0
proto_text_fetched_set 0
proto_text_fetched_geometry 0
proto_text_fetched_other 0
proto_binary_fetched_null 0
proto_binary_fetched_bit 0
proto_binary_fetched_tinyint 0
proto_binary_fetched_short 0
proto_binary_fetched_int24 0
proto_binary_fetched_int 0
proto_binary_fetched_bigint 0
proto_binary_fetched_decimal 0
proto_binary_fetched_float 0
proto_binary_fetched_double 0
proto_binary_fetched_date 0
proto_binary_fetched_year 0
proto_binary_fetched_time 0
proto_binary_fetched_datetime 0
proto_binary_fetched_timestamp 0
proto_binary_fetched_string 0
proto_binary_fetched_blob 0
proto_binary_fetched_enum 0
proto_binary_fetched_set 0
proto_binary_fetched_geometry 0
proto_binary_fetched_other 0
init_command_executed_count 0
init_command_failed_count 0
com_quit 0
com_init_db 0
com_query 0
com_field_list 0
com_create_db 0
com_drop_db 0
com_refresh 0
com_shutdown 0
com_statistics 0
com_process_info 0
com_connect 0
com_process_kill 0
com_debug 0
com_ping 0
com_time 0
com_delayed_insert 0
com_change_user 0
com_binlog_dump 0
com_table_dump 0
com_connect_out 0
com_register_slave 0
com_stmt_prepare 0
com_stmt_execute 0
com_stmt_send_long_data 0
com_stmt_close 0
com_stmt_reset 0
com_stmt_set_option 0
com_stmt_fetch 0
com_deamon 0
bytes_received_real_data_normal 0
bytes_received_real_data_ps 0

example statistics
stat1 0
stat2 0

pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 8.37 2015-04-28

Directive Local Value Master Value
pcre.backtrack_limit 1000000 1000000
pcre.recursion_limit 100000 100000

Reflection
Reflection enabled
Version $Id: f6367cdb4e3f392af4a6d441a6641de87c2e50c4 $

SPL
SPL support enabled
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

standard
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
from no value no value
url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
user_agent no value no value

xml
XML Support active
XML Namespace Support active
libxml2 Version 2.9.3

Additional Modules
Module Name

Environment
Variable Value
HOME /nonexistent
USER www

PHP Variables
Variable Value
_SERVER["HOME"] /nonexistent
_SERVER["USER"] www
_SERVER["FCGI_ROLE"] RESPONDER
_SERVER["SCRIPT_FILENAME"] /usr/local/www/nginx/info.php
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_METHOD"] GET
_SERVER["CONTENT_TYPE"] no value
_SERVER["CONTENT_LENGTH"] no value
_SERVER["SCRIPT_NAME"] /info.php
_SERVER["REQUEST_URI"] /info.php
_SERVER["DOCUMENT_URI"] /info.php
_SERVER["DOCUMENT_ROOT"] /usr/local/www/nginx
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_SOFTWARE"] nginx/1.8.0
_SERVER["REMOTE_ADDR"] 192.168.0.133
_SERVER["REMOTE_PORT"] 51233
_SERVER["SERVER_ADDR"] 192.168.0.158
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_NAME"] 192.168.0.158
_SERVER["REDIRECT_STATUS"] 200
_SERVER["HTTP_HOST"] 192.168.0.158
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["HTTP_CACHE_CONTROL"] max-age=0
_SERVER["HTTP_ACCEPT"] text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
_SERVER["HTTP_UPGRADE_INSECURE_REQUESTS"] 1
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate, sdch
_SERVER["HTTP_ACCEPT_LANGUAGE"] nb-NO,nb;q=0.8,no;q=0.6,nn;q=0.4,en-US;q=0.2,en;q=0.2
_SERVER["PHP_SELF"] /info.php
_SERVER["REQUEST_TIME_FLOAT"] 1449911600.6719
_SERVER["REQUEST_TIME"] 1449911600

PHP License
```


----------



## Psypro (Dec 12, 2015)

error

```
2015/12/12 10:11:06 [notice] 622#0: OS: FreeBSD 11.0-CURRENT
2015/12/12 10:11:06 [notice] 622#0: kern.osreldate: 1100090, built on 1100091
2015/12/12 10:11:06 [notice] 622#0: hw.ncpu: 2
2015/12/12 10:11:06 [notice] 622#0: net.inet.tcp.sendspace: 32768
2015/12/12 10:11:06 [notice] 622#0: kern.ipc.somaxconn: 128
2015/12/12 10:11:06 [notice] 622#0: getrlimit(RLIMIT_NOFILE): 116919:116919
2015/12/12 10:11:06 [notice] 623#0: start worker processes
2015/12/12 10:11:06 [notice] 623#0: start worker process 624
2015/12/12 10:11:06 [notice] 623#0: start worker process 625
2015/12/12 10:11:06 [notice] 623#0: signal 23 (SIGIO) received
2015/12/12 10:11:26 [error] 625#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Class 'DOMDocument' not found in /usr/local/www/nginx/includes/cache/LocalisationCache.php on line 653" while reading response header from ups$
```


----------



## Psypro (Dec 12, 2015)

I think I am making progress. At least a different error now.
Still php error.
I have since last 
`pkg install php5-dom`

error

```
2015/12/12 11:10:25 [notice] 626#0: OS: FreeBSD 11.0-CURRENT
2015/12/12 11:10:25 [notice] 626#0: kern.osreldate: 1100090, built on 1100091
2015/12/12 11:10:25 [notice] 626#0: hw.ncpu: 2
2015/12/12 11:10:25 [notice] 626#0: net.inet.tcp.sendspace: 32768
2015/12/12 11:10:25 [notice] 626#0: kern.ipc.somaxconn: 128
2015/12/12 11:10:25 [notice] 626#0: getrlimit(RLIMIT_NOFILE): 116919:116919
2015/12/12 11:10:25 [notice] 627#0: start worker processes
2015/12/12 11:10:25 [notice] 627#0: start worker process 628
2015/12/12 11:10:25 [notice] 627#0: start worker process 629
2015/12/12 11:10:25 [notice] 627#0: signal 23 (SIGIO) received
2015/12/12 11:10:40 [error] 629#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning:  phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timez$
2015/12/12 11:10:49 [error] 629#0: *4 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function session_id() in /usr/local/www/nginx/includes/installer/WebInstaller.php on line 338" while reading response header$
2015/12/12 11:10:56 [error] 629#0: *4 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function session_id() in /usr/local/www/nginx/includes/installer/WebInstaller.php on line 338" while reading response header$
2015/12/12 11:18:17 [error] 629#0: *9 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function session_id() in /usr/local/www/nginx/includes/installer/WebInstaller.php on line 338" while reading response header$
```


----------



## Psypro (Dec 12, 2015)

Giving up for now. Anybody?


----------



## abishai (Dec 12, 2015)

www/php5-session But I recommend not to use deprecated php versions and 11-CURRENT


----------



## Psypro (Dec 12, 2015)

Thank you. You got me one more step forward 

Now, working with errors that display from the mediawiki install page:






*Fatal:* PHP must be compiled with support for the Ctype extension.







*Fatal:* PHP must be compiled with support for the iconv extension.


----------



## Psypro (Dec 12, 2015)

The environment has been checked. You can install MediaWiki.


----------



## abishai (Dec 12, 2015)

textproc/php5-ctype
converters/php5-iconv


----------



## Psypro (Dec 12, 2015)

abishai said:


> www/php5-session But I recommend not to use deprecated php versions and 11-CURRENT



This is only for learning. But tell me more so I can learn more.

What do you mean with : deprecated

I should rather use Freebsd 10 since that gets regular securty patch, and is more stable, if it was for a real prosjekt?


----------



## abishai (Dec 12, 2015)

In production you should use supported versions of OS and used sofware, so
1. Supported versions of FreeBSD are https://www.freebsd.org/security/security.html#sup You should never use 11-CURRENT in production, because it can be unstable from time to time and slow, as it has debugging code enabled (kernel recompile is needed to switch it off). Stick to *releng* versions.
2. php5 is a 5.4 branch. It will be EOL on upstream soon, leaving your site exposed to security flaws. You should use *php56* prefixed versions now. (Make sure you uninstall old php5 extentions and php5 itself if you want to upgrade - mixing old and new extentions is the fastest way to have troubles.


----------



## Psypro (Dec 12, 2015)

Had one more error. Could not login or create users.
Installed: php5-hash: 5.4.45
Now I think everything works.


----------

