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

    Error "Fatal error: Uncaught Error: Call to undefined function gettext() in /usr/local/www/index.php:34 Stack trace: #0 {main} thrown in /usr/local/www/index.php on line 34"

    Scheduled Pinned Locked Moved General pfSense Questions
    28 Posts 7 Posters 8.7k Views
    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.
    • E
      emil
      last edited by

      I am getting this error today when log in to firewall almost on each pfsense , does anybody knows what is causing it? "Fatal error: Uncaught Error: Call to undefined function gettext() in /usr/local/www/index.php:34 Stack trace: #0 {main} thrown in /usr/local/www/index.php on line 34" Thank you.

      1 Reply Last reply Reply Quote 0
      • pfrickrollP
        pfrickroll
        last edited by

        I have the same thing 13 out of 25 pfsense have this error.

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          So this just started randomly without making any changes?

          What version(s) are you running on these systems?

          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • E
            emil
            last edited by

            @jimp said in Error "Fatal error: Uncaught Error: Call to undefined function gettext() in /usr/local/www/index.php:34 Stack trace: #0 {main} thrown in /usr/local/www/index.php on line 34":

            So this just started randomly without making any changes?

            Yes it started just this morning on most of our Netgate SG-3100 firewalls. We are on the latest pfSense 2.4.4-RELEASE-p3 version. If I connect to firewall with ssh and enter 16) Restart PHP-FPM from console all is good again, but after few minutes error is back again.

            1 Reply Last reply Reply Quote 0
            • E
              eli
              last edited by

              We started getting the same thing yesterday around 4 pm pacific time. It started on about 15 then was up to 20 by last night. We are now at 37 of 60 of our firewalls that are doing it. Exact same error when trying to login to GUI. passing traffic and reporting to Solarwinds. But cant manage or hit via vpn.

              Most of our firewalls are on 2.4.4 P2

              No updates or config was done it just happened out of nowhere.

              1 Reply Last reply Reply Quote 0
              • pfrickrollP
                pfrickroll
                last edited by

                Yup started this morning, no changed been made in last 3 months.

                1 Reply Last reply Reply Quote 0
                • rbgargaR
                  rbgarga Developer Netgate Administrator
                  last edited by

                  Could you please paste the output of the following command on one of these broken firewalls?

                  head -n 40 /etc/rc.php_ini_setup

                  Renato Botelho

                  E 1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    @CDestiny said in Error "Fatal error: Uncaught Error: Call to undefined function gettext() in /usr/local/www/index.php:34 Stack trace: #0 {main} thrown in /usr/local/www/index.php on line 34":

                    Having this issue also, here is a crashdump got, it almost looks like the storage dropped out, it cannot find its own files?!?!

                    That's not related, start a new thread.

                    Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply Reply Quote 0
                    • E
                      emil @rbgarga
                      last edited by

                      @rbgarga
                      #!/bin/sh

                      rc.php_ini_setup

                      part of pfSense (https://www.pfsense.org)

                      Copyright (c) 2014-2018 Rubicon Communications, LLC (Netgate)

                      All rights reserved.

                      Licensed under the Apache License, Version 2.0 (the "License");

                      you may not use this file except in compliance with the License.

                      You may obtain a copy of the License at

                      http://www.apache.org/licenses/LICENSE-2.0

                      Unless required by applicable law or agreed to in writing, software

                      distributed under the License is distributed on an "AS IS" BASIS,

                      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

                      See the License for the specific language governing permissions and

                      limitations under the License.

                      Set our operating platform

                      VERSION=/bin/cat /etc/version
                      MIN_REALMEM_FOR_OPCACHE=512

                      if pkg-static info -e php72; then
                      PHP_VER=7
                      EXTENSIONSDIR="/usr/local/lib/php/20170718/"
                      else
                      PHP_VER=5
                      EXTENSIONSDIR="/usr/local/lib/php/20131226/"
                      fi

                      Grab amount of memory that is detected

                      if [ -f /var/log/dmesg.boot ]; then
                      AVAILMEM=/bin/cat /var/log/dmesg.boot |/usr/bin/awk '/avail memory/ { memory=($4 / 1048576); printf("%0.0f\n", memory); exit}'
                      else
                      AVAILMEM=/sbin/dmesg -a |/usr/bin/awk '/avail memory/ { memory=($4 / 1048576); printf("%0.0f\n", memory); exit}'
                      fi

                      rbgargaR 1 Reply Last reply Reply Quote 0
                      • rbgargaR
                        rbgarga Developer Netgate Administrator @emil
                        last edited by

                        @emil It looks correct. What happens if you execute that script?

                        /etc/rc.php_ini_setup

                        Renato Botelho

                        E 1 Reply Last reply Reply Quote 0
                        • E
                          emil @rbgarga
                          last edited by

                          @rbgarga

                          Here is crash report PHP_errors.zip

                          rbgargaR 1 Reply Last reply Reply Quote 0
                          • rbgargaR
                            rbgarga Developer Netgate Administrator @emil
                            last edited by

                            @emil can you share /etc/rc.php_ini_setup with me? even send it to my email renato at netgate dot com.

                            and please confirm which pfSense version you are running

                            Renato Botelho

                            E 1 Reply Last reply Reply Quote 0
                            • E
                              emil @rbgarga
                              last edited by

                              @rbgarga Yes will send it to you.

                              1 Reply Last reply Reply Quote 0
                              • rbgargaR
                                rbgarga Developer Netgate Administrator
                                last edited by

                                Can someone try these commands on shell of a broken system and let me know if it fixes the issue?

                                # pkg update -f
                                # pkg upgrade -f pfSense-repo
                                # pkg info | grep pfSense-repo
                                
                                at this moment make sure it's running version 2.4.4_7 of this package
                                
                                # /etc/rc.php_ini_setup
                                

                                Renato Botelho

                                E 1 Reply Last reply Reply Quote 1
                                • E
                                  eli
                                  last edited by

                                  We are loading up a fresh install on a box we have at our office. Will be heading out to first site with the issue in about an hour. I can run the scripts on the shell when I get hands on the box and will let you know the results.

                                  Also the same site, we had our customer reboot the box. It came back up for about 10 minutes then went back into same error state.

                                  E 1 Reply Last reply Reply Quote 0
                                  • E
                                    emil @eli
                                    last edited by

                                    @eli This is exactly what we are experiencing here almost on all pfSense firewalls. After firewall or PHP-FPM restart error is back like in 10 minutes.

                                    1 Reply Last reply Reply Quote 0
                                    • E
                                      emil @rbgarga
                                      last edited by

                                      I have ran commands and restarted PHP-FPM in console option 16. All is working good so far.

                                      pkg update -f

                                      pkg upgrade -f pfSense-repo

                                      pkg info | grep pfSense-repo

                                      at this moment make sure it's running version 2.4.4_7 of this package

                                      /etc/rc.php_ini_setup

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        What pfSense packages did you have installed anyone who hit this?

                                        Anything unusual?

                                        Steve

                                        1 Reply Last reply Reply Quote 0
                                        • E
                                          emil
                                          last edited by

                                          Just Cron.

                                          rbgargaR 1 Reply Last reply Reply Quote 0
                                          • rbgargaR
                                            rbgarga Developer Netgate Administrator @emil
                                            last edited by

                                            @emil Do you have any extra item on your crontab?

                                            Renato Botelho

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