Hi,
Is just me with this problem or somebody else?
My problem (in this last release) is:
Fatal error: Allowed memory size of 67108864 bytes exhausted ...
Will it be a server problem?
This is what I have:
PHP version 5.2.10
Apache version 2.2.13
MySQL version 5.0.90-community
Thanks for your suggestions.
Jos
Hi
Yes, exporting a PDF does require more memory than any other export. I would suggest increasing you PHP memory to something like 192M. You will find if you are exporting the least amount of data to PDF it may be possible with your current config, but you may need to increase the memory.
Thanks
Harvinder Singh
Thank you Harvinder Singh.
This is the first SI release that gives me this unexpected problem (exporting).
I have in my server older SI versions that export fine with the same memory.
Is this a memory problem or a script problem or a configuration problem?
If I increase the memory in php.ini I get a false error message saying that PDO is not installed.
If I increase in .htaccess I get a 500 error.
I would like to understand what's going on.
Cheers.
Jos
jose
re mem
- currently your PHP is on 64MB
- for PDF this should be about 96M
re PDO error
- not sure why that happens
- can you post the before and after changes to the php.ini file for our review
cheers
justin
also thanks harvinder and ifara for the posts!!
appreciated
cheers
justin
I think the PDO error is possibly because SI is not able to pickup PDO when php.ini is used to inscrease the memory, I think when checking for PDO in SI it makes use of the local php.ini rather than the server one. Maybe we can do something to default it to check to the server php.ini rather then the local one.
I currently use a subset of the original php.ini from the server copy and it works fine, but if I only just have the memory variable in the php.ini file it does not work. Unfortunately I am not able to post my php.ini for security reasons, but I can suggest if you can get hold of your original server php.ini and place it in your SI folder with changes to the php memory it should work straight away. You need to add something like this at the end of the php.ini file as well:
date.timezone="America/Chicago"
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
extension="ixed.5.2.lin"
zend_extension="/usr/local/Zend/lib/Optimizer-3.3.9/php-5.2.x/ZendOptimizer.so"
Hope this helps.
Thanks
Harvinder Singh
good stuff
Well... it works fine using the [b]Export window[/b].
In the [b]preview[/b] invoice (http://xxx/index.php?module=invoices&view=quick_view&id=5)
all menu exportation (PDF, XLS and DOC) give a blank page.
Thanks.
Jos
Hi
Now this could be an issue with the exporting links itself, try to copy the exporting links (URL's) and match if there are any differences. In my case both the links are exactly the same and both exports work correctly. The export links I have for both are:
http://xxx/index.php?module=export&view=invoice&id=90&format=pdf
Hope this helps.
Thanks
I don't think that this is a common solution to the problem. Most people running on providers simply do not have the option of custom php.ini. I tried a lot but I could only increase memory by ini_set to a max of 48M. Somehow providers limit the use of memory to protect their servers. Local on my system things are working great (this is realy the best I've seen in this field) but I couldnt get it running on three different providers...
albert
Hi,
If you experience problems with memory usage and you cannot change the php.ini you can try ammending the .htaccess file with something like:
RLimitMem 128000000
I use a hosting provider and it worked for me.
Matt
thanks matt
i've now added RLimitMem 128000000 to the default .htaccess
this should help some people
cheers
justin
This does not work on DirectNic hosting, I suggested them to enable it. Having said that, they suggest the following resolution:
You need to contact Simple Invoices to find out why you are receiving that error. Line 12 in that script is "$this->b = max($rgb[2] / 255.0, 0);". There is in an article located at http://stackoverflow.com/questions/415801/allowed-memory-size-of-33554432-bytes-exhausted-tried-to-allocate-43148176-bytes about memory usage and it is basically stating that your script is trying to use to much memory.
To change the memory limit for one specific script by including a line such as this at the top of the script:
ini_set('memory_limit','40M');
The 12M sets the limit to 40 megabytes (41943040 Bytes). If this doesn�t work, keep increasing the memory limit until your script fits or your server squeals for mercy.
You can also make this change permanently for all PHP scripts running on the server by adding a line like this to the server�s php.ini file:
memory_limit = 40M
jose you are a genius, that just worked!
lol
I have to second that...Jose is a genius.
For all other people searching this forum for a fix to the memory problem. Jose's fix worked for me when all the other's didn't.
I followed his directions and did the following:
1. I created a php.ini (in the simpleinvoices folder root)
2. I add the following line: memory_limit=-1
3. I also had the following code suggested from Harvinder but I don't think it's necessary for the fix:
date.timezone="America/New_York"
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
extension="ixed.5.2.lin"
zend_extension="/usr/local/Zend/lib/Optimizer-3.3.9/php-5.2.x/ZendOptimizer.so"
Hope this helps.
Thanks again Jose
Mike
Hi All,
We had the same issue, PHP 5.2 running on clearOS. we tried altering .htaccess and php.ini for memory and the index.php but all failed. the fix was to install php-xml (error can me seen as no native DCOM, using fallback DCOM, to view this error load 'simpleinvoice_folder/library/pdf/demo' and click sys requirement checking, top line should say native DCOM found, if not install PHP-xml.
For ClearOS users you must use
yum --enablerepo=timb install php-xml
Hope that helps some. As noted editing php.ini/.htaccess gave no working results.
It looks like you're new here. If you want to get involved, click one of these buttons!