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

    PHP Warning service_lib.php

    Scheduled Pinned Locked Moved Solved
    Bug Reports
    3
    14
    3.2k
    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.
    • F
      Fernando Gietz Developer
      last edited by

      I have problems with the size of /var/log messages files because his size is huge. The reason is that all FOG service are logging in it, and all service give the same warning:

      FOGMulticastManager: PHP Warning:  sleep() expects parameter 1 to be long, string given in /opt/fog/service/lib/service_lib.php on line 55
      

      The function uses the variable $service_sleep_time. The value of this variable is:

      $service_sleep_time = $FOGCore->getSetting('SERVICESLEEPTIME'); [line 4 of the file]
      

      But the SERVICESLEEPTIME value is defined in lib/fog/config.class.php:

      define('SERVICESLEEPTIME',3); [line 44]
      
      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        SERVICESLEEPTIME is not defined in config.class.php anymore (not at least how you’re seeing it.)

        I changed all the sleeptimes and even the log driven values to come from the Database. Please check FOG Configuration->FOG Settings->FOG Linux Service Sleep Times and look at the values, are they defined appropriately?

        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

        F 1 Reply Last reply Reply Quote 0
        • C
          Claude Girard
          last edited by

          Hi Tom

          I think line 55 in service_lib.php should be:
          sleep((int)$service_sleep_time);

          F 1 Reply Last reply Reply Quote 0
          • F
            Fernando Gietz Developer @Tom Elliott
            last edited by

            @Tom-Elliott said:

            SERVICESLEEPTIME is not defined in config.class.php anymore (not at least how you’re seeing it.)

            I changed all the sleeptimes and even the log driven values to come from the Database. Please check FOG Configuration->FOG Settings->FOG Linux Service Sleep Times and look at the values, are they defined appropriately?

            I don’t have this option in my FOG server 😲 and in the database doesn’t appear any registry (globalSettings table) about it

            1 Reply Last reply Reply Quote 0
            • F
              Fernando Gietz Developer @Claude Girard
              last edited by

              @Claude-Girard said:

              Hi Tom

              I think line 55 in service_lib.php should be:
              sleep((int)$service_sleep_time);

              I change this line, like Claude suggests, and appears other error:

              feb 01 13:18:50 fog6.lgp.ehu.es FOGTaskScheduler[2406]: PHP Warning:  fopen(//): failed to open stream: Is a directory in /opt/fog/service/lib/service_lib.php on line 8
              feb 01 13:18:50 fog6.lgp.ehu.es FOGTaskScheduler[2406]: PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /opt/fog/service/lib/service_lib.php on line 9
              feb 01 13:18:50 fog6.lgp.ehu.es FOGTaskScheduler[2406]: PHP Warning:  fflush() expects parameter 1 to be resource, boolean given in /opt/fog/service/lib/service_lib.php on line 10
              feb 01 13:18:50 fog6.lgp.ehu.es FOGTaskScheduler[2406]: PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /opt/fog/service/lib/service_lib.php on line 11```
              Tom ElliottT 1 Reply Last reply Reply Quote 0
              • Tom ElliottT
                Tom Elliott @Fernando Gietz
                last edited by

                @Fernando-Gietz Can you show me your FOG Linux Service stuff from FOG Settings?

                It sounds, to me, like your db doesn’t have these entries for some reason.

                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
                • F
                  Fernando Gietz Developer
                  last edited by

                  My globalSettings table:

                  MariaDB [fog]> select settingKey , settingValue from globalSettings;
                  +--------------------------------------+-----------------------------------------------------------------------+
                  | settingKey                           | settingValue                                                          |
                  +--------------------------------------+-----------------------------------------------------------------------+
                  | FOG_TFTP_HOST                        | 10.XXX.XX.X                                                             |
                  | FOG_TFTP_FTP_USERNAME                | fog                                                                   |
                  | FOG_TFTP_FTP_PASSWORD                | x                                                          |
                  | FOG_MINING_PACKAGE_PATH              | http://fogproject.org/fogpackage.zip                                  |
                  | FOG_TFTP_PXE_KERNEL_DIR              | /var/www/html/fog/service/ipxe/                                       |
                  | FOG_TFTP_PXE_KERNEL                  | bzImage_3_18_4                                                        |
                  | FOG_KERNEL_RAMDISK_SIZE              | 127000                                                                |
                  | FOG_USE_SLOPPY_NAME_LOOKUPS          | 1                                                                     |
                  | FOG_MEMTEST_KERNEL                   | memtest.bin                                                           |
                  | FOG_PXE_BOOT_IMAGE                   | init.xz                                                               |
                  | FOG_PXE_IMAGE_DNSADDRESS             | 10.XXX.XX.X                                                            |
                  | FOG_VIEW_DEFAULT_SCREEN              | search                                                                |
                  | FOG_ADVANCED_MENU_LOGIN              |                                                                       |
                  | FOG_STORAGENODE_MYSQLPASS            | fs30398394677                                                         |
                  | FOG_STORAGENODE_MYSQLUSER            | fogstorage                                                            |
                  | FOG_NFS_BANDWIDTHPATH                | /fog/status/bandwidth.php                                             |
                  | FOG_UPLOADRESIZEPCT                  | 5                                                                     |
                  | FOG_WEB_HOST                         | 10.XXX.XX.X                                                             |
                  | FOG_WEB_ROOT                         | /fog/                                                                 |
                  | FOG_EFI_BOOT_EXIT_TYPE               | exit                                                                  |
                  | FOG_SNAPINDIR                        | /opt/fog/snapins/                                                     |
                  | FOG_QUEUESIZE                        | 10                                                                    |
                  | FOG_CHECKIN_TIMEOUT                  | 600                                                                   |
                  | FOG_USER_MINPASSLENGTH               | 4                                                                     |
                  | FOG_USER_VALIDPASSCHARS              | 1234567890ABCDEFGHIJKLMNOPQRSTUVWZXYabcdefghijklmnopqrstuvwxyz_()^!#- |
                  | FOG_NFS_ETH_MONITOR                  | ens192                                                                |
                  | FOG_UDPCAST_INTERFACE                | ens192                                                                |
                  | FOG_UDPCAST_STARTINGPORT             | 65396                                                                 |
                  | FOG_MULTICAST_MAX_SESSIONS           | 64                                                                    |
                  | FOG_REPORT_DIR                       | ./reports/                                                            |
                  | FOG_THEME                            | default/fog.css                                                       |
                  | FOG_UPLOADIGNOREPAGEHIBER            | 1                                                                     |
                  | FOG_SERVICE_DIRECTORYCLEANER_ENABLED | 1                                                                     |
                  | FOG_USE_ANIMATION_EFFECTS            | 1                                                                     |
                  | FOG_SERVICE_USERCLEANUP_ENABLED      |                                                                       |
                  | FOG_SERVICE_GREENFOG_ENABLED         | 1                                                                     |
                  | FOG_SERVICE_AUTOLOGOFF_ENABLED       | 1                                                                     |
                  | FOG_SERVICE_DISPLAYMANAGER_ENABLED   | 1                                                                     |
                  | FOG_SERVICE_DISPLAYMANAGER_X         | 1024                                                                  |
                  | FOG_SERVICE_DISPLAYMANAGER_Y         | 768                                                                   |
                  | FOG_SERVICE_DISPLAYMANAGER_R         | 60                                                                    |
                  | FOG_SERVICE_AUTOLOGOFF_MIN           | 0                                                                     |
                  | FOG_SERVICE_AUTOLOGOFF_BGIMAGE       | c:\program files\fog\images\alo-bg.jpg                                |
                  | FOG_KEYMAP                           |                                                                       |
                  | FOG_SERVICE_HOSTNAMECHANGER_ENABLED  | 1                                                                     |
                  | FOG_SERVICE_SNAPIN_ENABLED           | 1                                                                     |
                  | FOG_KERNEL_ARGS                      |                                                                       |
                  | FOG_SERVICE_CLIENTUPDATER_ENABLED    | 1                                                                     |
                  | FOG_SERVICE_HOSTREGISTER_ENABLED     | 1                                                                     |
                  | FOG_SERVICE_PRINTERMANAGER_ENABLED   | 1                                                                     |
                  | FOG_SERVICE_TASKREBOOT_ENABLED       | 1                                                                     |
                  | FOG_SERVICE_USERTRACKER_ENABLED      | 1                                                                     |
                  | FOG_CHANGE_HOSTNAME_EARLY            | 1                                                                     |
                  | FOG_PIGZ_COMP                        | 3                                                                     |
                  | FOG_KEY_SEQUENCE                     |                                                                       |
                  | FOG_FORMAT_FLAG_IN_GUI               |                                                                       |
                  | FOG_PROXY_USERNAME                   |                                                                       |
                  | FOG_PROXY_PASSWORD                   |                                                                       |
                  | FOG_NO_MENU                          |                                                                       |
                  | FOG_TFTP_PXE_KERNEL_32               | bzImage32                                                             |
                  | FOG_PXE_BOOT_IMAGE_32                | init_32.xz                                                            |
                  | FOG_MINING_ENABLE                    | 1                                                                     |
                  | FOG_BOOT_EXIT_TYPE                   | sanboot                                                               |
                  | FOG_MINING_MAX_CORES                 | 1                                                                     |
                  | FOG_MINING_FULL_RESTART_HOUR         | 6                                                                     |
                  | FOG_MINING_FULL_RUN_ON_WEEKEND       | 1                                                                     |
                  | FOG_DATA_RETURNED                    | 0                                                                     |
                  | FOG_QUICKREG_GROUP_ASSOC             |                                                                       |
                  | FOG_ALWAYS_LOGGED_IN                 |                                                                       |
                  | FOG_INACTIVITY_TIMEOUT               | 1                                                                     |
                  | FOG_REGENERATE_TIMEOUT               | 0.5                                                                   |
                  | FOG_TASK_FORCE_REBOOT                |                                                                       |
                  | FOG_SERVICE_CHECKIN_TIME             | 60                                                                    |
                  | FOG_UDPCAST_MAXWAIT                  | 10                                                                    |
                  | FOG_CLIENT_MAXSIZE                   | 204800000                                                             |
                  | FOG_KERNEL_DEBUG                     |                                                                       |
                  | FOG_KERNEL_LOGLEVEL                  | 4                                                                     |
                  | FOG_AD_DEFAULT_PASSWORD_LEGACY       |                                                                       |
                  | FOG_NONREG_DEVICE                    |                                                                       |
                  | FOG_TORRENT_INTERVAL                 | 1800                                                                  |
                  | FOG_TORRENT_TIMEOUT                  | 120                                                                   |
                  | FOG_TORRENT_INTERVAL_MIN             | 60                                                                    |
                  | FOG_TORRENT_PPR                      | 20                                                                    |
                  | FOG_TORRENTDIR                       | /opt/fog/torrents/                                                    |
                  | FOG_MEMORY_LIMIT                     | 128                                                                   |
                  | FOG_EMAIL_ACTION                     |                                                                       |
                  | FOG_EMAIL_ADDRESS                    |                                                                       |
                  | FOG_EMAIL_BINARY                     | /usr/sbin/sendmail -t -f noreply@${server-name}.com -i                |
                  | FOG_FROM_EMAIL                       | noreply@${server-name}.com                                            |
                  | FOG_PXE_HIDDENMENU_TIMEOUT           | 3                                                                     |
                  | FOG_USED_TASKS                       | 1,2,8,17                                                              |
                  | FOG_GRACE_TIMEOUT                    | 60                                                                    |
                  | FOG_SNAPIN_LIMIT                     | 0                                                                     |
                  | FOG_MULTICAST_ADDRESS                | 239.0.104.1                                                           |
                  | FOG_MULTICAST_PORT_OVERRIDE          | 0                                                                     |
                  | FOG_MULTICAST_DUPLEX                 | --full-duplex                                                         |
                  | FOG_REGISTRATION_ENABLED             | 1                                                                     |
                  | FOG_TZ_INFO                          | UTC                                                                   |
                  | FOG_FTP_PORT                         | 21                                                                    |
                  | FOG_FTP_TIMEOUT                      | 90                                                                    |
                  +--------------------------------------+-----------------------------------------------------------------------+
                  127 rows in set (0.00 sec)
                  
                  Tom ElliottT 1 Reply Last reply Reply Quote 0
                  • Tom ElliottT
                    Tom Elliott @Fernando Gietz
                    last edited by

                    @Fernando-Gietz What version are you running?

                    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
                    • F
                      Fernando Gietz Developer
                      last edited by

                      The fog settings say Version: 5844
                      SVN info :

                      [root@fog6 fog]# svn info
                      Ruta: .
                      Working Copy Root Path: /root/fog
                      URL: https://svn.code.sf.net/p/freeghost/code/trunk
                      Raíz del repositorio: https://svn.code.sf.net/p/freeghost/code
                      UUID del repositorio: 71f96598-fa45-0410-b640-bcd6f8691b32
                      Revisión: 4722
                      Tipo de nodo: directorio
                      Agendado: normal
                      Autor del último cambio: masterzune
                      Revisión del último cambio: 4722
                      Fecha de último cambio: 2016-01-26 02:12:03 +0100 (mar 26 de ene de 2016)
                      
                      Tom ElliottT 1 Reply Last reply Reply Quote 0
                      • Tom ElliottT
                        Tom Elliott @Fernando Gietz
                        last edited by

                        @Fernando-Gietz Can you potentially teamviewer? I am pretty sure I know what’s wrong.

                        Maybe try:

                        Before running them, please backup any custom files you may have (iso’s, pics, whatnot)

                        rm -f /var/www/fog
                        rm -rf /var/www/html/fog
                        

                        Then rerun the installer. You should be okay with:

                        ./installfog.sh -y

                        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
                        • F
                          Fernando Gietz Developer
                          last edited by

                          I can’t update the version 😆

                          Some errors appear in the installer process:

                          [root@fog6 bin]# ./installfog.sh 
                          ../lib/common/functions.sh: línea 1557: error sintáctico cerca del elemento inesperado `<<<'
                          ../lib/common/functions.sh: línea 1557: `<<<<<<< .mine'
                          
                          ./installfog.sh: línea 503: configureHttpd: no se encontró la orden
                          ./installfog.sh: línea 528: configureDHCP: no se encontró la orden
                          
                          Tom ElliottT 1 Reply Last reply Reply Quote 0
                          • Tom ElliottT
                            Tom Elliott @Fernando Gietz
                            last edited by

                            @Fernando-Gietz can you hit me up on chat and maybe we can teamviewer?

                            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
                            • F
                              Fernando Gietz Developer
                              last edited by

                              Can do it later? Hera is 14:35, time to eat … and I go late 🙂

                              1 Reply Last reply Reply Quote 0
                              • F
                                Fernando Gietz Developer
                                last edited by

                                It is solved with the last version 6150

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

                                199

                                Online

                                12.1k

                                Users

                                17.3k

                                Topics

                                155.3k

                                Posts
                                Copyright © 2012-2024 FOG Project