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

[Rev 4201] blank page when trying to install/update database schema

Scheduled Pinned Locked Moved Solved
FOG Problems
8
55
25.9k
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.
  • S
    Stefan Kaegi
    last edited by Nov 2, 2015, 8:47 AM

    That’s how I update:

    cd /root/
    svn checkout https://svn.code.sf.net/p/freeghost/code/trunk
    cd trunk/bin/
    ./installfog.sh
    

    How can I see which version my cloud has?
    I updated today to Rev 4270. Seems like I have a new problem now. The Fog Installer stops at the following point:

    ....
     * Enabling apache and fpm services on boot....................OK
     * Creating SSL Certificate....................................OK
     * Creating auth pub key and cert..............................OK
     * Resetting SSL Permissions...................................OK
     * Setting up SSL FOG Server...................................OK
     * Restarting Apache2 for fog vhost............................OK
     * Changing permissions on apache log files....................OK
     * Backing up database.........................................Failed!
    

    I added the line ‘protected $debug = true;’ to my FOGBase.class.php in section ‘abstract class FOGBase’
    Now my Apache error log shows:

    [Mon Nov 02 09:46:50 2015] [error] [client 172.30.34.61] PHP Fatal error:  Cannot redeclare FOGBase::$debug in /var/www/html/fog/lib/fog/FOGBase.class.php on line 5
    [Mon Nov 02 09:46:50 2015] [error] [client 172.20.60.31] PHP Fatal error:  Cannot redeclare FOGBase::$debug in /var/www/html/fog/lib/fog/FOGBase.class.php on line 5
    [Mon Nov 02 09:46:50 2015] [error] [client 172.20.60.31] PHP Fatal error:  Cannot redeclare FOGBase::$debug in /var/www/html/fog/lib/fog/FOGBase.class.php on line 5
    

    Line 5 is where i added the line.

    1 Reply Last reply Reply Quote 0
    • S
      Stefan Kaegi
      last edited by Nov 2, 2015, 8:52 AM

      My changed FOGBase.class.php file:
      FOGBase.class.php

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Nov 2, 2015, 9:07 AM

        @Stefan-Kaegi said:

        I added the line ‘protected $debug = true;’ to my FOGBase.class.php in section ‘abstract class FOGBase’

        PHP is not happy if you add another variable with the same name. Just change the value from ‘false’ to ‘true’. Don’t worry about it being ‘public’ or ‘protected’. This was changed by Tom at some point. Just change its value and see what you get.

        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 0
        • S
          Stefan Kaegi
          last edited by Nov 2, 2015, 11:11 AM

          I changed FOGBase.class.php as you described. Here is my Apache Error Log as it looks now:
          error.log

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Nov 2, 2015, 11:45 AM

            If something goes wrong with the database connection you should be seeing this on the web interface (top left). Like this:
            debug_output.png

            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
            • S
              Stefan Kaegi
              last edited by Nov 3, 2015, 6:40 AM

              I don’t see anything on the webinterface. Still a blank page.

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by Nov 3, 2015, 9:46 AM

                I am kind of lost with this. Apache error log tells us that it cannot issue a query from a null object which means that the DB object is not properly initialized. But why don’t you see any errors from the inizialisation code?? @Tom-Elliott Any ideas?

                The “Backing up database” issue should be solved as far as I know. Please update and try again. After running the installer your changes in /var/www/html/fog/lib/fog/FOGBase.class.php will be lost. You might want to enable debug again and see what you get.

                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 0
                • S
                  Stefan Kaegi
                  last edited by Nov 3, 2015, 10:01 AM

                  I updated again to Rev 4278 . But the Installer stills stopps at ‘Backing up database’.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by Sebastian Roth Nov 3, 2015, 4:28 AM Nov 3, 2015, 10:27 AM

                    Wohoo, didn’t pay enough attention when reading this. I had a different issue in mind but it’s unrelated (https://forums.fogproject.org/topic/5972/rev-5020-upgrade-error), sorry for that.

                    “Backing up database” is done via wget requesting a database export from the web interface. Sure this is not working in your case as we still haven’t tracked down the real cause of your grumpy DB connection. So you need to modify the installer script I am afraid. Open trunk/bin/installfog.sh in an editor and see if you can find this lines (should be around 440):

                    ...
                                dots "Backing up database"
                                if [ -d "$backupPath/fog_web_${version}.BACKUP" ]; then
                                    if [ ! -d "$backupPath/fogDBbackups" ]; then
                                        mkdir -p $backupPath/fogDBbackups >/dev/null 2>&1
                                    fi
                                    wget --no-check-certificate -O $backupPath/fogDBbackups/fog_sql...
                                fi
                                errorStat $?
                    ...
                    

                    Simply add a comment sign (#) in front of the wget command, save the file and run the installer again. I hope this time it’ll run till the end.

                    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

                    T 1 Reply Last reply Nov 3, 2015, 10:33 AM Reply Quote 0
                    • T
                      Tom Elliott @Sebastian Roth
                      last edited by Nov 3, 2015, 10:33 AM

                      @Uncle-Frank said:

                      ?
                      …

                      Or maybe update? I added back the db dump code and have the installer using that instead of the php native versions. This should operate as it isn’t passing the db lines into memory. I could be wrong though.

                      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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      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 0
                      • T
                        Tom Elliott
                        last edited by Nov 3, 2015, 10:39 AM

                        This doesn’t make sense. The sqldump code is not the problem. It is the Config.class.php. It’s failing to download the file because it cannot access the db, which seems to be the trend throughout this entire post.

                        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                        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

                        S 1 Reply Last reply Nov 3, 2015, 11:07 AM Reply Quote 0
                        • S
                          Stefan Kaegi
                          last edited by Nov 3, 2015, 11:00 AM

                          After commenting out the wget line the installer run till the end. I didn’t need to change FOGBase.class.php after running the installer. ‘public $debug’ was still set on ‘true’. The Apache Error Log File still looks the same:

                          [Tue Nov 03 12:00:04 2015] [error] [client 172.20.60.23] PHP Fatal error:  Call to a member function query() on null in /var/www/html/fog/lib/fog/FOGCore.class.php on line 310
                          [Tue Nov 03 12:00:04 2015] [error] [client 172.30.60.49] PHP Fatal error:  Call to a member function query() on null in /var/www/html/fog/lib/fog/FOGCore.class.php on line 310
                          [Tue Nov 03 12:00:04 2015] [error] [client 172.20.60.56] PHP Fatal error:  Call to a member function query() on null in /var/www/html/fog/lib/fog/FOGCore.class.php on line 310
                          
                          1 Reply Last reply Reply Quote 0
                          • S
                            Sebastian Roth Moderator @Tom Elliott
                            last edited by Nov 3, 2015, 11:07 AM

                            @Tom-Elliott said:

                            This doesn’t make sense. The sqldump code is not the problem. It is the Config.class.php. It’s failing to download the file because it cannot access the db, which seems to be the trend throughout this entire post.

                            Good point! But why don’t we see any other error messages related to the DB connection??

                            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

                            T 1 Reply Last reply Nov 4, 2015, 12:19 AM Reply Quote 0
                            • W
                              Wayne Workman
                              last edited by Wayne Workman Nov 3, 2015, 4:12 PM Nov 3, 2015, 10:11 PM

                              Is there a DB password set? If so, is the installer correctly reading the password? For instance, special characters like single quotes can totally screw up the reading of the password from /opt/fog/.fogsettings.

                              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!
                              Daily Clean Installation Results:
                              https://fogtesting.fogproject.us/
                              FOG Reporting:
                              https://fog-external-reporting-results.fogproject.us/

                              1 Reply Last reply Reply Quote 0
                              • T
                                Tom Elliott @Sebastian Roth
                                last edited by Nov 4, 2015, 12:19 AM

                                @Sebastian-Roth because it is being returned as null, there isn’t anything to connect.

                                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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                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

                                S 1 Reply Last reply Nov 4, 2015, 7:30 AM Reply Quote 0
                                • S
                                  Sebastian Roth Moderator @Tom Elliott
                                  last edited by Nov 4, 2015, 7:30 AM

                                  @Tom-Elliott said:

                                  because it is being returned as null, there isn’t anything to connect.

                                  Sure! But why don’t we see an error when enabling debug in FOGBase class? We need to have it show errors in case the connection goes wrong. Otherwise we just don’t know… Very hard to debug this kind of stuff with users going forth and back about apache log and all that.

                                  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

                                  T 1 Reply Last reply Nov 4, 2015, 10:35 AM Reply Quote 0
                                  • S
                                    Stefan Kaegi
                                    last edited by Nov 4, 2015, 9:19 AM

                                    A mysql password ist set. Here is my .fogsettings file:
                                    fogsettings

                                    1 Reply Last reply Reply Quote 0
                                    • T
                                      Tom Elliott @Sebastian Roth
                                      last edited by Nov 4, 2015, 10:35 AM

                                      @Sebastian-Roth that’s what I mean. The reason the screen goes blank is it is attempting to use a method that is not available. Debug works if the item still has all the methods available to it. In this particular case, there is no method available to the defined item. So php is failing entirely, as it never gets to use the method as it is not available, at all.

                                      I think maybe visibility is needed?

                                      Let use fogbase as the example. I define all the variables using a reference rather than making a copy of the already existing object. So for all purposes of understanding I can muster.

                                      The DB variable, which makes our connection to the DB available to the entirety of fog. If an item is called requiring the use of an object that hasn’t been instantiated, but calls a method that obviously needs instantiation first, you will get a fatal error on php.

                                      Most of the time this is not the problem, but every once in a while weird things can happen. Only methods that are properly instantiated can access it’s relevant methods.

                                      So DB->query(‘some query’) called before the DB variable has been givin the object it requires will cause blank screen.

                                      I can try to test every possible case but it’s not always so simple either.

                                      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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                      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 0
                                      • S
                                        Sebastian Roth Moderator
                                        last edited by Sebastian Roth Nov 4, 2015, 6:27 AM Nov 4, 2015, 12:26 PM

                                        @Tom-Elliott You know the code a lot better than I do! And I am sure you are right about it failing (blank page) if query is called before DB object being properly initialized. But that’s my point. It should be initialized before and it usually does in most cases. But if it does not, it would be awesome so see an error message straight away. Not sure if it’s possible but we might be able to add a kind of fail-proof check right after initializing and dump an error message in case something went wrong (driver not installed, whatever).

                                        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

                                        T 1 Reply Last reply Nov 6, 2015, 11:47 PM Reply Quote 1
                                        • S
                                          Sebastian Roth Moderator
                                          last edited by Nov 6, 2015, 10:53 PM

                                          Re-reading the thread I saw this…

                                          @Stefan-Kaegi said:

                                          After commenting out the wget line the installer run till the end. I didn’t need to change FOGBase.class.php after running the installer. ‘public $debug’ was still set on ‘true’.

                                          Are you sure the installer propagated the web interface files properly? Could you please post the output of the following commands:

                                          ls -al /var/www
                                          ...
                                          ls -al /var/www/html
                                          ...
                                          ls -al /var/www/html/fog
                                          ...
                                          

                                          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 0
                                          • 1
                                          • 2
                                          • 3
                                          • 2 / 3
                                          2 / 3
                                          • First post
                                            39/55
                                            Last post

                                          263

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project