posix_getpid() unknown on a Linux System

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gkservice
Forum Newbie
Posts: 1
Joined: Wed Aug 13, 2008 11:02 am

posix_getpid() unknown on a Linux System

Post 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?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: posix_getpid() unknown on a Linux System

Post by onion2k »

They should be there unless PHP was compiled without them. Was it?

http://uk3.php.net/manual/en/posix.installation.php
User avatar
lukewilkins
Forum Commoner
Posts: 55
Joined: Tue Aug 12, 2008 2:42 pm

Re: posix_getpid() unknown on a Linux System

Post 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
Post Reply