Paul,
I had a smiliar problem once where I had changed the amount of memory
from 16M to 256 (note the missing M). Check your memory setting in
php.ini. 262144 seems like 256K. I think that may be the default minimum
amount of memory for a script.
On my Linux systems there is a different php.ini for command line
versus apache instances. I don't know if Windows does the same thing.
Cheers,
James
Paul Giesberts wrote:
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@xxxxxxxxxxxxxxxxx
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php