php-windows Digest 23 Oct 2006 23:33:54 -0000 Issue 3062
Topics (messages 27250 through 27252):
Print on client shared printer doesn't work gives error
27250 by: Robert
27251 by: Robert
Re: PHP_PRINTER.DLL prints from shell but not from web
27252 by: Niel Archer
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hi guys and girls
I'm trying to print from the server on the (on my) client shared printer.
Server and client are both Windows XP Pro
This mean to share the client printer and to mount it on the Server.
The script name is printit.php
PHP is 5.1.2, PHP_PRINTER.DLL is 5.1.2 and I tried also 5.1.6, APACHE is
2.0.55
What is crazy is this:
if you open a command window on the server and you run
c:\>c:\program files\php\php.exe c:\www\printit.php
the printer start printing and prints fine and well
while if you run it from the browser it does not, which mean that running:
http://serverwebaddress/printit.php
and you get error "PHP Warning: printer_write(): couldn't allocate the
printerjob [5]"
'Cause of the success from Command Line Interface php.exe I tried also to
run the printit.php from another script which simply shell_exec the
"c:\>c:\program files\php\php.exe c:\www\printit.php" (with right \\\\\
amounts)
but returns the same above error "PHP Warning: printer_write(): couldn't
allocate the printerjob [5]"
Please note that printer right are set to everybody and also to guests.
Thank you for any tip
Robert
--- End Message ---
--- Begin Message ---
ADDITIONAL DESCRIPTION
the client shared printer is "mounted" on the server for a simple reason. My
script printit.php SHOULD print on the client printer...
in fact the script open this shared printer and prints only if I use the
form
$printer = "\\\\"."CLIENTPCNAME"."\\"."PRINTERSHARENAME";
$handle = printer_open($printer);
--- End Message ---
--- Begin Message ---
Hi,
does the user php runs as in apache, have appropriate permissions for the
shared printer?
Niel
--- End Message ---