• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    PHP Fatal Error call to undefined function

    Scheduled Pinned Locked Moved Solved
    Linux Problems
    3
    13
    2.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.
    • E
      Edwards07256
      last edited by

      Hey Everyone,

      I just started setting up my FOG server. I am running into an error in the installation process. I am at the point where I need to connect to the dashboard. I type in the correct link, and I get a blank white page. http://IPHERE/fog/management/

      I am on Ubuntu 21.10
      Using the current dev branch of FOG (Just set it up today)

      I searched through the apache logs (tail -n 100 /var/log/apache2/error.log) and I see this message:

      [Wed Jul 20 14:11:46.678762 2022] [proxy_fcgi:error] [pid 12964] [client 10.17.11.132:49692] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function _() in /var/www/html/fog/commons/init.php:439\nStack trace:\n#0 /var/www/html/fog/commons/init.php(306): Initiator::_extCheck()\n#1 /var/www/html/fog/commons/base.inc.php(46): Initiator::startInit()\n#2 /var/www/html/fog/management/index.php(22): require('...')\n#3 {main}\n  thrown in /var/www/html/fog/commons/init.php on line 439'
      

      I saw this on a similar forum post so thought I would share my installed PHP packages as well.

      ii  libapache2-mod-php8.0                      8.0.8-1ubuntu0.4                             amd64        server-side, HTML-embedded scripting language (Apache 2 module)
      ii  php-cli                                    2:8.0+82~0build1                             all          command-line interpreter for the PHP scripting language (default)
      ii  php-common                                 2:82~0build1                                 all          Common files for PHP packages
      ii  php-mbstring                               2:8.0+82~0build1                             all          MBSTRING module for PHP [default]
      ii  php-pear                                   1:1.10.12+submodules+notgz+20210212-1ubuntu1 all          PEAR Base System
      ii  php-php-gettext                            1.0.12-4                                     all          read gettext MO files directly, without requiring anything other than PHP
      ii  php-xml                                    2:8.0+82~0build1                             all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
      ii  php8.0                                     8.0.8-1ubuntu0.4                             all          server-side, HTML-embedded scripting language (metapackage)
      ii  php8.0-bcmath                              8.0.8-1ubuntu0.4                             amd64        Bcmath module for PHP
      ii  php8.0-cli                                 8.0.8-1ubuntu0.4                             amd64        command-line interpreter for the PHP scripting language
      ii  php8.0-common                              8.0.8-1ubuntu0.4                             amd64        documentation, examples and common module for PHP
      ii  php8.0-curl                                8.0.8-1ubuntu0.4                             amd64        CURL module for PHP
      ii  php8.0-fpm                                 8.0.8-1ubuntu0.4                             amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
      ii  php8.0-gd                                  8.0.8-1ubuntu0.4                             amd64        GD module for PHP
      ii  php8.0-ldap                                8.0.8-1ubuntu0.4                             amd64        LDAP module for PHP
      ii  php8.0-mbstring                            8.0.8-1ubuntu0.4                             amd64        MBSTRING module for PHP
      ii  php8.0-mysql                               8.0.8-1ubuntu0.4                             amd64        MySQL module for PHP
      ii  php8.0-opcache                             8.0.8-1ubuntu0.4                             amd64        Zend OpCache module for PHP
      ii  php8.0-readline                            8.0.8-1ubuntu0.4                             amd64        readline module for PHP
      ii  php8.0-xml                                 8.0.8-1ubuntu0.4                             amd64        DOM, SimpleXML, XML, and XSL module for PHP
      
      

      Am I doing something incorrectly?

      Thanks!!

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @Edwards07256
        last edited by

        @edwards07256 The short answer is that php8 is not currently supported by fog even using the dev branch. If you use Ubuntu 20.04 (last LTS branch before 22.04). FOG doesn’t support 22.04 yet. FOG will install correctly. Upgrading from PHP7 to PHP8 is a complex process and was not ready in the dev branch before the developers went on a summer break.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        E 1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by

          @Edwards07256 @george1421 If I remember correctly dev-branch should be pretty much ready to run on Ubuntu 22.04 with PHP 8.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 1
          • E
            Edwards07256 @george1421
            last edited by

            @george1421 Thanks for the reply! I will go ahead and re-image with 20.04!

            Appreciate the quick support!!!

            george1421G 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @Edwards07256
              last edited by

              @edwards07256 said in PHP Fatal Error call to undefined function:

              I will go ahead and re-image with 20.04

              For right now I think this is the best choice to get you a stable FOG platform up and running quickly.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              E 1 Reply Last reply Reply Quote 0
              • E
                Edwards07256 @george1421
                last edited by

                @george1421 I got it up and running in an enterprise environment. I have a new question if you don’t mind.

                I want to have it isolated from my production environment. If I were to hook the server up to a L2 switch, set static IP of the server, set up DHCP using FOG, would this work?

                I would prefer it isolated just in case someone in my company randomly decides to mess with BIOS and PXE boots 🙂

                Appreciate the help once again!

                george1421G 1 Reply Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @Edwards07256
                  last edited by george1421

                  @edwards07256 said in PHP Fatal Error call to undefined function:

                  I want to have it isolated from my production environment. If I were to hook the server up to a L2 switch, set static IP of the server, set up DHCP using FOG, would this work?

                  FOG doesn’t like changing of the host OS’ IP address after FOG is installed. So what I would do is this. Create a new VM with 2 network interfaces. (You could salvage your current FOG server by changing the IP of the primary network interface to the imaging lan IP, add a new business network LAN interface, then rename the /opt/fog/.fogsettings file to reset the questions initially asked -or- just spin up a new server). Setup one interface for your imaging network and defined the ip address range. The second interface will be internet facing (needed to install fog only). You will define a default route on this interface (not your imaging network interface). Then reinstall FOG. Once of the questions when you initially install FOG is do you want to enable the dhcp server. Then you can set it up as requested. Post install you can use that business LAN interface for managing the FOG server.

                  I would prefer it isolated just in case someone in my company randomly decides to mess with BIOS and PXE boots

                  FWIW you still need a fog server account to deploy an image. As a point of reference in my organization we don’t pxe boot through the fog server. We force the IT tech’s to sit in front of the system and press F12 while booting to select PXE boot to get into FOG. This way it adds just one more layer of protection to insulate the users from themselves.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  E 1 Reply Last reply Reply Quote 0
                  • E
                    Edwards07256 @george1421
                    last edited by Edwards07256

                    @george1421 Taking your advice and just reinstalling it. I didn’t go the VM route, still using the same machine. I have my two interfaces setup. One internet facing and on just through my L2 switch. I set static IP and mask on the L2 interface. Internet facing interface has DHCP IP.

                    When you said: Setup one interface for your imaging network and defined the ip address range. The second interface will be internet facing (needed to install fog only). You will define a default route on this interface (not your imaging network interface).

                    So for the isolated interface I have it setup. But for the ‘default route’ on the internet facing interface, would that be my default gateway in my environment? Or what do you mean by default route?

                    Sorry for the questions here I am kind of familiar with networking but not really at an advanced level.

                    george1421G 1 Reply Last reply Reply Quote 0
                    • george1421G
                      george1421 Moderator @Edwards07256
                      last edited by

                      @edwards07256 said in PHP Fatal Error call to undefined function:

                      When you said: Setup one interface for your imaging network and defined the ip address range. The second interface will be internet facing (needed to install fog only). You will define a default route on this interface (not your imaging network interface).

                      So for the isolated interface I have it setup. But for the ‘default route’ on the internet facing interface, would that be my default gateway in my environment? Or what do you mean by default route?

                      I can answer these both questions at one time. For your imaging network, don’t enter a value for default gateway. In this instance there will be no way to leave the imaging network, so a gateway isn’t needed.

                      On your business lan, define a gateway value, this tells the fog server how to get to the internet during installation to get the needed repo packages. This way the fog server will use the business lan interface to get to the internet (because it has a default route [path] value, and the imaging lan is a dead end [route wise])

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                      E 2 Replies Last reply Reply Quote 0
                      • E
                        Edwards07256 @george1421
                        last edited by

                        @george1421 Awesome I see what you mean! I got it up and running now!!

                        Thanks once again! I will dive into the imaging process and I hope I can get through it with no issues. Appreciate the help!

                        1 Reply Last reply Reply Quote 0
                        • E
                          Edwards07256 @george1421
                          last edited by

                          @george1421 Hey George sorry for bothering you once again. I ran into issues PXE booting on my device and had to recompile iPXE and that ended up working.

                          But now, I get to the point where I see the main FOG screen and have the options to register and everything else. But after 5 or so seconds at that screen it tries to connect to a server in my production environment for some reason?? Just as a reminder I am using FOG within a completely isolated environment, and there should be no link to the main production environment. I verified this through the .fogsettings and DHCP config. There is no mention of the IP it is trying to reach anywhere in any of my configs.

                          With that being said when I first started playing around with FOG I did have it connected to my environment. Could there still be some setting that I haven’t wiped?

                          The server / device it is trying to reach is http://IPHERE/fog/service/ipxe/bg.png

                          Have any ideas on this one?

                          I can paste in my DHCP.conf and .fogsettings but I can tell you 100% there is no mention of this address anywhere I can see.

                          george1421G 1 Reply Last reply Reply Quote 0
                          • george1421G
                            george1421 Moderator @Edwards07256
                            last edited by

                            @edwards07256 said in PHP Fatal Error call to undefined function:

                            The server / device it is trying to reach is http://IPHERE/fog/service/ipxe/bg.png

                            If you have not done this yet, In the WebUI go to FOG Configuration -> FOG Settings hit the expand all button. Search for the old IP address.

                            Where it is erroring out is trying to load the background image for the fog ipxe menu. This should pull the image from the fog server.

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                            E 1 Reply Last reply Reply Quote 0
                            • E
                              Edwards07256 @george1421
                              last edited by

                              @george1421 Hey George, sorry I didn’t reply yesterday. I did get everything running successfully. Captured an image and deploying image right now! Appreciate all your help! Not sure how to mark this is as solved but its working!

                              1 Reply Last reply Reply Quote 0
                              • 1 / 1
                              • First post
                                Last post

                              159

                              Online

                              12.0k

                              Users

                              17.3k

                              Topics

                              155.2k

                              Posts
                              Copyright © 2012-2024 FOG Project