Hi,
My question is kinda 2 fold, with the main one being about doing a database restore.
After upgrading to the latest version, I get the below error. I have contacted my service provider and they are reluctant to up the memory allocation. Is there anything I can do about this without getting the memory allocation upgraded?
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 19473 bytes) in /home/tnjb/public_html/bingoit.com.au/simpleinvoices/library/smarty/Smarty_Compiler.class.php on line 213
To get my system to how it was, I want to do a database restore. I did a backup prior to upgrading and I just want to know the best way of doing the restore.
Should a create a new database and run the back up script, or is there a way I can run the script against the existing database?
Or can I just connect the previous version of Simple Invoices to the upgraded database?
Thanks for your help.
hey terry
re restore
- create a new db and import the db backup into it
- point your old Simple Invoices at the restored db
- done
re memory allocation
- if the host wont change your memory limit theres not much you can do - apart from get a new host
- do you only get this when PDF and emailing?
Cheers
Justin
hmm.. never seen it on edit page before
did edit work fine in the old version?
cheers
justin
As already discuss in this forum, the memory allocation in php.ini doesn't work with a single line.
I had the problem and is solved with this php.ini content (I don't know if it works for you):
zlib.output_compression = on
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
memory_limit=-1 (this means unlimited memory)
Jos
thanks jose!!
terry - please test and let us know if this fixes the issue
-- will put up a FAQ post it if does
cheers
justin
hey terry
you can also set the php.ini settings in the Simple Invoices .htaccess file
refer: http://davidwalsh.name/php-values-htaccess
let us know if that works
cheers
justin
@ terry
Like Justin said, memory allocation can be done in .htaccess also. But I have no success with .htaccess
You can create a php.ini file and send it into the root SI folder (where we have .htaccess)
This is a php.ini specific for SI and is not the "main" or global php.ini file controlled by the host company.
@Justin
This is a recent "issue". Older releases don't need this trick. What's the reason for this?
Jos
Hi,
Thanks for your suggestions but I haven't had any luck. I tried all the lines as jmruas suggested as well as just the memory_limit line too with various values. No matter what I did I got the below error. I'm not sure if I'm doing something wrong or it simply doesn't work. FYI I used the syntax specifed on the example on the davidwalsh web page.
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
Error 500
Any other suggestions?
Thanks
Terry
@jose
not sure why this error has started to appear ??
@terry
sorry can't think of any other at the moment :(
if anyone knows anything about this please post
cheers
justin
thanks jose!
terry - let us know how you go
cheers
justin
It looks like you're new here. If you want to get involved, click one of these buttons!