Previous Thread
Next Thread
Print Thread
Rate Thread
#207006 12/16/2000 5:34 PM
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Hi Scream,
If I trying to attach any file to my post, all looks Ok - no any errors appears.
But post have't any attachments, mysql base (file) field is empty.
Can you help me resolve the problem?
here part of addpost.php, may be it helps you (I try to attach 1.jpg)
=====8<=========
// Doesn't support it, so we write our own function
else {
$filename = $userfile;
////////********* At runtime $filename="/var/tmp/phpH31568"
if (!$tmp_file = get_cfg_var('upload_tmp_dir')) {
$tmp_file = dirname(tempnam('', ''));
/////////////********At runtime $tmp_file="";
}
$tmp_file .= '/' . basename($filename);
$validfile = (ereg_replace('/+', '/', $tmp_file) == $filename);
if ($validfile) {
$goodfile = "yes";
}
}
===================================================


Sponsored Links
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
I am guessing that you are using a version of PHP that doesn't support the "is_uploaded_file function"? If that's the case then I've tried to put in some code that will validate the file before accepting the upload. I'll try tinkering with this some more on my system to see if I can track down the problem.

-------------------
Scream
WWWThreads Developer


UBB.threads Developer
Joined: Feb 2001
Posts: 21
Newbie
Newbie
Offline
Joined: Feb 2001
Posts: 21
Was this problem ever figured out? I'm having the same problem (5.1.6 fresh install). The settings seem to be correct, the directory is chmod 777'd, and the file seems to upload correctly (in IE or Netscape). But no matter what I do, the attachment never shows up in the post, and the file never shows up in the directory.

I sent an email to my ISP to see if the PHP version supports the "is_uploaded_file" function, but I thought I'd post here at the same time.

Thanks,
John


Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
I never did hear back on this one, so I'm not sure. If you can find out if your PHP does support this function then maybe I can work on tracking down the problem.


UBB.threads Developer
Joined: Feb 2001
Posts: 21
Newbie
Newbie
Offline
Joined: Feb 2001
Posts: 21
My ISP didn't have the "upload_tmp_dir" variable set. They said that it was supposed to default to /tmp or /var/tmp (or something like that), but apparently it didn't. Once they placed that value in the variable, the file upload feature worked.


Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)