Page 1 of 1

posix_getpid() unknown on a Linux System

Posted: Wed Aug 13, 2008 11:07 am
by gkservice

Code: Select all

<?php
echo posix_getpid();
?> 
brings a error:

Code: Select all

PHP Fatal error:  Call to undefined function posix_getpid() in /root/test.php on line 2
here the output from php version

Code: Select all

krusty:~ # php -v
PHP 5.1.2 (cli) (built: Jun 17 2006 16:07:07)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
krusty:~ #
What can we do to enable this function?

Re: posix_getpid() unknown on a Linux System

Posted: Wed Aug 13, 2008 11:11 am
by onion2k
They should be there unless PHP was compiled without them. Was it?

http://uk3.php.net/manual/en/posix.installation.php

Re: posix_getpid() unknown on a Linux System

Posted: Wed Aug 13, 2008 11:13 am
by lukewilkins
The POSIX functions are probably disabled on your server for security reasons. Do any of the other functions work for you?

http://us2.php.net/manual/en/book.posix.php