News:

Support the VirtueMart project and become a member

Main Menu

Fatal error: Allowed memory size exhausted

Started by jbaker, March 01, 2012, 21:42:38 PM

Previous topic - Next topic

jbaker

I'm running VirtueMart 2.0.2 in Joomla 2.5.1 and using Authorize.net as the credit card processing system.  When someone places an order and checks out, the system returns "Fatal error: Allowed memory size of 33554432 bytes exhausted".  The specifics after that vary -- sometimes the error is in libraries/joomla/language/language.php, other times in libraries/joomla/html/html/select.php, and other times elsewhere.  Oddly, the order does get entered into the VirtueMart system and is processed through Authorize.net, but the user is stuck with a big error message on the screen (and sometimes responds by re-ordering the same thing).

I didn't have this problem with test purchases made with various VirtueMart 2.0.1 releases, but it's been happening since moving to 2.0.2 and going live with the store.  I don't know whether this is the code or something in my particular store -- and don't have the option of increasing the memory through .htaccess or a local php.ini file -- so I'd appreciate any assistance that folks might be able to provide.

FWIW, I just reinstalled 2.0.1K and the error does not occur, but it does with 2.0.2.

Thanks,
Jason

Milbo

I think it is your template and the pdf.
Check if the pdf is created correctly in the BE. If yes, then check if you have the invoice directory in your files for sale folder (outside joomla).
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jbaker

Thanks so much for your prompt reply. 

I checked the orders listing in the backend and the PDF invoices appear fine (for both the orders that gave the fatal error and those that didn't).  I then checked Configuration > Templates > Path for Sale and found that blank, so I created a folder outside of Joomla, entered the path, and tried again.  Once again, version 2.0.2 gave the same fatal memory error.  When I reinstalled 2.0.1K, it worked fine.

Do you have any other suggestions that I should try?

Thanks,
Jason

Milbo

Did you also created the folde invoices in it? Next version has better messages explaining what todo.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jbaker

I just created an invoices subfolder but I still get the same error (so I went back to 2.0.1K which works fine).  At this point I'll just wait until the next version is released and see whether I can get things working with the additional messages.  If so, I'll mark this fixed.  If not, I'll post details and see what can be done to resolve the error.

Thanks again!

Jason

Milbo

PDF creation just needs a bit more memory, I am going to add a configuration setting for it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jbaker

FYI -- I just tried the 2.0.3 release candidate and got the same fatal error message (and thus dropped back to 2.0.1K which continues to work).

Jason

myvarioususername

Hey there,

is it possible to turn the pdf creation off?

I get same error at \libraries\tcpdf\tcpdf.php on line 9387
Its that line:
if (isset($pl['opt']['le']) AND in_array($pl['opt']['le'], $lineendings)) {
                        $annots .= ' /LE /'.$pl['opt']['le'];
                     }

Therefor I changed my Template and got this error: Fatal error: Call to undefined method shopFunctionsF::pdficon()

ariplatinum

#8
Quote from: Milbo on March 02, 2012, 00:33:33 AM
I think it is your template and the pdf.
Check if the pdf is created correctly in the BE. If yes, then check if you have the invoice directory in your files for sale folder (outside joomla).

Hi Milbo,

I am also getting the same error. I am using Offline Credit Card plugin, and after pressing 'confirm order' I am also returned with a white screen.
Error log: PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 102 bytes) in /httpdocs/libraries/joomla/language/language.php on line 792, referer: http://.../component/virtuemart/cart?Itemid=0

I can confirm that I also get a white screen, when I attempt to view the invoice in the backend of VM. The order has otherwise gone into the database successfully, although no email notification has been sent to the customer.

EDIT: I am also intermittently being unable to access any of the orders via the orders screen, not just the invoice button. Same error in error log.

EDIT2: Also attempted with different payment processor. Blank white screen after confirm order. Different error log message:  PHP Warning:  Missing argument 5 for vmPSPlugin::processConfirmedOrderPaymentResponse(), called in /httpdocs/plugins/vmpayment/creditcardmanualpayment/creditcardmanualpayment.php on line 192 and defined in /httpdocs/administrator/components/com_virtuemart/plugins/vmpsplugin.php on line 947, referer: http://.../component/virtuemart/cart/checkout?Itemid=0
[Mon Mar 26 15:36:18 2012] [error] PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 491520 bytes) in /httpdocs/libraries/tcpdf/tcpdf.php on line 28533, referer: http://.../component/virtuemart/cart/checkout?Itemid=0

I hope this information helps
Joomla 2.5.4
Virtuemart 2.0.4
Firefox 11

dontflinch

I had this same problem of 503 or white blank page appearing.  First, I commented out the logo inclusion in the invoice.php file since we use png and this is apparently a big issue for tcpdf.  Then after looking further (much much further) I found that my litespeed settings needed adjustment ( a LOT of adjustment) http://www.litespeedtech.com/docs/webserver/config/extapps/#memSoftLimit and voila no more white/503 pages, the checkout thank you page appears now.  =)

Milbo

Yes, tcpdf cannot handle the png or tga correctly
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lukelee


bytelord

#12
Hello,

png and tga files must be avoided using tcpdf library (in page header this is a must). The best way to resolve this is to convert your vendor logo from png to gif or jpg.
tcpdf library is an open source third party library for pdf creation and vm2 uses it.

You could try to check the php.ini settings for memory and timeout, as also the modules gd, imagick and curl for php (installed, configured?). If you have the right settings and the right modules tcpdf team claims that this will work fine (png files on the header) but generally we avoid those files (png, tga) on the header.

PS: speaking for curl before be sure you have installed on your server PHP-CURL and active. If you use cpanel (WHM) you could use easy apache to compile apache again with Curl,gd and imagick modules enabled.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!