Jump to content
TNG Community

Backup Living Script


thewag

Recommended Posts

Alright, glad to hear the good news. Here's the file with the corrected "Resore" fixed. =)

Ben,

Thanks for updating the mod and installing it in the admin directory. I have updated the TNG Wiki Backup / Restore Living Flag to point to the latest download, and the Admin Header Mod to update the Backup Living anchor to point to the new script name and location.

Link to comment
Share on other sites

  • Replies 116
  • Created
  • Last Reply

Top Posters In This Topic

  • thewag

    40

  • Ken Roy

    24

  • Scotty

    21

  • beckwith

    6

Top Posters In This Topic

Posted Images

Ben,

Thanks for updating the mod and installing it in the admin directory. I have updated the TNG Wiki Backup / Restore Living Flag to point to the latest download, and the Admin Header Mod to update the Backup Living anchor to point to the new script name and location.

Excellent! You just made my life just a little bit easier. Much appreciated.

Link to comment
Share on other sites

  • 1 month later...

I get this error when I click on the new link:

Fatal error: Call to undefined function: tng_adminheader() in /home/kb5wck/www/genealogy/admin/backupLiving.php on line 50

Am i missing something?

Excellent! You just made my life just a little bit easier. Much appreciated.

Link to comment
Share on other sites

  • 10 months later...

I followed the wiki instructions, downloaded and installed the backupLiving files with mod manager. It installed with no problems, but when I used it the first time I got the following:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 9913080 bytes) in W:\www\admin\backupLiving.php on line 351.

Line 351 tries to include_once ($backupfile).

Perhaps I need to increase allocated memory somewhere?

Any suggestions?

Link to comment
Share on other sites

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 9913080 bytes) in W:\www\admin\backupLiving.php on line 351.

Take a look at the backfupfile. Is it there? Does it appear correct (no odd characters for example)? What is its size? What are its read/write permissions?

Link to comment
Share on other sites

Take a look at the backfupfile. Is it there? Does it appear correct (no odd characters for example)? What is its size? What are its read/write permissions?

Yes, the backupfile (living_data.backup.php) looks normal. It is 2.9 GB and there are 82,609 lines of data in it. It quit at after record 13768, which is about half way through my database, and it added the php closing tag at the end. It looks like the file may have gotten too big and I've exceeded some sort of server limit. Have you tested it on files this large? I am running the script on my desktop localhost installation (Uniform Server). I will dig into the server config tomorrow to see if I can find a problem. Looking at it again, I'm wondering if the $living[] array in this file is just too large for the available memory......

Link to comment
Share on other sites

Yes, the backupfile (living_data.backup.php) looks normal. It is 2.9 GB and there are 82,609 lines of data in it. It quit at after record 13768, which is about half way through my database, and it added the php closing tag at the end. It looks like the file may have gotten too big and I've exceeded some sort of server limit. Have you tested it on files this large? I am running the script on my desktop localhost installation (Uniform Server). I will dig into the server config tomorrow to see if I can find a problem. Looking at it again, I'm wondering if the $living[] array in this file is just too large for the available memory......

Find php.ini, it's under usr/local/php, and load that file into your favorite text editor and search for "memory_limit" and increase the 32M to 200M and see what happens.

It will probably work now....

Scotty

Link to comment
Share on other sites

Yes, the backupfile (living_data.backup.php) looks normal. It is 2.9 GB and there are 82,609 lines of data in it. It quit at after record 13768, which is about half way through my database, and it added the php closing tag at the end. It looks like the file may have gotten too big and I've exceeded some sort of server limit. Have you tested it on files this large? I am running the script on my desktop localhost installation (Uniform Server). I will dig into the server config tomorrow to see if I can find a problem. Looking at it again, I'm wondering if the $living[] array in this file is just too large for the available memory......

WOW! That is a huge backup file. Mine's only 300k with 8449 lines. Oddly though, that doesn't scale to your 2.9GB. I know other people use it with larger databases, but I don't know how large. Generally if the script "fails" to finish writing, then there is not closing "?>" tag.

Things to check:

  • According to the TNG stats, how many living people are in your database?
  • Does that match the 13768 (assuming that is the ID in the $living array)?

I would expect an 80,000 line backup file to have a size of 3M, not 3G. I would go with Scotty's suggestion below first, but something seems odd about the size to record ratio.

Find php.ini, it's under usr/local/php, and load that file into your favorite text editor and search for "memory_limit" and increase the 32M to 200M and see what happens.

Link to comment
Share on other sites

WOW! That is a huge backup file. Mine's only 300k with 8449 lines. Oddly though, that doesn't scale to your 2.9GB. I know other people use it with larger databases, but I don't know how large. Generally if the script "fails" to finish writing, then there is not closing "?>" tag.

Things to check:

  • According to the TNG stats, how many living people are in your database?
  • Does that match the 13768 (assuming that is the ID in the $living array)?
