401

Re: Attachment Mod 2.0.1 by Frank H

twohawks wrote:

Just a notion... check to see how php is set for file size limits on your server php configuration file (php.ini), or ask your host.  Typical default limit is 2MB.  Symptoms when uploading a larger file than allowed are as you describe.
Google: php file size limit  ...should give you a good lead.
Cheers,

You can usually get that information from the php info, which I have written about in the documentation for the mod (and in the installation guide). (Every server can have a different setting, that's why I have made a small upload limit in the first place, so you have to figure out what the value is wink)

Re: Attachment Mod 2.0.1 by Frank H

Hey guys, now it works perfectly smile
Indeed, I had to put 777 chmod to install_mod.php and to use it again, as Clariden said.

Thank you Frank for this nice mod.

Good bye.

403

Re: Attachment Mod 2.0.1 by Frank H

Frank H wrote:

Sounds like you need to setup the mod. Have you followed the installation guide I made? (Especially the parts about "Testing the mod", and "Setup the mod")

Yes, I did follow the installation guide. I just now followed the "testing the mod" steps. I am able to upload the small txt file without problems. If I try to post a Word, Excel, PDF, or GIF file, it will not attach, though (still). I had previously followed the "Setup the mod" steps. I have not setup any restrictions on file type upload. I did increase the maximum file size to 100000000.

Any tips are appreciated!

404 (edited by Frank H 2007-02-04 21:19)

Re: Attachment Mod 2.0.1 by Frank H

are you sure that it can recieve such large files? 100000000bytes is ~100MB, not that many hosts will allow that.

What are the values on the 3 items mentioned in "Setup the mod"? (100MB sounds way too much for a normal install)

405 (edited by clariden 2007-02-04 22:33)

Re: Attachment Mod 2.0.1 by Frank H

I just put 100MB as a starting point--the files I am trying to upload are only about 1MB or so.

Right now, I have the following settings for Moderators:
Allow: {All}
Max upload: 100000000
Attachments: 10
Allowed files: {blank, for all}

Guests:
Allow: Download
Max upload: 100000
Attachments per post: 0 (no upload should be allowed)
Allowed files: blank

Members:
Allow: {All}
Max upload: 100000000
Attachments: 1
Allowed files: {blank, for all}

If you were talking about other values, please let me know.

406

Re: Attachment Mod 2.0.1 by Frank H

That's rules.

Read through the "Setup the mod" once more, and really do the first steps.  (it's the setting in Alter settings that's important)

*Open up the documentation for the mod chapter 1.6. Keep it open

    *As administrator on the forum, go to the administration page where you see some info of the version on PHP and the database. Next to the PHP information there's a link "Show info", click on that so you get to see the variables set for the webserver.

    *Read the documentation chapter 1.6 and find the variables in the page opened in step 2. Follow the documentation for how to figuring out how large attachments you can allow as a maximum.

    *Once you know what value you want on the max size for attachments, click "Attachment Mod" in the plugins area on the administration interface. Then click the "Alter settings" button for the mod. At the box for "Max filesize" enter the amount of bytes you want to allow as max upload.

    *Click "Update settings"

It's those 3 values I want to know... I doubt the server allow 100MB, that's why you have to look in the phpinfo() and figure out the correct value. Too large and the attachments won't be attached, as the server ignores it... no matter what rules you set for PunBB and the users...

407

Re: Attachment Mod 2.0.1 by Frank H

Thank you, Frank H. It now works smile
I had missed the documentation chapter 1.6 step before (I thought it was the same as the manual).

Awesome mod, by the way. Thanks again for your help.

408

Re: Attachment Mod 2.0.1 by Frank H

no problem smile

(I have forced people to check the server settings, as all servers might be different ... so using the default value of 2MB isn't guaranteed to work, that's why I have left it at the really tiny 2000 bytes, so that small textfile should be possible to upload, just to test that it works wink)

409

Re: Attachment Mod 2.0.1 by Frank H

Hello,

I'm new to the punBB board and the community. I have a few questions about this mod.

Is it compatible with 1.2.14?

I have a Debian server with php4 and a multi vhost architecture controlled by Confixx 3. The vhosts have php safe_mode on by default but I had no problems with many other scripts like Mediawiki, Wordpress, s9y or things like phpBB. Every vhosts has its own phptemp, htdocs and so on.

The only problem I announced is that every file which is uploaded by apache has www-user as owner so the scripts cant move the file to another directory if they dont run chown/chmod (or use any other solution which are listened on php.net)

I allready tried to install the mod but the installation script failed cause it couldnt move a file. If you can say that the script is compatible with the current punBB version, I will go to perform the installation again to get the error-messages.

410

Re: Attachment Mod 2.0.1 by Frank H

the isntaller won't work with safemode on ... as it refuse to copy some files ... It is however possible to make a manual install. (it cannot copy the .haccess and index.htm into the subfolders)

the owner is the php user, I suppose it's possible to mod so that the owner is set to another useraccount during upload.

411 (edited by Nigg 2007-02-05 20:11)

Re: Attachment Mod 2.0.1 by Frank H

Yes, that was the error I noticed. Unable to copy htaccess .... blahw. Something like:

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 636 is not allowed to access /srv/www/htdocs/web1/html/www/_pictures/user/1 owned by uid 30 in /srv/www/htdocs/web1/html/www/_class/classPictures.php on line 80

I dont know how it works on suPHP/EXEC/CGI, I'm running mod_php. But its wrong to believe that it works without safemode. I tried, but the problem is that the apache is owner of the files. That has nothing to do with safemode cause these other scripts have no problems with moving their files from the tmp dir of the vhost with safemode enabled. The problem is that the files have 0644 or 0600. If the file has 0644, php cant move, with or without safemode, if the apache is not in the same group as vhost.


I would thank you very much If you try some of the (small) solutions on php.net to extend the installer cause I cannot code php. If you want to code this, I can give you acess to a vhost environment on a server like this to test if you dont have.

412 (edited by Frank H 2007-02-05 21:23)

Re: Attachment Mod 2.0.1 by Frank H

move_uploaded_files is safemode aware ... it's the installer script that copy files that doesn't work ... (it copies a .htaccess and index.htm to a newly created directory, and safemode seems to dislike that, even if the chmod is correct and should allow it)

Mail me and I can talk you through a manual install over email ... (so no 'delicate' info is left public wink)

413

Re: Attachment Mod 2.0.1 by Frank H

The quote above was not from my server..

I personally get only this:

File: /home/htdocs/web5/html/forum/install_mod.php
Line: 117

PunBB reported: Unable to copy .htaccess file to new subfolder with name '/home/htdocs/web5/html/forum/dateien/56366c992579fe1e49c928102aae5ce2'

safemode IS disabled

414 (edited by Frank H 2007-02-06 21:44)

Re: Attachment Mod 2.0.1 by Frank H

that's odd ... and the chmod is correct?  (as that's exactly the error people get with safemode on)

