Issue pfsense + phpmyadmin



  • hello everybody,

    I'm Frenchman so excuse me for my bad English. Be tolerant about this post too because it's my first on this forum.

    I have to install a captive portal pfsense with a self registration solution and phpmyadmin to administrate databases within my course at high school.
    I installed pfsense 2.2.6-release on a VM working on Virtualbox. My version of freebsd is 10.1-release. My phpmyadmin version is 4.5.5
    I succeed to install and configure the captive portal pfsense. Then i followed this tutorial to install phpmyadmin.

    http://www.unixmen.com/install-apache-mariadb-php-freebsd10/
    http://www.unixmen.com/install-latest-phpmyadmin-freebsd-10/

    Because of the confines of my project, i installed MySQL instead of MariaDB.
    My issues have come with the installation of php packets. i noticed that the tutorial means that there is issue with the 5.5 version of php. So i tried with the 5.6 but it's created a lot of issue. So that means i Installed the 5.5 version. But there were a error message yet.

    :  Warning: Illegal string offset 'alias' in /etc/inc/util.inc on line 1401

    I continued to install phpmyadmin despite of this error. Finally i succeed to install phpmyadmin, i can write on the database. But now the captive portal is not working now. When i access to the web configurator i have multiple error message on the dashboard like this (go to dashboard.png).

    Can anybody help me please ?

    here my /usr/local/etc/php.ini file

    
    ; File generated from /etc/rc.php_ini_setup
    output_buffering = "0"
    expose_php = Off
    implicit_flush = true
    magic_quotes_gpc = Off
    max_execution_time = 900
    max_input_time = 1800
    register_argc_argv = On
    register_long_arrays = Off
    variables_order = "GPCS"
    file_uploads = On
    upload_tmp_dir = /tmp
    upload_max_filesize = 200M
    post_max_size = 200M
    html_errors = Off
    zlib.output_compression = Off
    zlib.output_compression_level = 1
    include_path = ".:/etc/inc:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg"
    display_startup_errors=on
    display_errors=on
    log_errors=on
    error_log=/tmp/PHP_errors.log
    extension_dir=/usr/local/lib/php/20121212/
    date.timezone="Europe/Paris"
    
    ; Extensions
    
    extension=apc.so
    extension=xml.so
    extension=dom.so
    extension=simplexml.so
    extension=xmlreader.so
    extension=xmlwriter.so
    extension=curl.so
    extension=gettext.so
    extension=ldap.so
    extension=openssl.so
    extension=pcntl.so
    extension=hash.so
    extension=mcrypt.so
    extension=posix.so
    extension=readline.so
    extension=session.so
    extension=suhosin.so
    extension=ctype.so
    extension=mbstring.so
    extension=shmop.so
    extension=zlib.so
    extension=pdo.so
    extension=sqlite3.so
    extension=radius.so
    extension=zmq.so
    extension=ssh2.so
    extension=pfSense.so
    extension=json.so
    extension=bcmath.so
    extension=filter.so
    
    ; APC Settings
    apc.enabled="1"
    apc.enable_cli="0"
    apc.shm_size="50M"
    
    [suhosin]
    suhosin.get.max_array_depth = 5000
    suhosin.get.max_array_index_length = 256
    suhosin.get.max_vars = 5000
    suhosin.get.max_value_length = 500000
    suhosin.post.max_array_depth = 5000
    suhosin.post.max_array_index_length = 256
    suhosin.post.max_vars = 5000
    suhosin.post.max_value_length = 500000
    suhosin.request.max_array_depth = 5000
    suhosin.request.max_array_index_length = 256
    suhosin.request.max_vars = 5000
    suhosin.request.max_value_length = 500000
    suhosin.memory_limit = 512435456
    
    

    the part of the /usr/local/www/guiconfig.inc file. ( the place were is the error )

    /* make sure nothing is cached */
    if (!$omit_nocacheheaders) {
            header("Expires: 0");                                                                                          /*ligne 48*/
            header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
            header("Cache-Control: no-store, no-cache, must-revalidate");
            header("Cache-Control: post-check=0, pre-check=0", false);
            header("Pragma: no-cache");
    }
    
    header("X-Frame-Options: SAMEORIGIN");                                                         /*ligne 55*/
    require_once("authgui.inc");
    
    

    and then the /etc/inc/util.inc file with the error at the line 1401.

    
    if (is_array($config['aliases']['alias'])) {                              /*ligne 1401*/ 
                    foreach ($config['aliases']['alias'] as $alias) {
                            if ($alias['name'])
                                    $aliastable[$alias['name']] = $alias['address'$
                    }
            }
    
    

    Thanks in advance to everybody who may able to give me responses. Tell me if i missed an information or a configuration file if it can helps you.

    Cheers
    ![192.168.78.254 - PuTTY_001.png](/public/imported_attachments/1/192.168.78.254 - PuTTY_001.png)
    ![192.168.78.254 - PuTTY_001.png_thumb](/public/imported_attachments/1/192.168.78.254 - PuTTY_001.png_thumb)



  • You can't change PHP or you'll break things. phpmyadmin doesn't belong on your firewall regardless, but if you must, and need PHP 5.6, you'll have to run a 2.3 snapshot.



  • Can i know what command that you use to install mysql on pfsense