|
Joined: Aug 2000
Posts: 3,590
Moderator
|
Moderator
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"; } } ===================================================
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
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
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
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
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.
|
|
|
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.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|