From: Venkat Raman Don on
If you are able to write to a file share then it should work. Can you figure out when you turn off impersonation what credentials printer is getting accessed. That's the only difference between impersonation On and Off.

Thanks,
Don.

-----Original Message-----
From: Keith Davis [mailto:keithdavis(a)pridedallas.com]
Sent: Friday, February 05, 2010 2:11 PM
To: Venkat Raman Don; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or PHP_PRINTER.DLL ?

I understand that. What I meant, is that the user has permissions to
both (it's my account.) I'm a domain admin.



Keith Davis (214) 906-5183

-----Original Message-----
From: Venkat Raman Don [mailto:Don.Raman(a)microsoft.com]
Sent: Friday, February 05, 2010 4:05 PM
To: Keith Davis; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

If the authorized user has access to printer it should work. BTW, access
to shared files or network share and printer are two different things.
Writing to file share doesn't mean that you can connect to printer too.
See if the authorized user can indeed connect to printer.

Thanks,
Don.

-----Original Message-----
From: Keith Davis [mailto:keithdavis(a)pridedallas.com]
Sent: Friday, February 05, 2010 1:58 PM
To: Venkat Raman Don; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

Out entire site requires authorization to access it (Windows
Authentication used.) I write files to other servers from under these
credentials without any problem. Why would accessing the printer be an
issue?



Keith Davis (214) 906-5183

-----Original Message-----
From: Venkat Raman Don [mailto:Don.Raman(a)microsoft.com]
Sent: Friday, February 05, 2010 3:55 PM
To: Keith Davis; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

You will need to give the authenticated user IIS is using (depends on
what kind of authentication method is set on your site) access to
printer in that case. IIS7 adds a default builtin user account IUSR
which is user while running under anonymous authentication. However it
is different on IIS6 which uses IUSR_machine_name under anonymous
authentication. I would say best way is to run your application under a
credential which has access to printer. If you add your local IUSR
account to have access to printer, this will not work on IIS6 where you
will need to give the default user IUSR_machine_name access too.

Also, Ruslan sent some good links which explains this impersonation in
detail. Look at that for further details.

Thanks,
Don.

-----Original Message-----
From: Keith Davis [mailto:keithdavis(a)pridedallas.com]
Sent: Friday, February 05, 2010 1:43 PM
To: Venkat Raman Don; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

No, when I turn it off it works. When I turn it back on (the way we had
it before, and need it), it generates the error.



Keith Davis (214) 906-5183

-----Original Message-----
From: Venkat Raman Don [mailto:Don.Raman(a)microsoft.com]
Sent: Friday, February 05, 2010 3:42 PM
To: Keith Davis; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

When you have fastcgi.impersonate set to 1, IIS tries to impersonate the
security token of the calling client. This means, for example if an IIS
site has 'Anonymous' authentication off and let's say Windows
authentication on, 'Windows' authenticated user will be impersonated by
PHP main thread and all the files and other system resource will be
accessed using the authenticated Windows user security tokens. So if
that user/credential doesn't have permission to access a resource it
will fail.

In your case it seems after fastcgi.imersonate is set, the
credential/secutrity token impersonated of the user has credential to
access the printer.

Hope this helps.
Thanks,
Don.

-----Original Message-----
From: Keith Davis [mailto:keithdavis(a)pridedallas.com]
Sent: Friday, February 05, 2010 1:32 PM
To: Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

IIS 7 on my dev machine, which is what I am testing on. The prod server
is IIS 6.


Keith Davis (214) 906-5183

-----Original Message-----
From: Pierre Joye [mailto:pierre.php(a)gmail.com]
Sent: Friday, February 05, 2010 3:30 PM
To: Keith Davis
Cc: Robert; php-windows(a)lists.php.net
Subject: Re: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

which webserver do you use?

On Fri, Feb 5, 2010 at 10:27 PM, Keith Davis
<keithdavis(a)pridedallas.com> wrote:
> How is that user specified?
>
>
>
> Keith Davis (214) 906-5183
>
> -----Original Message-----
> From: Pierre Joye [mailto:pierre.php(a)gmail.com]
> Sent: Friday, February 05, 2010 3:26 PM
> To: Keith Davis
> Cc: Robert; php-windows(a)lists.php.net
> Subject: Re: [PHP-WIN] What about php 5.3 and printers or
> PHP_PRINTER.DLL ?
>
> On Fri, Feb 5, 2010 at 10:16 PM, Keith Davis
> <keithdavis(a)pridedallas.com> wrote:
>> I found a post that said to set fastcgi.impersonate = 0 to fix this
>> problem. It did.
>>
>> Can someone clarify what that setting does?
>
> It allows a server to run php-cgi under a given user. But that should
> not affect printer at all, except if the user does not have the
> permission to use this printer.
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>
> This message (including any attachments) may contain confidential or
otherwise privileged information and is intended only for the
individual(s) to which it is addressed. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secured or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. The sender therefore does not
accept liability for any errors or omissions in the contents of this
message or that arise as a result of e-mail transmission. If
verification is required please request a hard-copy version from the
sender.
>
> www.pridedallas.com
>
>



--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php



--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php




From: "Keith Davis" on
But that doesn't make any sense. If impersonation is turned off, it
should be running under the IUSR account, which definitely does NOT have
permission to print to that network printer. Yet, my own account, which
definitely does have permission fails.



Keith Davis (214) 906-5183

-----Original Message-----
From: Venkat Raman Don [mailto:Don.Raman(a)microsoft.com]
Sent: Friday, February 05, 2010 4:16 PM
To: Keith Davis; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

If you are able to write to a file share then it should work. Can you
figure out when you turn off impersonation what credentials printer is
getting accessed. That's the only difference between impersonation On
and Off.

Thanks,
Don.

-----Original Message-----
From: Keith Davis [mailto:keithdavis(a)pridedallas.com]
Sent: Friday, February 05, 2010 2:11 PM
To: Venkat Raman Don; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

I understand that. What I meant, is that the user has permissions to
both (it's my account.) I'm a domain admin.



Keith Davis (214) 906-5183

-----Original Message-----
From: Venkat Raman Don [mailto:Don.Raman(a)microsoft.com]
Sent: Friday, February 05, 2010 4:05 PM
To: Keith Davis; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

If the authorized user has access to printer it should work. BTW, access
to shared files or network share and printer are two different things.
Writing to file share doesn't mean that you can connect to printer too.
See if the authorized user can indeed connect to printer.

Thanks,
Don.

-----Original Message-----
From: Keith Davis [mailto:keithdavis(a)pridedallas.com]
Sent: Friday, February 05, 2010 1:58 PM
To: Venkat Raman Don; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

Out entire site requires authorization to access it (Windows
Authentication used.) I write files to other servers from under these
credentials without any problem. Why would accessing the printer be an
issue?



Keith Davis (214) 906-5183

-----Original Message-----
From: Venkat Raman Don [mailto:Don.Raman(a)microsoft.com]
Sent: Friday, February 05, 2010 3:55 PM
To: Keith Davis; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

You will need to give the authenticated user IIS is using (depends on
what kind of authentication method is set on your site) access to
printer in that case. IIS7 adds a default builtin user account IUSR
which is user while running under anonymous authentication. However it
is different on IIS6 which uses IUSR_machine_name under anonymous
authentication. I would say best way is to run your application under a
credential which has access to printer. If you add your local IUSR
account to have access to printer, this will not work on IIS6 where you
will need to give the default user IUSR_machine_name access too.

Also, Ruslan sent some good links which explains this impersonation in
detail. Look at that for further details.

Thanks,
Don.

-----Original Message-----
From: Keith Davis [mailto:keithdavis(a)pridedallas.com]
Sent: Friday, February 05, 2010 1:43 PM
To: Venkat Raman Don; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

No, when I turn it off it works. When I turn it back on (the way we had
it before, and need it), it generates the error.



Keith Davis (214) 906-5183

-----Original Message-----
From: Venkat Raman Don [mailto:Don.Raman(a)microsoft.com]
Sent: Friday, February 05, 2010 3:42 PM
To: Keith Davis; Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

When you have fastcgi.impersonate set to 1, IIS tries to impersonate the
security token of the calling client. This means, for example if an IIS
site has 'Anonymous' authentication off and let's say Windows
authentication on, 'Windows' authenticated user will be impersonated by
PHP main thread and all the files and other system resource will be
accessed using the authenticated Windows user security tokens. So if
that user/credential doesn't have permission to access a resource it
will fail.

In your case it seems after fastcgi.imersonate is set, the
credential/secutrity token impersonated of the user has credential to
access the printer.

Hope this helps.
Thanks,
Don.

-----Original Message-----
From: Keith Davis [mailto:keithdavis(a)pridedallas.com]
Sent: Friday, February 05, 2010 1:32 PM
To: Pierre Joye
Cc: Robert; php-windows(a)lists.php.net
Subject: RE: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

IIS 7 on my dev machine, which is what I am testing on. The prod server
is IIS 6.


Keith Davis (214) 906-5183

-----Original Message-----
From: Pierre Joye [mailto:pierre.php(a)gmail.com]
Sent: Friday, February 05, 2010 3:30 PM
To: Keith Davis
Cc: Robert; php-windows(a)lists.php.net
Subject: Re: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

which webserver do you use?

On Fri, Feb 5, 2010 at 10:27 PM, Keith Davis
<keithdavis(a)pridedallas.com> wrote:
> How is that user specified?
>
>
>
> Keith Davis (214) 906-5183
>
> -----Original Message-----
> From: Pierre Joye [mailto:pierre.php(a)gmail.com]
> Sent: Friday, February 05, 2010 3:26 PM
> To: Keith Davis
> Cc: Robert; php-windows(a)lists.php.net
> Subject: Re: [PHP-WIN] What about php 5.3 and printers or
> PHP_PRINTER.DLL ?
>
> On Fri, Feb 5, 2010 at 10:16 PM, Keith Davis
> <keithdavis(a)pridedallas.com> wrote:
>> I found a post that said to set fastcgi.impersonate = 0 to fix this
>> problem. It did.
>>
>> Can someone clarify what that setting does?
>
> It allows a server to run php-cgi under a given user. But that should
> not affect printer at all, except if the user does not have the
> permission to use this printer.
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>
> This message (including any attachments) may contain confidential or
otherwise privileged information and is intended only for the
individual(s) to which it is addressed. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secured or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. The sender therefore does not
accept liability for any errors or omissions in the contents of this
message or that arise as a result of e-mail transmission. If
verification is required please request a hard-copy version from the
sender.
>
> www.pridedallas.com
>
>



--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php



--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php




From: "Robert" on
About no chance to print on a shared printer from windows server 2008.

Please note that for some unknown reason, it is either impossible to mount a
shared printer on windows server 2008. Maybe that errors and issues printing
from php are connected to this issue.

The only chance we had found to print on a shared printer from windows 2008,
is to mount the printer as local printer and as port, to give the full
tcp/ip path + the shared name for the shared printer.

Hope this can help anybody that have the same issue.

Kind regards


""Keith Davis"" <keithdavis(a)pridedallas.com> ha scritto nel messaggio
news:B0BACCAA54A7CC479FB67D9494FB018A8CC927(a)dc01.pridedallas.com...
How is that user specified?



Keith Davis (214) 906-5183

-----Original Message-----
From: Pierre Joye [mailto:pierre.php(a)gmail.com]
Sent: Friday, February 05, 2010 3:26 PM
To: Keith Davis
Cc: Robert; php-windows(a)lists.php.net
Subject: Re: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

On Fri, Feb 5, 2010 at 10:16 PM, Keith Davis
<keithdavis(a)pridedallas.com> wrote:
> I found a post that said to set fastcgi.impersonate = 0 to fix this
> problem. It did.
>
> Can someone clarify what that setting does?

It allows a server to run php-cgi under a given user. But that should
not affect printer at all, except if the user does not have the
permission to use this printer.

Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

This message (including any attachments) may contain confidential or
otherwise privileged information and is intended only for the individual(s)
to which it is addressed. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. E-mail transmission cannot be guaranteed to be
secured or error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message or that arise as a result of e-mail transmission.
If verification is required please request a hard-copy version from the
sender.

www.pridedallas.com


From: Pierre Joye on
hi,

It works just fine here, did you install the print server?

Cheers,

On Mon, Feb 22, 2010 at 3:03 PM, Robert <effe.stm(a)virgilio.it> wrote:
> About no chance to print on a shared printer from windows server 2008.
>
> Please note that for some unknown reason, it is either impossible to mount a
> shared printer on windows server 2008. Maybe that errors and issues printing
> from php are connected to this issue.
>
> The only chance we had found to print on a shared printer from windows 2008,
> is to mount the printer as local printer and as port, to give the full
> tcp/ip path + the shared name for the shared printer.
>
> Hope this can help anybody that have the same issue.
>
> Kind regards
>
>
> ""Keith Davis"" <keithdavis(a)pridedallas.com> ha scritto nel messaggio
> news:B0BACCAA54A7CC479FB67D9494FB018A8CC927(a)dc01.pridedallas.com...
> How is that user specified?
>
>
>
> Keith Davis (214) 906-5183
>
> -----Original Message-----
> From: Pierre Joye [mailto:pierre.php(a)gmail.com]
> Sent: Friday, February 05, 2010 3:26 PM
> To: Keith Davis
> Cc: Robert; php-windows(a)lists.php.net
> Subject: Re: [PHP-WIN] What about php 5.3 and printers or
> PHP_PRINTER.DLL ?
>
> On Fri, Feb 5, 2010 at 10:16 PM, Keith Davis
> <keithdavis(a)pridedallas.com> wrote:
>> I found a post that said to set fastcgi.impersonate = 0 to fix this
>> problem. It did.
>>
>> Can someone clarify what that setting does?
>
> It allows a server to run php-cgi under a given user. But that should
> not affect printer at all, except if the user does not have the
> permission to use this printer.
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>
> This message (including any attachments) may contain confidential or
> otherwise privileged information and is intended only for the individual(s)
> to which it is addressed. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and delete
> this e-mail from your system. E-mail transmission cannot be guaranteed to be
> secured or error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message or that arise as a result of e-mail transmission.
> If verification is required please request a hard-copy version from the
> sender.
>
> www.pridedallas.com
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
From: "Keith Davis" on
Well, I'm on Server 2003, and I still cannot print. It only works with
impersonate turned off, and that is not a solution, as I need to connect
to remote files.



Keith Davis (214) 906-5183

-----Original Message-----
From: Pierre Joye [mailto:pierre.php(a)gmail.com]
Sent: Monday, February 22, 2010 8:11 AM
To: Robert
Cc: php-windows(a)lists.php.net
Subject: Re: [PHP-WIN] What about php 5.3 and printers or
PHP_PRINTER.DLL ?

hi,

It works just fine here, did you install the print server?

Cheers,

On Mon, Feb 22, 2010 at 3:03 PM, Robert <effe.stm(a)virgilio.it> wrote:
> About no chance to print on a shared printer from windows server 2008.
>
> Please note that for some unknown reason, it is either impossible to
> mount a shared printer on windows server 2008. Maybe that errors and
> issues printing from php are connected to this issue.
>
> The only chance we had found to print on a shared printer from windows

> 2008, is to mount the printer as local printer and as port, to give
> the full tcp/ip path + the shared name for the shared printer.
>
> Hope this can help anybody that have the same issue.
>
> Kind regards
>
>
> ""Keith Davis"" <keithdavis(a)pridedallas.com> ha scritto nel messaggio
> news:B0BACCAA54A7CC479FB67D9494FB018A8CC927(a)dc01.pridedallas.com...
> How is that user specified?
>
>
>
> Keith Davis (214) 906-5183
>
> -----Original Message-----
> From: Pierre Joye [mailto:pierre.php(a)gmail.com]
> Sent: Friday, February 05, 2010 3:26 PM
> To: Keith Davis
> Cc: Robert; php-windows(a)lists.php.net
> Subject: Re: [PHP-WIN] What about php 5.3 and printers or
> PHP_PRINTER.DLL ?
>
> On Fri, Feb 5, 2010 at 10:16 PM, Keith Davis
> <keithdavis(a)pridedallas.com> wrote:
>> I found a post that said to set fastcgi.impersonate = 0 to fix this
>> problem. It did.
>>
>> Can someone clarify what that setting does?
>
> It allows a server to run php-cgi under a given user. But that should
> not affect printer at all, except if the user does not have the
> permission to use this printer.
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>
> This message (including any attachments) may contain confidential or
> otherwise privileged information and is intended only for the
> individual(s) to which it is addressed. If you are not the named
> addressee you should not disseminate, distribute or copy this e-mail.
> Please notify the sender immediately by e-mail if you have received
> this e-mail by mistake and delete this e-mail from your system. E-mail

> transmission cannot be guaranteed to be secured or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive
> late or incomplete, or contain viruses. The sender therefore does not
> accept liability for any errors or omissions in the contents of this
message or that arise as a result of e-mail transmission.
> If verification is required please request a hard-copy version from
> the sender.
>
> www.pridedallas.com
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
>
>



--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php