But, mail me and I'll talk you through a manual install ...


Edit: And with instructions, a manual installation seems to have worked smile

415

Re: Attachment Mod 2.0.1 by Frank H

yes it is. I've sent you mail.

416

Re: Attachment Mod 2.0.1 by Frank H

It seems a great MOD. I've done every step in the README file, as usual, but something isnt working fine... When I upload a file no errors are shown, the server folder is empty (although is in 777) and there's no linking to the file in the message... plis I need some help! Thanks in advance

417

Re: Attachment Mod 2.0.1 by Frank H

Have you followed the installation guide mentioned in the first post?  (Especially the parts about "Testing the mod" & "Setup the mod")

418

Re: Attachment Mod 2.0.1 by Frank H

I got this error msg:

File: /home/manantia/public_html/forouca/install_mod.php
Line: 117

PunBB reported: Unable to copy .htaccess file to new subfolder with name '/home/manantia/public_html/forouca/download/6f4d13fc09596f71599757a90925b533'

Permissions are set to 777 on the download folder.

I got 3 folders call some like this "4bde70ca99a3bb157b3cfaab38f81f41" and I can't delete them from the server.
Thank you Frank!

419

Re: Attachment Mod 2.0.1 by Frank H

Sounds like you're running safe mode

Email me and I'll talk you through a manual install ...

420

Re: Attachment Mod 2.0.1 by Frank H

According to the PHP info safe mode is off... I shoulda did something wrong. Thanks!!

421

Re: Attachment Mod 2.0.1 by Frank H

I got almost the same error message. I fixed it, though.
Still, does anybody know how to do chmod-stuff with www.godaddy.com ?
Thanks a lot.

FluxBB - v1.4.8

422

Re: Attachment Mod 2.0.1 by Frank H

Just send me a mail if you have any problems, and I'll try my best to help out. smile
(you can use the email form on this forum, or use the email written in the readme.txt)

423

Re: Attachment Mod 2.0.1 by Frank H

Frank H wrote:

Just send me a mail if you have any problems, and I'll try my best to help out. smile
(you can use the email form on this forum, or use the email written in the readme.txt)

Who did you mean?

FluxBB - v1.4.8

424

Re: Attachment Mod 2.0.1 by Frank H

lie2815 wrote:

I got almost the same error message. I fixed it, though.
Still, does anybody know how to do chmod-stuff with www.godaddy.com ?
Thanks a lot.

How did you fix this? Thxs

425

Re: Attachment Mod 2.0.1 by Frank H

Well, I originally uploaded the .htaccess file in binary mode. It didn't work. I looked a bit around in my hosting help and found out, that all .htaccess files have to be uploaded in ASCII mode.
How do you upload your files? With a program or online at your hosting manager?

FluxBB - v1.4.8