• 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.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.
  • S
    Stefan Kaegi
    last edited by Oct 28, 2015, 9:52 AM

    I removed php5-mysql and restarted the server. But I still get the blang page. Yes, im still stuck at the database schema updater.
    I attached my apache error log file (last 100 lines) while accessing the web interface.
    error.log
    I get this error every second. Even when i don’t access the webinterface. My current error.log file is 514M at the moment. The previous one is 787M. The ones before are arounc 1-15K.

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Sebastian Roth Oct 28, 2015, 6:20 AM Oct 28, 2015, 12:19 PM

      You see so many errors because your clients also access the web pages to get information. Error is a bit confusing as FOGCore.class.php does not even have 300 lines of code (http://sourceforge.net/p/freeghost/code/HEAD/tree/trunk/packages/web/lib/fog/FOGCore.class.php)!

      PHP Fatal error:  Call to a member function query() on null in /var/www/html/fog/lib/fog/FOGCore.class.php on line 310
      

      Maybe have a look at that file on your server and tell us what’s in line 310 or better try updating again. Are you sure you do checkout/update the full source code when running an update??

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

      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 Oct 28, 2015, 5:37 PM Oct 28, 2015, 11:36 PM

        @Stefan-Kaegi Seams like I was wrong with the mysql package for debian. Please install php5-mysql (which will uninstall php5-mysqlnd instead) by sudo apt-get install php5-mysql

        I hope this will solve the ‘query() on null’ error for you!

        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 Oct 29, 2015, 1:06 AM

          @Stefan-Kaegi said:

          When I run ‘./installfog.sh’ everything looks ok. But when I try to update the database schema via ’http://172.30.40.25/fog/management’ I only see a blank page. I tried to skip the database update and finish the installation. But all i can see now when going to ’http://172.30.40.25/fog’ or ’http://172.30.40.25/fog/management’ is a blank page. Hard refreshing the page didn’t help.

          I believe i figured out the issue, as well as the error you were seeing from FOGCore.

          Query was null because the link was not connected due to the load issues we’ve been trying to fight lately

          I believe I finally got to the bottom of it.

          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 1
          • S
            Sebastian Roth Moderator
            last edited by Sebastian Roth Oct 29, 2015, 2:13 AM Oct 29, 2015, 8:12 AM

            @Tom-Elliott Could be related to load but in this case I am fairly sure that query() on null is coming from mysqli class not being available. I just had that on one of my test debian systems when playing with the different php mysql packages. Seams like php5-mysqlnd from dotdeb is not properly configured to offer mysqli as it is used in FOG. Maybe it’s just a php.ini thing, I am not sure.
            Exchanging php5-mysqlnd with php5-mysql solved that for me!

            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
            • I
              irishfoguser
              last edited by Oct 29, 2015, 10:29 AM

              Hi

              i have tried to fix this using this command but no joy

              sudo apt-get install php5-mysql .

              i still am getting a blank page. I am using the svn

              13 2015] [notice] Apache/2.2.22 (Debian) mod_ssl/2.2.22 OpenSSL/1.0.1e configured – resuming normal operations
              [Thu Oct 29 10:33:52 2015] [error] [client ::1] PHP Warning: mysqli::query() expects parameter 2 to be long, string given in /var/www/html/fog/lib/db/MySQL.class.php on line 63
              [Thu Oct 29 10:33:52 2015] [error] [client ::1] PHP Warning: mysqli::query() expects parameter 2 to be long, string given in /var/www/html/fog/lib/db/MySQL.class.php on line 63
              [Thu Oct 29 10:33:52 2015] [error] [client ::1] PHP Fatal error: Call to a member function query() on null in /var/www/html/fog/lib/fog/FOGCore.class.php on line 276
              [Thu Oct 29 10:33:52 2015] [error] [client ::1] File does not exist: /var/www/favicon.ico

              T 1 Reply Last reply Oct 30, 2015, 1:55 AM Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by Sebastian Roth Oct 29, 2015, 4:44 AM Oct 29, 2015, 10:44 AM

                Please update to trunk and try again. Those lines of code do not match with what I see in the code. Very hard to find an issue then. Update can be done as you described earlier in this thread.

                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 Oct 29, 2015, 10:56 AM

                  I installed php5-mysql (and removed php5-mysqlnd) , updated trunk as you described and run the installfog.sh again. But I still get the blank page. It seems like installfog.sh installs php5-mysqlnd again:

                  ...
                   * Installing package: php5-mysqlnd............................OK
                  ...
                  

                  It doesn’t work either when I try to install php5-mysql after the installation again.
                  My apache error log file stills looks the same.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Stefan Kaegi
                    last edited by Oct 29, 2015, 11:00 AM

                    Here is my FOGCore.class.php file:
                    FOGCore.class.php

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by Sebastian Roth Oct 29, 2015, 10:46 AM Oct 29, 2015, 4:29 PM

                      Thanks for uploading FOGCore.class.php. But without knowing the exact line number where the error happened I am unable to help you. I am very sorry for all this messages forth an back without getting anywhere yet. But we need full information to be able to help you. Line number (error log) and code (either upload or tell us the exact revision number).

                      I tried to reproduce this but I can’t unfortunately!! Installed php5-mysqlnd (which removed php5-mysql) and it is still working for me here. I wish I would have payed more attention on why it didn’t work for me in the first place but I guess it was just too late at night.

                      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 @irishfoguser
                        last edited by Oct 30, 2015, 1:55 AM

                        @irishfoguser it appears you are not updating. I state this because ‘PHP Warning: mysqli::query() expects parameter 2 to be long, string given’ will only occur in async mysqli calls specifically from the poll method. I have moved away from async calls.

                        How exactly are you updating and reinstalling? My guess is you are in bin which will not update all of the files. If svn is downloaded to /root under folder trunk, you must be in /root/trunk not /root/trunk/bin.

                        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
                          Stefan Kaegi
                          last edited by Oct 30, 2015, 8:10 AM

                          I udpated again today. So now I’m on Rev 4244.
                          Apache error.log: error.log
                          FOGCore.class.php: FOGCore.class.php

                          T 1 Reply Last reply Oct 30, 2015, 11:46 AM Reply Quote 0
                          • S
                            Sebastian Roth Moderator
                            last edited by Oct 30, 2015, 11:45 AM

                            Thanks for the information. This definitely seams like an un-initialized DB object. I am kind of new in the Developers Team and still catching up with all the details. Didn’t know about debugging needs to be switched on to see possible errors when loading the MySQL library. Would you please edit your /var/www/html/fog/lib/fog/FOGBase.class.php (change false to true😞

                            <?php
                            abstract class FOGBase {
                                protected $debug = true;
                            ...
                            

                            Then reload the page 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
                            • T
                              Tom Elliott @Stefan Kaegi
                              last edited by Oct 30, 2015, 11:46 AM

                              @Stefan-Kaegi This isn’t possible. Are you really sure you’re updated?

                              I ask because you report the Rev number, but what is the version in your cloud?

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

                                          167

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project