![]() |
Moving attachment database error
I am trying to use the "moving attachment from the database to a directory" feature, but when I click the go button I get the following database error.
Can someone please help me? Thanks, Adam Warning: mysql_query() [function.mysql-query]: Unable to save result set in [path]/includes/class_core.php on line 408 Database error in vBulletin 3.8.1: Invalid SQL: SELECT attachmentid, filename, filedata, filesize, userid, thumbnail FROM srvb_attachment WHERE attachmentid >= 1 AND attachmentid < 301 ORDER BY attachmentid ASC; --------------- Added [DATE]1240357897[/DATE] at [TIME]1240357897[/TIME] --------------- anyone? |
I am still get this error could someone please help me. I am running out of database space.
Thanks, Adam |
The important part of the database error is the part after what you posted. It gives the mysql error number and other stuff.
Did you create a folder to put them in? And did you chmod it to 777? And is it above your forum root (don't put it in the forum folder or in the public_html folder)? And is the path correct? |
Yes, I have created a folder with the chmod of 777. Also, I have my url pointing to a folder called "vbulletin" and all of the forum files are located in there. How would I put the the attachment folder above the forum root folder. The section where I enter the "Attachment File Path" url wont let me put a "http" in the front of it.
Adam |
You do not need to put http in front of it, it should be a full local path on your server.. For example your public_html folder will usually be something like this
'home/USER_NAME/public_html' |
Quote:
'home/USER_NAME/attachments' |
Ok, I have gotten that far but when it asks me "Number of attachments to process per cycle" I have it set to 200 and tried 100, 300, 50, but when I hit go I get the database error.
Could there be something wrong with the core.php file? |
Give us the full database error
|
As RLShare said, we need to know what the exact database error is. You can either view the page source and you'll see it near the bottom of the page, or if they get emailed to you, copy/paste it from the email (you may xxx out the ip address if you wish).
|
Yeah sure, here is a copy of the database error i receive in my inbox ever time I try to preform it.
Thanks for the help everyone! Adam Database error in vBulletin 3.8.1: Invalid SQL: SELECT attachmentid, filename, filedata, filesize, userid, thumbnail FROM srvb_attachment WHERE attachmentid >= 1 AND attachmentid < 301 ORDER BY attachmentid ASC; MySQL Error : Lost connection to MySQL server during query Error Number : 2013 Request Date : Thursday, May 7th 2009 @ 08:57:31 PM Error Date : Thursday, May 7th 2009 @ 08:57:34 PM Script : http://stunodracing.com/admincp/atta...moveattachment Referrer : http://stunodracing.com/admincp/atta...o=doswitchtype IP Address : xx.x.xxx.xx Username : stunod Classname : vb_database MySQL Version : |
That's a problem with your server. It could be your wait_timeout. But, you will need to talk to your host about this. (That is the error when trying to do it with batches of 300, you may have to do much smaller batches.)
|
Ok, thanks! You were right! I did it in a batch of 10 and it moved them into my folder. But, If I wanted to do this once a month or so, can I put them in the same directory that I just did or do I put it in a different directory? Also, is this something this is ok to do once a month?
I just looked at my database and it still says that there is 69.9mb of the attachements. How, or what do I do next now that I have moved them to the directory? Thanks, Adam |
Go to Maintenance > Repair/Optimize Tables > select the Attachment table > Repair/Optimize > Go That will reduce the size of your attachment table.
You don't need to do this once a month. For now on, anytime someone uploads an attachment, it will get put into that folder. |
Oh sweet! You differently know your stuff!
Thanks a million! Adam |
Sometime is takes a while for the sizes to change in the database but I have waited forever and the database size has not changed. I dont think it has grown much but, I still need it smaller. Any ideas on how to make in smaller. I looked in the ftp location that I told the attachments to go to and they are there.
Adam --------------- Added [DATE]1242507175[/DATE] at [TIME]1242507175[/TIME] --------------- Ok, I just tested the database "vb_attachments" and logged into the "phpmyadmin" and deleted an attachment in there and found out that it deletes it out of my forum as well. I though the images were saved in the ftp directory and will not be saved in the database anymore. I'm I missing something? Adam |
The attachment table still keeps information in there about the attachment, even though the attachment itself isn't there.
Did you run a repair/optimize on the attachment table after moving them out of the database and into the files? The size of the table will not change until you do so. |
Yes, I have done that!
|
All times are GMT. The time now is 02:29 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|