alex_savin Posted October 22, 2007 Share Posted October 22, 2007 Hello! I've moved all my applications from one server to another. The former server's configuration was PHP v5.0.2/Apache v2.0/Windows Server 2000 and now is PHP v5.2.4/IIS6/Windows Server 2003. Every think else is working properly besides the printing function. When I try to print something with the php_printer.dll's functions this error appears: Fatal error: Out of memory (allocated 524288) (tried to allocate 4294967295 bytes) in D:\WWWSites\helpu2\reports\nir.php on line 62 This worked perfectly on the previous server. Thank you in advance, Alex Quote Link to comment https://forums.phpfreaks.com/topic/74297-fatal-error/ Share on other sites More sharing options...
MadTechie Posted October 22, 2007 Share Posted October 22, 2007 check the memory.. on the new server check the memory setting in the php.ini file ie memory_limit This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1. Quote Link to comment https://forums.phpfreaks.com/topic/74297-fatal-error/#findComment-375372 Share on other sites More sharing options...
GingerRobot Posted October 22, 2007 Share Posted October 22, 2007 Well im no expert with these things, but i dont think this has much to do with the memory limit. Unless i've misunderstood the error message(which is possible) then you already have a memory limit of 512mb - a very high limit( im sure the default is less than that) - and if my maths is right, then you're trying to use something over 4 gigabytes of memory. Like i say, i could be wrong, but i think the problem might lie elsewhere. Quote Link to comment https://forums.phpfreaks.com/topic/74297-fatal-error/#findComment-375384 Share on other sites More sharing options...
igor berger Posted October 22, 2007 Share Posted October 22, 2007 I came across this while learning class, PHP5 has some strange stuff, might be a bug do a Google for this and see what you find, maybe a hack... Quote Link to comment https://forums.phpfreaks.com/topic/74297-fatal-error/#findComment-375385 Share on other sites More sharing options...
alex_savin Posted October 22, 2007 Author Share Posted October 22, 2007 check the memory.. on the new server I have 1gb ECC memory. It is a brand new HP ML360 Server with 3GHz INTEL XEON processor, 73gb SCSI HDD. The system has a fresh os install... check the memory setting in the php.ini file Tried to sett it '-1' and ... nothing ... the same error ... I don't think that it is relay a resource problem... Take a look at the memory size that it try to allocate : 4294967295 bytes = 3.99 Gb for a printing object ... it is waaaaaay to much... I came across this while learning class, PHP5 has some strange stuff, might be a bug do a Google for this and see what you find, maybe a hack... Did that too .. nothing found .. I even posted on PHP's bugs web page ... they sent me to PECL's bugs web page .... and from them .. no answerer ... Quote Link to comment https://forums.phpfreaks.com/topic/74297-fatal-error/#findComment-375387 Share on other sites More sharing options...
MadTechie Posted October 22, 2007 Share Posted October 22, 2007 Looking at the memory size.. it would seam to be a PECL problem, or a problem in the script.. do you have the lastes version of php_printer.dll? also are you trying the same test on the new server compared to the old one ? any other printing issules on the new server ? Quote Link to comment https://forums.phpfreaks.com/topic/74297-fatal-error/#findComment-375392 Share on other sites More sharing options...
alex_savin Posted October 22, 2007 Author Share Posted October 22, 2007 Looking at the memory size.. it would seam to be a PECL problem, or a problem in the script.. do you have the lastes version of php_printer.dll? also are you trying the same test on the new server compared to the old one ? any other printing issules on the new server ? I'm sure it's not a script problem... I did a test script: printer_open('path_to_the_printer'); //of course instead of 'path_to_the_printer' is the actual path As of the PECL version .. it came with the PHP ... I'm using the one that comes with the .msi version of PHP installer so .. yes is the latest versin (v5.2.4.4)... I have tried on a WIN XP / Apache 2.2 / same PHP 5.2.4 and it is working fine. I'm thinking if it is possible to be a incompatibility with IIS6. I read that PHP 5.2.x comes with a new memory allocation engine ... i don't know for sure ... Quote Link to comment https://forums.phpfreaks.com/topic/74297-fatal-error/#findComment-375396 Share on other sites More sharing options...
MadTechie Posted October 22, 2007 Share Posted October 22, 2007 I hear of many IIS problems.. also extremesanity 30-May-2007 08:35 I have gotten very reliable printing using this set of functions coupled with Windows 2000, IIS, the PECL extension, and the php_printer.dll. Basically I have a linux web server that sends a request to the windows 2000 IIS web server (acting as the role of print server) sending the information to be printed in the query string. I use this primarily for printing barcoded labels, where the barcode itself is a barcode font found on the web. I got terrible reliability out of all versions of apache running on windows 2000 and xp. Around and around we go.. Quote Link to comment https://forums.phpfreaks.com/topic/74297-fatal-error/#findComment-375401 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.