Previous Thread
Next Thread
Print Thread
Hop To
#129233 05/31/2006 4:58 PM
Joined: Apr 2006
Posts: 44
T
newbie
newbie
T Offline
Joined: Apr 2006
Posts: 44
We have our board set up to allow users to upload avatars to a directory on our site. That directory was tested with the "click to test" link on the control panel and passed.

But a user is attempting to upload an avatar and we're getting a mySQL error. Problem is, the error goes by so fast that I can't tell what it's saying.

Can anyone help?

Thanks,
Tracy

Joined: Apr 2006
Posts: 44
T
newbie
newbie
T Offline
Joined: Apr 2006
Posts: 44
Any help on this one???

Joined: Jun 2006
Posts: 956
Old Hand
Old Hand
Joined: Jun 2006
Posts: 956
Please post the error message.
Do you setup Full URL to Avatar Storage Directory in your control panel/profile settings ?


my board: http://www.dragonclan-forum.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
It's possible the avatars are the wrong size as well - might check that first.


- Allen
- ThreadsDev | PraiseCafe
Joined: Apr 2006
Posts: 44
T
newbie
newbie
T Offline
Joined: Apr 2006
Posts: 44
I have checked the size and it's OK.

Yes, the full URL is set up.

As far as the actual error message goes, as I said in my first post, I can't see exactly what it is because it's a SQL error that flashes by and then disappears when the page loads. After a few tries, I got enough to see that it is an "open base_dir restriction" error of some kind.

Any thoughts?

Thanks! <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />

Last edited by Tracy Friesen; 06/15/2006 2:58 PM.
Joined: Jun 2006
Posts: 956
Old Hand
Old Hand
Joined: Jun 2006
Posts: 956
take a closer look to your control panel. If you enter it you will see on the right side: Logs. Under it there should be a link to display all sql errors from ubbthreads.


my board: http://www.dragonclan-forum.de
my hobby: http://www.biker-reise.de
Ich kann bei Fragen zu UBBthreads in Deutsch weiterhelfen oder es zumindest versuchen
Joined: Apr 2006
Posts: 44
T
newbie
newbie
T Offline
Joined: Apr 2006
Posts: 44
I didn't have logging turned on, but I have activated it now. I activated it for both error and control panel logging, the tests for the directories passed, the test.file is in the error logging directory, but...

When I tried to add the avatar and generate the mySQL errors (which did briefly appear again), they were not added to the log file.

Suggestions on what's going on with the log file, so I can finally resolve the avatar thing?

Thanks for your help/patience,
Tracy

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
I'm not sure on the logging issue, but lets try this for now to find out what the SQL error is. Just a quick edit to the changebasic.php file. Down at the very bottom, you'll see this:

// ---------------------------------------------------
// Send them to their start page with the confirmation
$html -> start_page($Cat);

Right before that, add this:

exit;

That will make it so it doesn't forward you to the next page so you can actually copy and paste the error here.

Joined: Apr 2006
Posts: 44
T
newbie
newbie
T Offline
Joined: Apr 2006
Posts: 44
Hi again,

After SOOOOO long, I'm getting back to investigating this issue. I did what you suggested, Rick, and here's what I got in return:

Warning: copy(): open_basedir restriction in effect. File(/var/tmp/php2ajsMI) is not within the allowed path(s): (/www/u/p/pluscomm) in /www/u/p/pluscomm/public_html/ubbthreads/changebasic.php on line 246

Warning: getimagesize(/www/u/p/pluscomm/public_html/ubbthreads/images/avatars/user//1006.jpg): failed to open stream: No such file or directory in /www/u/p/pluscomm/public_html/ubbthreads/changebasic.php on line 248

Any suggestions?

Thanks again very much,
Tracy

Joined: Apr 2006
Posts: 44
T
newbie
newbie
T Offline
Joined: Apr 2006
Posts: 44
Any help for my last post? Thanks in advance!

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Hi Tracy. Sorry, I missed your last post. There is an issue with open_base_dir and user avatars. You can fix this with a quick edit to changebasic.php. Line 246 of that file looks like this:

copy($HTTP_POST_FILES['userfile']['tmp_name'], "{$config['avatars']}/$Picturefile");

That, needs to be changed to this:

move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], "{$config['avatars']}/$Picturefile");

Joined: Apr 2006
Posts: 44
T
newbie
newbie
T Offline
Joined: Apr 2006
Posts: 44
Cool, you're awesome, thanks, Rick! I will try that. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />

Tracy


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 (1 invisible), 702 guests, and 193 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 20240501)