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

FOG 1.1.1 MySQL.class.php - php throws an error

Scheduled Pinned Locked Moved
FOG Problems
2
3
687
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.
  • A
    Alasdair Hatfield
    last edited by Jun 26, 2014, 4:32 PM

    Hello,

    I’m working through installing FOG on an openSuSe machine (so please bear with me in the future). During my work, PHP threw up an error related to MySQL.class.php. - array expected.

    Is this patch correct?

    [CODE]
    — MySQL.class.php.orig 2014-06-26 17:55:09.884848594 +0200
    +++ MySQL.class.php.new 2014-06-26 17:55:29.137230586 +0200
    @@ -147,7 +147,7 @@
    if ($this->queryResult === false)^M
    return false;^M
    // Return: ‘field’ if requested and field exists in results, otherwise the raw result^M

    •                  return ($field && array_key_exists($field, $this->result) ? $this->result[$field] : $this->result);^M
      
    •                  return ($field && array_key_exists($field, $this->queryResult) ? $this->queryResult[$field] : $this->queryResult);^M
                }^M
                catch (Exception $e)^M
                {^M
      

    [/CODE]

    regards,
    Alasdair

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Jun 26, 2014, 4:43 PM

      No,

      The problem was probably related to your Config.class.php file not having the right settings for db values.

      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
      • A
        Alasdair Hatfield
        last edited by Jun 26, 2014, 7:00 PM

        ok, thank you. I’ll search further

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

        157

        Online

        12.1k

        Users

        17.3k

        Topics

        155.4k

        Posts
        Copyright © 2012-2024 FOG Project