php如何安装posix,如何在php中安裝posix

POSIX does not appear when I run php -m cmd, however, I see it from the phpinfo() –enable-posix=shared on Linux with Plesk 9.

當我運行php -m cmd時,POSIX沒有出現,但是,我從使用Plesk 9的Linux上的phpinfo()-enable-posix = shared中看到它。

Basically, I can't use posix_*() functions as described at http://www.php.net/manual/en/ref.posix.php

基本上,我不能使用http://www.php.net/manual/en/ref.posix.php中描述的posix _ *()函數。

this shows doesn't exists:

這個節目不存在:

if (function_exists('posix_getuid')) {

echo "posix_getuid available";

} else {

echo "posix_getuid not available"; // this prints in my server.

}

Could someone show me how to install it? Thank you.

有人可以告訴我如何安裝它嗎?謝謝。

[PHP Modules]

bz2

calendar

ctype

curl

date

dbase

dom

exif

fileinfo

filter

ftp

gd

geoip

gettext

gmp

hash

iconv

imap

ionCube Loader

json

libxml

mbstring

mcrypt

memcache

mhash

mysql

mysqli

openssl

pcntl

pcre

PDO

pdo_mysql

pdo_sqlite

readline

Reflection

session

shmop

SimpleXML

sockets

SPL

sqlite

standard

tokenizer

wddx

xml

xmlreader

xmlwriter

xsl

zip

zlib

3 个解决方案

#1

38

I found the solution:

我找到了解決方案:

yum install php-process

This package enables php-posix.

這個包啟用php-posix。

#2

3

While resolved, the original problem would seem to be that posix_getpwuid is not supported on Windows:

解決之后,最初的問題似乎是Windows上不支持posix_getpwuid:

來自:http://www.php.net/manual/en/function.posix-getpwuid.php

On Windows, posix_getpwuid() is not implemented

在Windows上,未實現posix_getpwuid()

if you just want the username of the current user, you can use get_current_user().

如果您只想要當前用戶的用戶名,可以使用get_current_user()。

To properly get the running user, test if function_exists('posix_getpwuid') and if not, assume you're running on Windows and call getenv('USERNAME').

要正確獲取正在運行的用戶,請測試function_exists('posix_getpwuid'),如果沒有,則假設您在Windows上運行並調用getenv('USERNAME')。

#3

1

In openSUSE use command zypper install php-posix for installing php-process for using php function posix_getuid

在openSUSE中使用命令zypper安裝php-posix來安裝php-process以使用php函數posix_getuid

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值