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

    FOGMulticastManager and other services fail posix_getpid()

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    7
    642
    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.
    • L
      leonj
      last edited by

      I am running RedHat 7 on VMWARE EMX virtual. After clean install I get the following error on FOG processes.

      FOGMulticastManager[13688]: PHP Fatal error: Call to undefined function posix_getpid() in /opt/fog/service/lib/service_lib.php on line 195

      Also the common error of the /opt/fog/log only has a servicemaster.log
      I already set the rc.local to delay startup with 30 sec as proposed in a previous thread. but so far still the same

      1 Reply Last reply Reply Quote 0
      • L
        leonj
        last edited by

        If I run the php command posix_getpid() seperately there is no problem

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

          @leonj said in FOGMulticastManager and other services fail posix_getpid():

          If I run the php command posix_getpid() seperately there is no problem

          What do you mean by “seperately”? When running PHP code on a command shell?

          One thing I found is this: http://php.net/manual/de/function.posix-getpid.php

          Possible explanation is that the process module is only enabled in the php.ini config for the CLI but not for the webserver. Take a look at those configs in /etc/php…

          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

          L 1 Reply Last reply Reply Quote 0
          • L
            leonj @Sebastian Roth
            last edited by

            @Sebastian-Roth Hi Sebastien I placed a small test php script in the http docroot and run it from the webserver

            /var/www/fog/test.php
            <?php
            echo “result of posix_getpid()”;
            echo posix_getpid();
            ?>

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

              @leonj I got it the wrong way, ups. FOGMulticastManager is called from the console and therefore the module might not be enabled for the CLI version of PHP and might cause the issue. Please try: php /var/www/fog/test.php

              You’ll probably see the same error message as posted above. Run php --ini to see where the configuration is located and if the module is enabled.

              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
              • L
                leonj
                last edited by

                @Sebastian-Roth The problem seems resolved now. The repos that we have internally , because several versions of packages are available , the package names are eg. rh-php56 . This causes a problem when the services need to be started via systemd on RedHat . I created symlinks for php (/usr/bin/php) to point to the correct location of the binaries. Also I created symlinks in /etc/ for php.ini and php.d to point to the correct location. The location I found by running phpinfo() in a script from /var/www/fog/
                The usual :
                <?php
                phpinfo();
                ?>
                This then aligns the cli version (and of course what systemd uses) with what the webserver (apache) uses

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

                  @leonj said:

                  The repos that we have internally …

                  This would have been a very valuable information right from the start. 🙂

                  Good to hear you got it solved.

                  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 / 1
                  • First post
                    Last post

                  197

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project