Previous Thread
Next Thread
Print Thread
Hop To
#170871 12/22/2006 3:23 PM
Joined: Sep 2004
Posts: 29
M
newbie
newbie
M Offline
Joined: Sep 2004
Posts: 29
Running v 7 on Windows 2000 server.
Configured attachment directory and full path correctly, privileges for the web server user set correctly ("test directory" can create a file in the attachments folder).

The file manager allows to add/remove files.
Links to the attachments show up in the posts.
No error messages or anything.

However:

Clicking on a link leads to a "page not found" error message.
The URL is correct, and the file name shown is the name of the file I have "uploaded" via the file manager.

But the file is not created in the attachments folder.

When I replace the file name in the URL with the name of a file that exists in the attachment folder, it works.


Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
DOes your php.ini allow uploads? Are you trying to upload a file larger than what php.ini allows? Default is some real low file size like 2 megs or so. Php does not return an error if the file is too large, it just quietly discards it, which means threads doesn't know it failed. The scenario you describe is pretty much what happens if you're uploading a file larger than php itself currently allows.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Sep 2004
Posts: 29
M
newbie
newbie
M Offline
Joined: Sep 2004
Posts: 29
Thanks for helping!

I control the server and hence the PHP ini.
The allow_uploads is ON, the max. upload site 32M.

The upload test files are around 10 KB only.
I have the "inline images" option turned off.

"Old" attachments (uploaded with the old forum and migrated by me to the new forum) work. It's only the new file manager fails to upload files.

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Ok, so it's not actually creating the uploaded files in the folder? Do you have avatar uploads turned on? If so, are those working correctly? If not can you try turning those on to see if those work. That will give us more info as if it's a general PHP issue or something else.

Joined: Sep 2004
Posts: 29
M
newbie
newbie
M Offline
Joined: Sep 2004
Posts: 29
Hi, Rick

We're getting nearer.

I cannot upload Avatars via the Control Panel. The error message is "We could not move the avatar into the /images/avatars/default directory..."

I also checked uploading graemlings and forum icons, and this no longer works, too. I have been able to upload graemlins and forum images a couple of days ago when I migrated the forum.

Something I've done after the initial migration caused problems.
I checked the security on the web in IIS and the file system, and the permissions for the web server user for these folders are OK. They are inherited from the web root of the forum down to the lowest folders.

I refreshed the security down to all folders, without a change.


The "Permission Checks" in the control panel also returns all folders with a green OK.

I've tightened the security on this web site a bit, like for my other sites:

register_globals = Off
allow_url_fopen = off
safe_mode = On
display_errors = Off
open_basedir = d:\web

Any special setting I should check?
I've also used SysInternals FileMon to check what's going on in the file system, but except from some failed looks for the newly uploaded file ("no such file") there are no errors or privilege issues. The no such file error is caused when the control panel checks for the file after the upload. But since the upload failed, this error message is to be expected.



Joined: Jun 2006
Posts: 3,837
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,837
First of all I would turn safe mode off.

Does the various images directories have at least read and write permissions enabled?

You might also like to set up a copy of your php.ini file in case this shows something up.

Code
 <?php phpinfo(); ?>


Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
I agree, I think the issue at hand is that safe mode is on; I believe there was another thread somewhere about a way to move things with it on, but it's more trouble than its worth


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Sep 2004
Posts: 29
M
newbie
newbie
M Offline
Joined: Sep 2004
Posts: 29
Yep. Tried that already. No difference between SafeMode=ON/OFF.

When I look into the doaddgraemlin.php page and echo out the

Code
$graemlin_temp = $_FILES['readpost']['tmp_name'];

echo "<html><body><h1>'".$graemlin_temp."'</h1></body></html>";


$graemlin_temp is empty. It seems that the file is not uploaded.

Joined: Sep 2004
Posts: 29
M
newbie
newbie
M Offline
Joined: Sep 2004
Posts: 29
Problem solved.

Two things prevented the uploads without any error message:

1: PHP requires that the user under which the web site runs as write access to the "default" temp folder, which is in my case c:\windows\temp

2: open_basedir must not be set

Perhaps there is a configuration setting which gives me more control about where temporary upload files are written to?


Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Originally Posted by MacW
Perhaps there is a configuration setting which gives me more control about where temporary upload files are written to?v
I think it should be in your php configuration, if not then your webserver configuration.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 464
Likes: 1
M
Addict
Addict
M Offline
Joined: Jun 2006
Posts: 464
Likes: 1
its in the php config file.. you set whether you want to upload and where the temp files go.


Happy Customer !!!
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
si:

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


- Allen
- ThreadsDev | PraiseCafe

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Ruben), 1,189 guests, and 270 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)