can't print, it it because no posix login?
| From: | Mailing List Mailbox | Date: | Wed, 04 Oct 2000 21:00:56 +0000 |
| Subject: | can't print, it it because no posix login? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-18656@lists.php.net to get a copy of this message | ||
Trying to print from within PHP is giving this error:
lpr: cannot create /var/spool/lpd/lj4050/.seq
I've manually tested to make sure the user/group that the webserver is
running under can print so I'm not quite sure why when I try to do it from
PHP I get such an error. I tried to test what user PHP thought it was
printing as and the UID/GID are correct but no login name seems to
exist. Could this be the cause?
<?
$uid = posix_getuid();
$euid = posix_geteuid();
$gid = posix_getgid();
$egid = posix_getegid();
$login = posix_getlogin();
echo "<B>$login</B> <I>UID: $uid ($euid) GID: $gid ($egid)</I>";
?>
This lil code chunk returns:
Warning: Cannot determine your login name. Something is really wrong
here. in /home/httpd/html/test/posix_getlogin.php on line 7
UID: 99 (99) GID: 99 (99)
Anyone know why this is?