Ren, this answer I gave a while ago to another user is relevant for you:
Depending on the memory allocated to PHP, there is a limit to the number of messages that can be handled by the script because the size of the database file grows in time, until it will reach the allowed memory limit set by your web host.
So you need to take some posts out from the messages database and maybe archive them in static form. If you look at the bottom of this page you will find the links to my posts archives, so you get the idea.
Here's my suggestion to create an archive file:
- backup your posts/posts.txt file, make a copy
- download the posts.txt file. In the file each line corresponds to a message. You should edit this file by using a source code text editor ONLY, for example Komodo edit is a great free one.
- Select from the posts file the lines corresponding to the messages you wish to archive, say the first 2000 lines for example.
- copy these lines to another text file, call it posts2.txt
- upload the posts2.txt file in the posts folder
- change the name of the old posts file to something else, say posts_full.txt
- change the name of posts2.txt to posts.txt
- go to admin/configuration, select the option to have max 10.000 posts per page. So that now all the posts will go in a single page
- save configuration.
- Go to the html guestbook page (that will now contain all the posts to be archived, in a single page) and save it as archive.html
- put the lines of the posts.txt file that you wish to keep in the guestbook (the ones you did not put in the posts2.txt file), in a new file, call it posts3.txt. Mind that THE LAST LINES OF YOUR POST FILE MIGHT NOW BE CORRUPTED because you reached the memory limit, so have a close look in particular to the LAST LINE and delete it if it does not look right
- Replace the posts3.txt file with the present posts.txt file in the server, upload and rename posts3.txt to posts.txt
- change permission of this file to 666
- upload the archive file and link it to your guestbook page
- you are done. To update the guestbook with the new, smaller posts database you need now to either make a post or save configuration.
Let me know. First thing, make a solid backup of your posts.txt file.
Also consider replacing the log.txt file with a new, empty one (backup the old one first), and then again ge sure to chmod to 666. |