Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Adding php extension to to pfsense?

    Problems Installing or Upgrading pfSense Software
    2
    7
    1.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • perikoP
      periko
      last edited by

      Hi, if this questions goes into other category please move it didn't know the right one.

      I had a simple question, I need a specific php-extension which I already build under a freebsd box for my arch.

      Now I'm trying to understand how can I add this extenstion to pfsense->php?

      Running pfsense 2.2.2 i386, thanks!!!

      Necesitan Soporte de Pfsense en México?/Need Pfsense Support in Mexico?
      www.bajaopensolutions.com
      https://www.facebook.com/BajaOpenSolutions
      Quieres aprender PfSense, visita mi canal de youtube:
      https://www.youtube.com/c/PedroMorenoBOS

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by

        Maybe a guideline : https://forum.pfsense.org/index.php?topic=46928.msg247850#msg247850

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • perikoP
          periko
          last edited by

          Is not working, on that case they are adding a package, I build the extension only.
          same php 5.5.x from a freebsd 10.1 box.

          What I have done but still not loading.

          1. copy the mysqli.so to /usr/local/lib/php/2012../
          2. change rights
            chmod 555 mysqli.so
          3. touch /etc/php_dynamicmodules/mysqli
          4. run /etc/rc.php_ini_setup

          no warnings like they show, I'm not running pkg add command.

          Latter I add the module into rc.php_ini_setup:

          PHPMODULES="$PHPMODULES mysqli"

          run again:

          []quote
          /etc/rc.php_ini_setup

          no warnings.

          but not loading, don't see any error or warning.

          ???

          Necesitan Soporte de Pfsense en México?/Need Pfsense Support in Mexico?
          www.bajaopensolutions.com
          https://www.facebook.com/BajaOpenSolutions
          Quieres aprender PfSense, visita mi canal de youtube:
          https://www.youtube.com/c/PedroMorenoBOS

          1 Reply Last reply Reply Quote 0
          • perikoP
            periko
            last edited by

            I had check the file info, don't know if this helps:

            [2.2.2-RELEASE][root@–-]/usr/local/lib/php/20121212: file mysqli.so
            mysqli.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped

            [2.2.2-RELEASE][root@–]/usr/local/lib/php/20121212: file mysql.so
            mysql.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), dynamically linked, stripped

            Necesitan Soporte de Pfsense en México?/Need Pfsense Support in Mexico?
            www.bajaopensolutions.com
            https://www.facebook.com/BajaOpenSolutions
            Quieres aprender PfSense, visita mi canal de youtube:
            https://www.youtube.com/c/PedroMorenoBOS

            1 Reply Last reply Reply Quote 0
            • perikoP
              periko
              last edited by

              I had this error:

              mysqli did not load correctly.  Removing from php.ini…
              mysqli did not load correctly.  Removing from php.ini...

              Now, I have to see why is rejecting the module.

              I just add mysql-client-5.1 running pkg_add.

              Necesitan Soporte de Pfsense en México?/Need Pfsense Support in Mexico?
              www.bajaopensolutions.com
              https://www.facebook.com/BajaOpenSolutions
              Quieres aprender PfSense, visita mi canal de youtube:
              https://www.youtube.com/c/PedroMorenoBOS

              1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan
                last edited by

                I understand it that /usr/local/lib/php/20121212/mysql.so is already present and you want the add mysqli support.

                I don't no enough about PHP, but could it be possible that PHP itself (PHP Version 5.5.23) should be recompiled before it accepts including mysqli ?

                I just managed to activate the mysql support (mysql, not mysqli).

                Building and extension myself: never tried.

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                1 Reply Last reply Reply Quote 0
                • perikoP
                  periko
                  last edited by

                  MySQL can enable is there, but  I need MySQLi, I'm trying to see what else I need, maybe some libraries but not much debug info I have, if some else  have something to add I will appreciated.
                  Thanks Gertjan.

                  Necesitan Soporte de Pfsense en México?/Need Pfsense Support in Mexico?
                  www.bajaopensolutions.com
                  https://www.facebook.com/BajaOpenSolutions
                  Quieres aprender PfSense, visita mi canal de youtube:
                  https://www.youtube.com/c/PedroMorenoBOS

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.