I would expect an 80,000 line backup file to have a size of 3M, not 3G. I would go with Scotty's suggestion below first, but something seems odd about the size to record ratio.

My bad. Comes from working too late. The actual file size is 2.9MB. The closing tag tells me the file was created without error. The error came when it was 'included' in the script. Probably just a server setting needs to be changed.

I have around 25k total records, many erroneously marked living. I am in the process of correcting them and want to use your script when I get them right to keep them right. Thanks for the script and the feedback.

Find php.ini, it's under usr/local/php, and load that file into your favorite text editor and search for "memory_limit" and increase the 32M to 200M and see what happens.

It will probably work now....

Scotty

Thanks for the time-saving tip, Scotty. I try it later this afternoon and let you know.

Link to comment
Share on other sites

My bad. Comes from working too late. The actual file size is 2.9MB. The closing tag tells me the file was created without error. The error came when it was 'included' in the script. Probably just a server setting needs to be changed.

Whew! Glad to know that. I work with files of several Gigs at work, not with TNG. I've been puzzling what would have caused such an increase. Hope the mem increase helps. Let us know.

Ben

Link to comment
Share on other sites

Find php.ini, it's under usr/local/php, and load that file into your favorite text editor and search for "memory_limit" and increase the 32M to 200M and see what happens.

It will probably work now....

Scotty

Just edited the php.ini file as you suggested and everything worked. Thanks!

Whew! Glad to know that. I work with files of several Gigs at work, not with TNG. I've been puzzling what would have caused such an increase. Hope the mem increase helps. Let us know.

Ben

Scotty's php.ini suggestion fixed the problem. Everything normal. Thanks again for the script.

Link to comment
Share on other sites

You might want to play with that setting and see where your database breaks. Because if you ever go to a real hosting company they may not allocate enough memory on shared hosting accounts. And they may not allow you to change that number.

That setting also affects the thumbnail creation mechanism of TNG. GDlib requires a lot of temporary memory as you increase the resolution of an image file. A 3 meg image file would require +-30 meg of memory for the conversion.

Just some things to consider when selecting a hosting company.

Link to comment
Share on other sites

  • 3 weeks later...
David Mantione

I used the Mod Manager configuration script and the "backupLiving.php" document. Mod Manager installed it but when I went to run "Back Up Living" from either the left side or the Admin "Back Up Living" button, I get the following error:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /homepages/23/d260503398/htdocs/admin/backupLiving.php on line 8

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /homepages/23/d260503398/htdocs/admin/backupLiving.php on line 11

Parse error: syntax error, unexpected T_VARIABLE in /homepages/23/d260503398/htdocs/admin/backupLiving.php on line 12

Can anyone help on this?

Thanks

David from NYC

Mantione Family History

Link to comment
Share on other sites

  • 2 weeks later...

Find php.ini, it's under usr/local/php, and load that file into your favorite text editor and search for "memory_limit" and increase the 32M to 200M and see what happens.

It will probably work now....

Scotty

I just increased my database size significantly and now I'm having this same issue (the mod was working fine before). I tried to find my php.ini file and can't find it.

Any ideas so I can get this straightened out?

Bryan

Link to comment
Share on other sites

I just increased my database size significantly and now I'm having this same issue (the mod was working fine before). I tried to find my php.ini file and can't find it.

Any ideas so I can get this straightened out?

Bryan

Hey Bryan, it varies on OS and distribution and server package. Please give details.

Link to comment
Share on other sites

I just increased my database size significantly and now I'm having this same issue (the mod was working fine before). I tried to find my php.ini file and can't find it.

If you go into the TNG Admin ------> Setup ------> Diagnostics screen and get the PHP Info Screen, that will tell you the path to the php.ini file in there - it's the 6th item down on my server.

Roger

Link to comment
Share on other sites

If you go into the TNG Admin ------> Setup ------> Diagnostics screen and get the PHP Info Screen, that will tell you the path to the php.ini file in there - it's the 6th item down on my server.

Roger

Or that...

Leave it to me to try something harder!

Link to comment
Share on other sites

If you go into the TNG Admin ------> Setup ------> Diagnostics screen and get the PHP Info Screen, that will tell you the path to the php.ini file in there - it's the 6th item down on my server.

Roger

OK, so I found my path: /usr/local/etc/php5/cgi

Perhaps I am showing my lack of knowledge, but I can't seem to get to that path. Do I use a browser, an FTP client, cPanel? I have tried all 3 and can't seem to find my way there. Do I download the php.ini file using FTP or some other way.

Thanks,

Bryan

Link to comment
Share on other sites

OK, so I found my path: /usr/local/etc/php5/cgi

Perhaps I am showing my lack of knowledge, but I can't seem to get to that path. Do I use a browser, an FTP client, cPanel? I have tried all 3 and can't seem to find my way there. Do I download the php.ini file using FTP or some other way.

Thanks,

Bryan

Sounds like you're one a hosting provider. If that's the case, then you won't be able to edit that php.ini file. You're SP may allow some overriding, but that will depend specifically on the SP.

