News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

404 - Attachment Not Found... after db import with 5000+ attachments to new host

Started by forum4ttt, February 21, 2009, 06:33:04 AM

Previous topic - Next topic

forum4ttt

changed hosts...installed SMF 2.0

imported old db....forum looks and works fine with the exception of attachments

can not view or add attachments

when I click on links to old attachments I get 400 error  (see attachment)

when I try to add a new attachment I get Internal Server Error

when I go to Admin/Forum/Attachments and click on Attachment Settings, under Attachments Directory(red text) is says 'Configure Multiple Attachments Directories.  Clicking on that it shows the correct path and 5031 attachment however under Status it says 'Does Not Exist'

when I click on File Maintenance I get Internal Server Error

Strange because under Browse Files/Attachments it lists all the attachments with all the correct information about each....however when I click on a link I get a 404.

How can it find them yet not find them?

Permissions on the attachments folder are 777 and on the .htaccess and Index.php 755


forum4ttt

#1
now I have done it

tried repair_settings.php and lost the link to the 5031 attachments...i.e. no longer listed in Browse Files and no longer listed in threads

went to the db and they are still all there

changed link back in repair_settings.php however no effect....i.e. still not listed in Browse Files or in threads

ideas?

clearly this is a path/URL problem from moving the db to the new host?? 

when I changed the path in Attachment Settings to '/home/content/s/m/o/...../html/smf/attachments' the red text went away ....however of couse it now shows 'Not in Use' under Status...and I still get an Internal Server Error when I click on File Maintenance

forum4ttt

using repair_settings.php I changed all the URLs to URLs and the paths to the relative path per the recommended setting

still does not work

can not use New Topic, PMs and can not see any attachments

all of the above generate Internal Server Error

Help please someone.  Really annoying being this close to a working forum

I am able send newsletters to contact members but that is getting old

forum4ttt

ok...fed up with trying to fix that

so...dropped all the tables from the new db...imported old again

shows 5031 attachments in db and in Browse Files...however thumbnails missing and links lead to 404

using AccountSettings and Configure multiple attachment directories shows 'Files Missing [Repair]'....clicking repair leads to all files being deleted via Manage Attachments...see attached....

PM now works....

can not use New Topic....does not create error however does not create thread either

I am at a loss here....

any ideas please?


j3cubcapt

I'm in the same boat. I ran the repair_settings.php but no luck. I used "BigDump.php" to do the import to a GoDaddy hosting server.

Let's keep each other posted on any positive developments.

Will
Dallas

forum4ttt

#5
interesting...my host is GoDaddy also

should not think that would make a difference though

my next thought was to use their built-in/add-on SMF feature and then import my old db into that

have you tried this?

I set SMF up the usual way with a new install of 2.0 and then the db import via phpMyAdmin.  Do not know if installing SMF via GoDaddy would make a difference.

also...if you use GoDaddy File Manager/Permissions and look at the SMF folders, are the attachments, Cache and Packages folders all password protected (see attachment and key icon at my pointer)?

Xylar2

They are password protected is what your problem is. Take that off and try again.

forum4ttt

#7
thanks for the reply Xylar2

tried to remove via File Manager....takes about 4 mins and says successful but does not remove it....contacted GoDaddy and they said if I rename the .htaccess file to xxx.htaccess it will remove the protection

I assume this will not work for SMF but have not tried it yet....

...tried it...it removes protection from File Manager point of view but does not change SMF ...i.e. still get 404.  What do I need to do in SMF(ie. did not re-import db) ?...paths have not changed...folder not protected and still can not find files in db

forum4ttt

#8
Browse Files shows 168 pages of attachments

Attachment Paths shows 5031   <<< click on Repair here and it loses all attachments...i.e. shows 0

File Maintenance shows 2519

all attachments have links in threads where they should be (but no thumbnails)

and clicking on any link gets 404....

forum4ttt

#9
reviewed this post on phpMyAdmin db export
http://www.simplemachines.org/community/index.php?topic=184356.0

and thought maybe I exported db incorrectly due to using Compatibility Mode = MSSQL

so did export/import again with Compatibility Mode = MYSQL40....same problems

j3cubcapt

Quote from: forum4ttt on February 22, 2009, 02:41:48 AM
GoDaddy File Manager/Permissions and look at the SMF folders, are the attachments, Cache and Packages folders all password protected (see attachment and key icon at my pointer)?

This was a good thought, but I have no password protections set. I'm thinking that GoDaddy is our problem. Are you on the "Grid" hosting plan? I moved from SiteGround because of server activity usage limits and the GoDaddy grid hosting offers unlimited server usage.

Will

forum4ttt

#11
Quote from: j3cubcapt on February 22, 2009, 09:52:04 AM

This was a good thought, but I have no password protections set. I'm thinking that GoDaddy is our problem. Are you on the "Grid" hosting plan? I moved from SiteGround because of server activity usage limits and the GoDaddy grid hosting offers unlimited server usage.

Will

no idea which plan...most basic Linux is all

can not be GoDaddy since they offer SMF  as an addon.....must be working for thousands of users I would expect

must be something to do with the import. ...I am wondering if it is SMF 2.0 and its php requirements....see readme.html in the install files (partially attached)

I am going to contact GoDaddy and see if they meet the part re 'upload max filesize'

j3cubcapt

Yea you are probably right. SMF must be working for others. I agree that the import must be the problem for both of us. I'm still using 1.7 and will upgrade to 1.8 as soon as I get this working.
How big is your DB import? Mine was about 16mb, that is why I used "BigDump.php" to break it up into 2mb bits.

Will

forum4ttt

#13
mine is only 4 mg

thought you were using SMF 2.0 since on this board.  I thought maybe our problem was 2.0...and was going to downgrade....so that answers that question

btw...GoDaddy offers SMF 1.1.5 which I have read is easily hacked...tech said they have not had any issues...interesting

forum4ttt

#14
godaddy MySQL is 5.0....PHP is 4.x

could problem be PHP settings

maybe need a tmp file in attachments folder

do not know why the mins are set in SMF 2.0 readme.html file yet in the php.ini file that came with SMF 2.0 those settings do not appear

forum4ttt

#15
Could someone please explain how in Admin/Attachments and Avatars/Browse Files both Attachments and Thumbnails show 168 pages of attachments and those same attachment links (without thumbnails) are listed in their respective forum threads and yet clicking on any of the links reslults in a 404?

The paths and URLs are correct.  SMF can access the db for themes, smileys, members, etc. and yet not for attachments.

permissions on attachments is 777

does it have something to do with the query via index.php?
for example: http://www.mysite.com/smf/index.php?action=dlattach;topic=1513.0;attach=9722
clearly the topics are in place as the forum looks and functions normally other than no thumbnails, 404s and can not create New Topic
perhaps the topic number and attach number are wrong because I imported the db to a new install?

is the .htaccess file causing an access problem (i.e. shows as password protected in GoDaddy File Manager) ...see attached pic

going crazy over this...please help if you can

Rumbaar

Attachments are physical files and not stored inside the database.  The only information is the details about the attachments inside the database, but the files need to be physically present in the forums /attachment (or defined) folder.  You need to restore those files from your original source folder.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

forum4ttt

thanks...I wondered about that

will need to upload 5000 files then....woah

Rumbaar

That is correct.

Let us know how you go, I'll close your Helpdesk ticket.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

j3cubcapt

I do have all of my attachments on the new server, I just can't get SMF to see them. The Old Server folder and the new one have same number of files and the same folder size.

Will

Advertisement: