I added the new version upgrade earlier today and now the forum will not accept attachments, it generates an error message instead after you try and make the posting that has the attachment. I am basically getting this message.
Lainaa
An Error Has Occurred!
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.
I have the attachments enabled and set to 265k and it was working perfectly before I did the upgrade. Any suggestions here ?
There is a discrepancy in the help data from admin with the attachment settings and the interface.
The help says,
Lainaa
Allow guests to post attachments?:
Select if guests can attach files to posts.
But the 3 options in the combo box are,
Diable Attachments
Enable All Attachments
Disable New Attachments
Regards,
hutch at movsd dot com
As it says the upload may have taken too long and aborted or you dont have any space left on your space. Maybe try a faster connection or get more space.
No, I use a fast ADSL connection and the error comes up quickly anyway. I am not the only member who has the problem. I have climbed over every setting I can find and they are all set as enabled so its something else. I have about 1.9 gig free disk space on the server so its not that problem either.
Can you FTP up stuff, has php.ini been changed at all?
This is the content of the php.ini file in the domain root.
register_globals = 0
allow_url_fopen = 0
I can upload files to the server with FTP as normal. I checked the directory permissions and nothing has changed, its the same as the rest.
Do any of the other file upload functions work, such as the package manager, smiley set manager, or theme interface?
Lainaus käyttäjältä: hutch-- - joulukuu 30, 2004, 08:36:27 AP
There is a discrepancy in the help data from admin with the attachment settings and the interface.
The help says,
Lainaa
Allow guests to post attachments?:
Select if guests can attach files to posts.
But the 3 options in the combo box are,
Diable Attachments
Enable All Attachments
Disable New Attachments
I can't find this in my copy. Are you sure all your files are up to date?
-[Unknown]
I've got this problem as well :(
www.hattrick-scotland.com/forum/ (http://www.hattrick-scotland.com/forum/)
It was working prior to the upgrade to 1.0, now it's giving me the above error.
I've checked the permisssions, and they look to be setup ok, so not sure what's wrong.
If someone wants Admin, FTP access to look into this for me, I'll PM the details to them.
PS. A test forum on this server has this problem as well, but another forum i run on a different server, upgraded without any problems, so it may be server related.
@ Gray
What php version are the two servers running, and what version of Zend, infact just post two phpinfo liks.
What is phpinfo.php? (http://www.simplemachines.org/community/index.php?topic=18250.0)
www.hattrick-scotland.com/phpinfo.php (http://www.hattrick-scotland.com/phpinfo.php) the problem server
www.thevizzinifamily.co.uk/phpinfo.php (http://www.thevizzinifamily.co.uk/phpinfo.php) the ok server
I wan't sure what php/zend was on each server at the time, so I did the update in the package manager when it was released to make sure I would be ok.
Gray the problematic server has a max upload file size of 2M and the other 8M so is there still a problem or not.
Yep, still can't upload.
The jpeg I'm trying to upload is only 29.9kb, and the forum is set to allow up to 256kb.
I tried it with a gif file as well, same problem.
I think i got it, just need someone to confirm,
in the probalematic server there is not an upload tmp dir
Lainaaupload_tmp_dir no value no value
And in the working one it says
Lainaaupload_tmp_dir /tmp /tmp
I wonder if thats it, could you set it or ask your host to try. Or does anyone think im way off.
Hmm, I'm not the actual account holder on that server, so I'd need to email the account holder to get them to make the request if that's the problem.
Can we confirm if that is indeed the problem before I do that?
Hopefully someone will buzz in and reply soon. Thats just a maybe though it could be a lot of other things but i noticed that one.
my php.ini has this:
Lainaa; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =
as you see it isn't specified.
my phpInfo();
Lainaaupload_tmp_dir no value no value
Also upgraded my testboard to 1.0 and I can upload there. That with the comments in php.ini I don't think that should be the problem.
isn't the partition with the tmp-folder on it full? (I hope not) You can try of course setting your tmp-folder to a subfolder of your home-directory.
What OS, Linux?
He is on BSD so it may differ a bit.
yup, Debian (Sarge). Altough I expect that PHP should work the same on things like that over different OS-systems.
php.ini-dist and php.ini-recommended have the same comment. But then again, I know zip zada nothing about freebsd :-[
It was just a guess really on my part just the one that worked had a path the other didnt.
Well, interesting. I'd guess it's a /tmp thing.... probably the not working host doesn't have /tmp writable. Many hosts are doing this in response to the worm, I expect.
Try something like this:
<?php
echo '<form action="', $_SERVER['PHP_SELF'], '" method="post" enctype="multipart/form-data"><input type="file" name="text" /></form>';
print_r($_FILES);
print_r($php_errormsg);
?>
-[Unknown]
Sorry, but I'm a complete idiot when it comes to coding.
What are you wanting me to do with this code? Or where are you wanting it put?
In a notepad document, then save it as thingy.php and make sure there isnt a .txt extension and then upload it to your server space and then tell use the result.
ok, wasn't 100% sure where you wanted that uploaded to, so I stuck it up in a couple of places :p
www.hattrick-scotland.com/11.php (http://www.hattrick-scotland.com/11.php)
and
www.hattrick-scotland.com/forum/11.php (http://www.hattrick-scotland.com/forum/11.php)
Same error message when trying to upload within the forum though.
Oops, forgot the submit button :-[.
<?php
echo '<form action="', $_SERVER['PHP_SELF'], '" method="post" enctype="multipart/form-data"><input type="file" name="text" /><input type="submit" /></form>';
print_r($_FILES);
print_r($php_errormsg);
?>
-[Unknown]
OK, tried that, still doesn't work in the forums themselves.
Got the following from running that code.
LainaaArray ( [text] => Array ( [name] => lieutenant.gif [type] => [tmp_name] => [error] => 6 [size] => 0 ) )
OK, I plugged in the suggested PHP code and ran it and it produces an edit control, a browse button and a submit query button. Under it it the text "Array()".
There was nothing published to say what to do with the code.
LATER : I played with the script, selected a ZIP file from the Browse button then hit the query button and this text was displayed.
Array ( [text] => Array ( [name] => topgun1a.zip [type] => [tmp_name] => [error] => 6 [size] => 0 ) )
I ran the script from the forum root.
The last version worked correctly and uploads were normal so its something in the new version code that is different. I have the forum running on a FreBSD box that runs that last version fine, PHPBB2 fine, 1.9 gig of disk space and 5 gig a day bandwidth so its all big enough to run the forum.
Now I wonder if this is only a problem doing an upgrade, I downloaded the change file package and did all of the changes by FTP then ran the installer.
Has anyone done a full install yet with the new package and tested it ?
LATER AGAIN: I downloaded the complete installation and installed it on a subdomain and the forum comes up and runs fine but it still will not allow attachments to be posted. Same error message as before.
Error should be 0, if you couldn't tell :P.
UPLOAD_ERR_NO_TMP_DIR == 6
Could mean permission denied.
-[Unknown]
UPLOAD_ERR_NO_TMP_DIR == 6
This is fine but the last version did not have this problem. Does it means that the current version must have the server configured in a particular way or is there a way to modify the code so the error does not occur.
As a rough gues, the TMP_DIR appeas to be a modification of the eaier version which did as I understood write attachments directly to the attachments directory. Is there some purpose in the change ?
Ok, I just became wiser, I restored the old forum files and it still will not accept attachments. This leaves only the database so is there any information of what is written to the database that is different to the old software ?
it's a server configuration issue, not SMF. Contact your hosting provider to fix their tmp-directory.
Or if your host allows it, place a php.ini file in your home directory and set tmp_upload_dir to a new empty (writable) folder within your home-directory. The "bad" host mentioned before has a php.ini in their home-directory already. In that case download the file and change that value and upload it again (or edit it using cpanel)
I can edit the php.ini that I wrote to include this line but I don't have any php reference for the correct syntax.
What is the syntax for setting "tmp_upload_dir" in the php.ini file ?
I have the php.ini in the domain name root, should it be there or in the forum root ?
I said this right at the start
Lainaus käyttäjältä: Trekkie101 - joulukuu 30, 2004, 12:24:17 IP
I think i got it, just need someone to confirm,
in the probalematic server there is not an upload tmp dir
]upload_tmp_dir no value no value
but you said
Lainaus käyttäjältä: Elissen - joulukuu 30, 2004, 01:16:54 IP
my php.ini has this:
I don't think that should be the problem.
So now it turns out it is the problem ??? Well then could you please ask your host to specify a temoprary upload directory
http://www.simplemachines.org/community/index.php?topic=22774.0
I've carried this on in the above Topic.
I don't think you understand. Let me restate a few things: (highlighting with CAPS.)
1. This is a PHP error, and would happen whether you were using SMF or ANY OTHER SCRIPT that uploaded files.
2. This probably means that your host RECENTLY changed a SECURITY SETTING on the server.
Nothing is wrong with /tmp per say, except that PHP *CANNOT PUT FILES THERE*. The security setting change has DISABLED ACCESS to /tmp. You can set it to ANOTHER DIRECTORY in your folder that DOES HAVE WRITE ACCESS or you can CONTACT YOUR HOST to get the problem resolved. No matter of database changing or file reuploading will solve this.
The problem IS NOT the "no value", but rather that the VALUE SPECIFIED (default = /tmp) is not ACCESSABLE by PHP. It must be for things to work.
-[Unknown]
Had the same problem and had to add right permissions to c:\winnt\temp folder -- that fixed it