Link to comment
Share on other sites

Sounds like you're one a hosting provider. If that's the case, then you won't be able to edit that php.ini file. You're SP may allow some overriding, but that will depend specifically on the SP.

With that said, would the best approach be to contact my host (Lunarpages)?

If they will not allow an override, what should my next step be?

Thanks,

Bryan

Link to comment
Share on other sites

With that said, would the best approach be to contact my host (Lunarpages)?

If they will not allow an override, what should my next step be?

Thanks,

Bryan

A quick google of "php ini override" gives How to override php.ini as at least one method. I'd look the the SP's FAQ and such first, try a few alternatives, and if nothing works, then contact them. I would guess that SP's may be hesitant to allow overrides, especially of settings that could impact other users of the server. Guess I'm suggesting a "Better to ask forgiveness then permission" scenario.

I don't use a SP, so hopefully others will chime in.

Ben

Link to comment
Share on other sites

With that said, would the best approach be to contact my host (Lunarpages)?

If they will not allow an override, what should my next step be?

Thanks,

Bryan

Bryan,

Looking at the support forums on Lunarpages, they appear to allow php overrides. The location of the php.ini file may not be accessible to you, since I believe that is the server's php.ini file. On ICDSoft, mine shows as Configuration File (php.ini) Path .:/etc but then the Loaded Configuration File shows my account rootpath.

So you should be able to place your php.ini override in your account rootpath on Lunarpages.

Link to comment
Share on other sites

Bryan,

Looking at the support forums on Lunarpages, they appear to allow php overrides. The location of the php.ini file may not be accessible to you, since I believe that is the server's php.ini file. On ICDSoft, mine shows as Configuration File (php.ini) Path .:/etc but then the Loaded Configuration File shows my account rootpath.

So you should be able to place your php.ini override in your account rootpath on Lunarpages.

Ken,

Thanks! that did it!

I created a php.ini file with following text:

upload_max_filesize = 50M
post_max_size = 50M
Then I updated my .htaccess file with the following line of code:
suPHP_ConfigPath /home/USERNAMEHERE/public_html

Not knowing what the original php.ini file looked like makes me a little nervous. Is it possible that I omitted something important? Could my override cause any problems?

Thanks again,

Bryan

Link to comment
Share on other sites

Ken,

Thanks! that did it!

I created a php.ini file with following text:

upload_max_filesize = 50M
post_max_size = 50M
Then I updated my .htaccess file with the following line of code:
suPHP_ConfigPath /home/USERNAMEHERE/public_html

Not knowing what the original php.ini file looked like makes me a little nervous. Is it possible that I omitted something important? Could my override cause any problems?

Thanks again,

Bryan

Bryan,

As indicated in the TNG Wiki article on PHP Overrides,

You will need to check with your hosting service as to what other parameters you may need to include for compatibility reasons.

Link to comment
Share on other sites

  • 1 month later...

Alright, I got tired of changing things in my local software, uploading the gedcom, and then having to set the living flags....again! So I created this script that will backup and restore living flags.

Small cavets (sp?):

personID numbers can't change

gedcom names can't change

it is still in rough form.

This is still very rough, but it works!! The only item it touches is to add the living flag to people you select on restore. I doesn't change anybody elses flags. Only the ones you select. It won't remove living flags.

Hope someone else finds this usefull.

Ben

all

This is my first attempt to install a TNG Mod so please bear with me if I'm doing something stupid (happens sometimes :cool: ). I installed Mod Manager and ran it for the first time. Seemed to have worked fine except for two things: (1) it shows up in the rightmost column on the Admin Home page with the left column blank (I'm referring to the main window, not the left sidebar), aqnd (2) when I login as a non-admin user, the Administration link shows in the left sidebar of the Home Page, but not in the Info drop-down menu. These are not my immediate concern. I mention them only if they might have a bearing on my problem installing the Backup Living Flag mod. Just prior to installing Mod Manager, I updated TNG from v7.1.2 to v7.1.3 using the update zip file. Everything seems to have worked fine, except as noted above. Oh yes, I'm running WAMP under XP. Haven't uploaded to my live domain yet.

Now to my real problem. I unzipped the Living_flag_backup_v2.1 download (from Wiki). The only file in it was living_flag_backup_v2.1.cfg which I copied to tng/admin/mod_folder. When I run Mod Manager I get a Cleanup message: ADMIN/LEFTBANNER.PHP LOCATION1 NOT INSTALLED and ADMIN/MAIN_PHP LOCATION 1 NOT INSTALLED LOCAL COPY OF /MOD_FOLDER/BACKUPLIVING.PHP FOR INSTALLATION IS MISSING. So it appears there should be another file in the downloaded zip file?

Thanks for your help in advance. I am really impressed with this program. Am looking forward to going live after I get my desktop genealogy file (RootsMagic 4) cleanedup. TNG has certainly spurred me to do that.

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.


×
×
  • Create New...