Jump to content

Fatal error


alex_savin
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ...

Link to comment
Share on other sites

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 ...

Link to comment
Share on other sites

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..

 

Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.