printing on IIS7
| From: | Paul Giesberts | Date: | Tue, 05 May 2009 08:52:25 +0000 |
| Subject: | printing on IIS7 | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-29316@lists.php.net to get a copy of this message | ||
Hi,
I have migrated a php site from Linux to windows. The only remaining problem seems to be printing,
naturally I have had to change the code and that's where the problems have started. I have the
following very simple code:
<?php
$txt = "Hello World";
$handle = printer_open("DELL3115");
printer_write($handle, $txt);
printer_close($handle);
?>
When I run this from the command prompt using php -f ..... It works fine, in other words it prints,
when I run this script through the web browser then I get this:
Fatal error: Out of memory (allocated 262144) (tried to allocate 4294967295 bytes) in
C:\inetpub\wwwroot\testprn.php on line 4
I have read this article: http://support.microsoft.com/?kbid=184291 and
many others, which all lead me to believe that it is an account / permission problem. On a side
note: $handle = printer_open("non-existing-printer"); gives me a normal error in the
sense of "can't find printer".
I run Windows 2008 64 bit, IIS7, php 5.2 32 bit ( I have enabled 32 bit apps in IIS and the rest of
the site works fine), using FastCGI.
Has anyone got any ideas?
Thanks,
Paul Giesberts
IT & QA Manager
-------------------------------------------------------------
Servicecare
Manchester Road
Oldham
OL9 7AA
-------------------------------------------------------------
DDI: ++44-161-6881985
Tel: ++44-161-6881999
Fax: ++44-161-6881998
email: p.giesberts@servicecare.co.uk