News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Configure multiple attachment directories does not show pathes

Started by hartiberlin, October 27, 2012, 06:54:24 PM

Previous topic - Next topic

hartiberlin

Hi All,
I have moved my SMF 2.02 / PortaMX 1.51 domain
to a new hoster.

I also used repair_settings.php
to adjust all the pathes.

I had 2 attachments directories for all the attachments,
called:

/attachments
and
/attachments2

But now in

[Configure multiple attachment directories]

there is not shoing up any path...

See enclosed picture...

How can I get again set the right pathes there ??

I just wanted to add a 3rd directory and just saw
that there are no pathes anymore available there...

Many thanks.
Regards, Stefan.

P.S. I also checked all the permissions and Settings.php
and all seems okay....but the pathes do not show up there in
the admin control panel....

hartiberlin

P.S: I searched for this error here on the simplemachines forum and in earlier SMF2.0 RC Versions there seems to have been
an error in

repair_settings.php

which corrupted the database...

Maybe there is still this error today in the current
repair_settings.php ?

I have seen that in the path for the PNG Avatar upload there was still a wrong path AFTER USING
repair_settings.php ....

But after editing that it still does not show the
Multiple attachments paths
under
Configure multiple attachment directories
in the SMF Admin control panel....

Any idea how I could fix this now ?
Many thanks.

hartiberlin

As it is pretty urgent,
how can I fix it in PHPMYAdmin ?

Where are the pathes exactly stored for this
in the database ?

Please let me know, so that I can add this again.

In this moment all the attachments give only 404 error...

Many thanks.

Regards, Stefan.

Kays

Hi, click on the "Add Path" button and re-input the paths to your attachments folders. If uncertain of the paths, just the name of the folders should do.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

hartiberlin

Exactly that does not work to add a path !


I just tried to edit the smf_settings table via PHPMYADMIN.
I just edited the path again in as this way:

a:2:{i:1;s:66:"/www/htdocs/xxxxx/overunity/attachments";i:2;s:67:"/www/htdocs/xxxxx/overunity/attachments2";}

But also this does not help...

The pathes do not show up and I can not add a new path !

Kays

In the settings table, what is the value for currentAttachmentUploadDir?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

hartiberlin

It is the code I posted above...

Well now it worked to add a new directory and I just added the 2 directories now again.

Only in the second directory it said, that that there are 0 files, which is not true...

I am doing now a file maintenance and will see, if I can get it to work again...

Maybe the SMF script have not yet succeeded to read the whole huge directories !

Also sometimes also Filezilla chokes to display the almost 50.000 files in these
directories !

There are much too many files in there.

Is there any easy way to move some files to other directories without screwing up
the database ?

So maybe it would be much better to have only maximum 1000 files per directory !

Kays

What you posted was attachmentUploadDir not currentAttachmentUploadDir. Which what is used to display multiple directories.

Quote
Only in the second directory it said, that that there are 0 files, which is not true...

In the attachments table what are the numbers for "id_folder" One number should be 1, what is the second number? This will be the id for the second folder.

Quote
Also sometimes also Filezilla chokes to display the almost 50.000 files in these
directories !

That's normal for FTP clients. They can only show about a thousand or so.

Quote
I am doing now a file maintenance and will see, if I can get it to work again...

Don't take any action until you can get the folder ids sorted out.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

hartiberlin

Okay,

I had another look, you are right,

it is :

currentAttachmentUploadDir 3


So it just has the value 3

Should I just try to set it to 2 for instance ??

I will just try this now...

hartiberlin

I just tried to set it to 2 and then there is no default directory radio button...


Now it looks like this.

He does not find all the files in the
/attachments2 directory.

In the
/attachments3 there are not yet any files...


Regards, Stefan.

Kays

Quote
In the attachments table what are the numbers for "id_folder" One number should be 1, what is the second number? This will be the id for the second folder.

What is the id of the second folder there?

Also can you post the value of attachmentUploadDir as it currently is. Please don't x out any info in it.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

hartiberlin

Well,
about the first 50.000 files have id_folder 1
values and from about 60.000 on all the files
have

id_folder 2 values, whiich should be expected ....

So this seems right...

I just xxxxx - ed out only my username....

( so nobody from here can hack my path...)



Okay,
here is the attachmentUploadDir


a:2:{i:1;s:42:"/www/htdocs/xxxxx/overunity/attachments";i:3;s:43:"/www/htdocs/xxxxx/overunity/attachments2";}

Kays

Try changing that to:


a:2:{i:1;s:42:"/www/htdocs/w00fbde5/overunity/attachments";i:2;s:43:"/www/htdocs/w00fbde5/overunity/attachments2";}


The id for the second folder there was 3.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

hartiberlin

Okay, I just edited in the last code the 3 to 2 and now it seems to work....

I have to recheck it all now and see, if all attachments will load....


Also I have seen that some other pathes in the smf_settings table
are still wrong...when I scrolled through it with  PHPMYADMIN

so it seems repair_settings is not fully doing its job right....


Have to write all the pathes down and will post them here....
I am already very tired, so will do this tomorrow...

Many thanks for all your great help.

Regards, Stefan.

Kays

Great, that should do it for that. :)

If you have custom themes, do check the paths there as well.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

hartiberlin

In the download Mod there I also had to adjust the pathes...

Also here is one value that have to be changed in
the smf_settings table:

package_server

was still set to my old FTP server...


Kays

Cool, if you've got it all sorted out. Please mark this as solved. )

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

ModelBoatMayhem


My server is also struggling, is there a way of moving attachments around into new directories?


Quote from: hartiberlin link=topic=489321.msg3428898#msg3428898
There are much too many files in there.

Is there any easy way to move some files to other directories without screwing up
the database ?

So maybe it would be much better to have only maximum 1000 files per directory !
That's my firm opinion.... but what do I know?!

Kays

Unfortunately, not at present. There will be for 2.1 though.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

ModelBoatMayhem

That's my firm opinion.... but what do I know?!

Jorge_CS_

Hi,

I write here to avoid opening a new topic, I have SMF 2.0.3 and I don't have the option to add another attachment folder, can you please help me?

Advertisement: