Uutiset:

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

Main Menu
Advertisement:

Attachments

Aloittaja Doug, joulukuu 30, 2004, 09:07:20 IP

« edellinen - seuraava »

Doug

I have attachments turned on in permissions, boards set at global, attachments set at 500KB per post, attachment folder set at 1000000, but I cannot even upload a 3kb attachment.  I am using the Helios theme and just updated to 1.0 (sorry I posted this in wrong section).  I am using Coppermine too with the SMF bridge.


Thanks,

Tee

http://customplaygolf.com

YAP Portal

Tony Reid

Is the attachments folder writeable? you could try chmoding it 666
Tony Reid

Doug

It is writable.  Let me try that.  Thanks


Tee
YAP Portal

Doug

Nope that didn't do anything.

Tee
YAP Portal

A.M.A

What is the error message given!
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Doug

Your attachment couldn't be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.

Please consult your server administrator for more information.

Tee
YAP Portal

Trekkie101

What is phpinfo.php? - Would help

Could you check that tmp_uploads_dir actually has a directory its been causing a problem with another user.

pacolls

Hello, I have the same problem, my server is powweb and this is posible solution, but I'm not to be solved the problem.

http://forum.powweb.com/showthread.php?t=44687

Where there is to put the changes, Smf not using php.ini ???


Member Of ClubDevelopersTeam

Gray

The server I've got a problem with is powweb, so thanks for the link.

LainaaIf you use PHP to upload files, you need to have a custom php.ini. You need to uncomment and edit the upload_tmp_dir variable to point to a directory that is writeable by you, which would be your home directory or a subdirectory inside your home directory. DO NOT change that directories permissions to 777, it is already writeable by your php scripts if it is the default 755.

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = /www/u/username

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

That's what they are saying, so....

Lainaa;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir = /www/h/a/hattrick-scotland.com/htdocs/tmp

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
is what I put in, it's still not working, so I presume I need to do something else, to 'uncomment' it. I created a new '/tmp' folder, so it should be on the system default of 755.
Can someone tell me what? Sorry I'm ignorant with this stuff, some of it I can follow, but a lot of it just confuses the hell out of me :(
Gray

Doug

#9
PHP's default upload_tmp_dir was /tmp, which is no longer world writeable as this is where the worms using the phpBB exploit download their programs to spread. This was necessary to stop our servers from attacking others. Your scripts should not download files to this area anyways as it is not available on all the servers your site is hosted on.

If you use PHP to upload files, you need to have a custom php.ini. You need to uncomment and edit the upload_tmp_dir variable to point to a directory that is writeable by you, which would be your home directory or a subdirectory inside your home directory. DO NOT change that directories permissions to 777, it is already writeable by your php scripts if it is the default 755.


;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = /www/u/username

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

Please note that if you are uploading files larger than 2MB's you will also need to change upload_max_filesize.

You have it right except you need to uncomment the upload_tmp_dir=/www/u/username by removing the ;

My attachments are back working fine now, I wonder if this is just powweb.com server?  Thats my server as well. 

Anyway thanks for all the friendly help here at SMF.

Tee
YAP Portal

pacolls

in which file is necessary to do that?

Member Of ClubDevelopersTeam

Doug

php.ini file in which you can get a copy at:powweb.com - php.ini file


Tee
YAP Portal

Gray

Thanks Tee, that's it working again now :)
Cheers to the others who helped me with this as well.

PS - Powweb seem to have a habit of changing their server configuration with the only notification being on their forum.
That's 3 times that I know of since we setup with them earlier this year, that they've made a change that broke something.
Gray

Doug

I have been a powweb customer for about 4 years, and they are a bunch of great people over there.  Yes, I have had some problems, but for the most part they have been 98% for me. 

I have watched them grow and make changes, but for the money where else can you get 2 gig storage and 5 gig transfer daily for 7.77 a month and get free domain and setup to boot!

:D

Tee
YAP Portal

Gray

Yeah, they seem to be fairly decent as far as uptime goes.
My only real issue with them is speed to be honest. The website seems to be a bit slow in comparison to the other website I have with Snaapz.
Gray

pacolls


Member Of ClubDevelopersTeam

hutch--

I have eventually got the attachments to work. This is for Powweb.

Create a temporary file directory off your htdocs root. I called mine "temp_dir"

use your FTP program to change the directory's attributes to 777.

Create a php.ini file with content like this.

register_globals = 0
allow_url_fopen = 0
file_uploads = On
upload_tmp_dir = /www/m/yourdomainname/htdocs/temp_dir
upload_max_filesize = 2M

Put the php.ini file in your domain name root, IE: htdocs

The attachments should then work.
Regards,

hutch at movsd dot com
http://www.masm32.com

Advertisement: