The SimpleInvoices forum has moved to Google Plus - this forum is now read-only
Export PDF fatal errors
  • jmruasjmruas June 2010

    I'm testing export into PDF my 5 test invoices. Each of them give a different fatal error. Here they are:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3145728 bytes) in /xxx/honorarios/library/pdf/box.whitespace.php on line 6
    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3145728 bytes) in /xxx/honorarios/library/pdf/value.generic.length.php on line 19
    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3145728 bytes) in /xxx/honorarios/library/pdf/value.generic.length.php on line 37
    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3145728 bytes) in /xxx/honorarios/library/pdf/value.generic.length.php on line 19
    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3145728 bytes) in /xxx/library/pdf/value.border.edge.class.php on line 23

    Exporting into XLS or DOC is perfect and is solved the previous missing extension file .xls and .doc

    Jos

  • The main reason for the error is the php memory configured in your setup, you need to increase for PDF's because PDF is generated from the server and on completion sent to the client. Whereas other formats xls and doc are just a spit out of the results to the client, thus exporint to these formats does not consume that much server PHP memory.

  • ifaraifara June 2010

    Te digo lo mismo, en las instrucciones de instalaci

  • Hi

    You may need to increase you memory a little, try something like 128 or maybe 192

    memory_limit = 192M

    Thanks
    Harvinder Singh

  • jmruasjmruas June 2010

    Thank you for your suggestions.

    I never had memory problems, but one day is the first time.

    After creating a php.ini with memory_limit = 192M (I put it into SI root)
    I got a new error:
    Simple Invoices - PDO problem (...)
    To fix this please installed the pdo_mysql php extension. (...)

    This is a fake problem, because pdo_mysql php extension is installed and I always got a perfect access into the database.

    Will the new Zend version creating here this problem? This is really strange...

    Jos

  • ReallyNAReallyNA June 2010

    @ jmruas

    Try to define the memory_limit with a .htaccess file

    php_value memory_limit 128M

  • jmruasjmruas June 2010

    Thank you ReallyNA.

    I get a 500 Internal Error Server if I put this line into the .htaccess file.

  • I used to get the PDO error as well when using php.ini to only increase the memory limit. I then tried putting some more details in the php.ini file and all started working. I will post the php.ini file I am using for you, I am sure your SimpleInvoices will start working after that.

  • justinjustin June 2010

    thanks guys

    harvinder, if you can post your php.ini file would be great thanks!

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • zartegzarteg June 2010

    I also had problems with the export PDF Function.

    I am using Fedora Core 12 with Apache and mysql

    I followed the advice above and increased the size limit in my /etc/php.ini to 256 M

    Still appeared to hang and got a blank page.

    Went back to my laptop where I originally had it running some time ago and noticed I had elements of PHP installed that I did not have on the Fedora 12 Server.

    yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy

    Fixed all my problems and now I am exporting to PDF just fine.

    Still not sure which of those was required - when I did the install above many were already in.

    Here is what I was missing:

    Installing : proj-4.6.1-3.fc12.i686 1/31
    Installing : geos-3.2.1-1.fc12.i686 2/31
    Installing : libgeotiff-1.2.5-5.fc12.i686 3/31
    Installing : ogdi-3.2.0-0.14.beta2.fc12.i686 4/31
    Installing : agg-2.5-9.fc12.i686 5/31
    Installing : hdf5-1.8.3-2.fc12.i686 6/31
    Installing : xerces-c-2.8.0-5.fc12.i686 7/31
    Installing : librx-1.5-14.fc12.i686 8/31
    Installing : libdap-3.9.3-2.fc12.i686 9/31
    Installing : freetds-0.82-6.fc12.i686 10/31
    Installing : netcdf-4.0.1-4.fc12.i686 11/31
    Installing : gdal-1.6.1-2.fc12.i686 12/31
    Installing : t1lib-5.1.2-5.fc12.i686 13/31
    Installing : php-gd-5.3.2-2.fc12.i686 14/31
    Installing : libc-client-2007e-10.fc12.i686 15/31
    Installing : libmcrypt-2.5.8-9.fc12.i686 16/31
    Installing : php-odbc-5.3.2-2.fc12.i686 17/31
    Installing : php-mssql-5.3.2-2.fc12.i686 18/31
    Installing : php-mapserver-5.4.2-3.fc12.i686 19/31
    Installing : php-imap-5.3.2-2.fc12.i686 20/31
    Installing : php-xml-5.3.2-2.fc12.i686 21/31
    Installing : php-magickwand-1.0.8-4.fc12.i686 22/31
    Installing : php-shout-0.9.2-5.fc12.i686 23/31
    Installing : php-mcrypt-5.3.2-2.fc12.i686 24/31
    Installing : php-soap-5.3.2-2.fc12.i686 25/31
    Installing : php-tidy-5.3.2-2.fc12.i686 26/31
    Installing : 1:php-pear-1.9.0-3.fc12.noarch 27/31
    Installing : php-magpierss-0.72-6.fc12.noarch 28/31
    Installing : 1:php-eaccelerator-0.9.6-1.fc12.i686 29/31
    Installing : php-xmlrpc-5.3.2-2.fc12.i686 30/31
    Installing : php-snmp-5.3.2-2.fc12.i686 31/31

  • justinjustin June 2010

    thanks zarteg

    php-gd is the important one

    cheers

    justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • yup php-gd is a must and you may also need php-xml, not sure for the rest but the more the merrier ;)

  • basantabasanta August 2012

    Hello
    I got the an error when I send a PDF invoice to my clients
    Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 1048576 bytes) in /home/xxxxx/public_html/billings/library/pdf/value.generic.length.php on line 37

    When I put the php.ini on my folder I got a error message and when I tried the increase memory limit on .htacess I got the internal server error

    Please suggest me

    Thank you

  • jmruasjmruas August 2012

    Answer in September 2011:
    I had that problem. I solved it creating a php.ini (in the simpleinvoices folder root) with memory_limit=-1 (this means you don't need to guess the amount of memory, because it's automatic adjusted).

Categories