Previous Thread
Next Thread
Print Thread
Hop To
Joined: Dec 2003
Posts: 16
C
stranger
stranger
C Offline
Joined: Dec 2003
Posts: 16
I'm having an issue with image uploads to the boards (a 682K image is absorbing space until it runs out (currently set for 130M)). It used to work but if you saw the other thread I have on here, well, suffice to say I had to move everything over to a new ISP in a hurry.

Anyway, I'm leary of simply reinstalling the entire code base as I'm fearful of losing all the sites contents, so my question is this: What files are "touched" when uploading a file. My plan would be to download the current build and copy up only those files and see if it fixes things. (I'm doing a complete site back up right this minute).

Any help is appreciated


If at First you do not succeed then Skydiving is not for you..
Joined: Dec 2003
Posts: 6,563
Likes: 78
Joined: Dec 2003
Posts: 6,563
Likes: 78
If I follow you.
You desire to install a clean copy of ubb but preserve the site?

I assume you think you may have some modifications causing issue?

A little difficult or I should say tedious. Especially if you have not done it before. because there are several screwball files that need to be kept. Like your gallery and upload folders.
The first step would be download the same version you were using.
Then ftp that up to your new site using the upgrade docs as a guide for what files to upload. just don't run the install or upgrade script.

Don't forget you also will need to create a db and user for the db ad upload your db data.

Again using the guide upload your backup files to the folders you skipped for the first step. But review them before you do.
There are several more file folders to check but that is a start.
I would try a test board first.
But that meas you need to edit the paths in the config.inc.php file because you are on a different location. But you need to do that anyway for the real board..
The sessions folder you don't need to worry about backup files because it is like a cache folder they get created and
deleted by themselves.

Now the real easy way would be to upload your backup. Edit your config.inc.php file for new paths.
Then upload per the upgrade docs just the files of the same version.
But if you have extra files you don't want scattered all over the place it will be hard to find them.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Dec 2003
Posts: 16
C
stranger
stranger
C Offline
Joined: Dec 2003
Posts: 16
Yea, that is my fall back. I was hoping to just move one or two files and not affect the entire site as I'm "pretty sure" that its only a few scripts. One thing that just occurred to me is to run a diff. Download the existing site, download the clean code and diff them. The configuration changes will show, AND any other changes that may have taken place during the hack.


If at First you do not succeed then Skydiving is not for you..
Joined: Dec 2003
Posts: 6,563
Likes: 78
Joined: Dec 2003
Posts: 6,563
Likes: 78
You could do that also. But remember the virgin code is not going to have the files that are created when you install the site that you need such as the config.ii file.
I would just go the easy route as I said. Then make a note on what files or folders that you have in addition to the stock code. If you end up with some extra files that will ever be used because you wipped out a mod so what.
The stock code is somewhere around a thousand files as I recall.

I did forget to mention you would follow the move guide first.
Because you need to set your folder/file permissions to work.
I just assumed you were already aware of that.

Last edited by Ruben; 01/05/2013 4:51 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Dec 2003
Posts: 16
C
stranger
stranger
C Offline
Joined: Dec 2003
Posts: 16
After running the diff I find that there were only two files that were tweaked. wrappers.php and image.inc.php In the Image.inc.php I found the following differential:

$function = "resize_image{$config['GRAPHICS_LIBRARY']}";
// $function = "resize_image_{$config['GRAPHICS_LIBRARY']}";

The commented version is the "old" and the uncommented is the changed from original. I changed back to the original and now I get a nice error that says

Fatal error: Call to undefined function resize_image_() in /home/content/52/10210752/html/ubbthreads/libs/image.inc.php on line 40

Yet when I flip them back it executes...but sucks up a ton of ram then dies. Is this a PHP version issue? I think I'm running 5.4


If at First you do not succeed then Skydiving is not for you..
Joined: Dec 2003
Posts: 6,563
Likes: 78
Joined: Dec 2003
Posts: 6,563
Likes: 78
What version is your ubb again because that line is different on the current version.

But I suspect you don't have everything defined.
It depends on what image library you use and what you have.
For example if you are using imagemagick . You need to define the paths in the ubb control panel.
Or you are using GD2 and you need to select that in the ubb control panel.
Either case you would need to contact your host and as which oes you have ad for imagemagick you need a path.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Dec 2003
Posts: 16
C
stranger
stranger
C Offline
Joined: Dec 2003
Posts: 16
php version is 5.3
the version of UBB is 7.5.7
image library selected in the configuration files is gd2 but the configuration does not give me another option so I've been using that. I'm on the phone with the sysadmin to figure out what library they are using


If at First you do not succeed then Skydiving is not for you..
Joined: Dec 2003
Posts: 6,563
Likes: 78
Joined: Dec 2003
Posts: 6,563
Likes: 78
Well it is time to have someone take a look. In version 7.5.7 the correct line should be
$function = "resize_image_{$config['GRAPHICS_LIBRARY']}";
I have no clue as to why you would have changed it to
$function = "resize_image{$config['GRAPHICS_LIBRARY']}";

It could be you did not use a proper editor on that file and you have some extra formatting insertied in the file that php does not like.
I would completely overwrite that file with a virgin copy..


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Dec 2003
Posts: 16
C
stranger
stranger
C Offline
Joined: Dec 2003
Posts: 16
Ok, so resolution:

PHP is right
Library was GD
Version of UBB is 7.5.7
The offending line in image.inc.php was :
$function = "resize_image_{$config['GRAPHICS_LIBRARY']}";
Taking out the "_" at the tail there caused recursion so I can understand why it blew up when that changed.
The line is to allow for multiple versions of libraries so what I did for the next line down (which was )
// $filename = $function ($type,$sourcefile,intval($width),intval($height),$is,$ext);

Simply removed the variable option and forced the library to use.

$filename = resize_image_gd($type,$sourcefile,intval($width),intval($height),$is,$ext);

problem done and dusted. Imagery works = users happy.




If at First you do not succeed then Skydiving is not for you..
Joined: Dec 2003
Posts: 6,563
Likes: 78
Joined: Dec 2003
Posts: 6,563
Likes: 78
Okay,you will be looking for trouble when you upgrade someday.
But my thoughts are you have a error in your ubb cp settings.
There are at least three fields to fill out for images as I recall.
But at least you are up and running now.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jun 2006
Posts: 16,300
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,300
Likes: 116
That and the long standing bug that you have to submit the gallery page to select a default image parser even if you don't change the setting from GD...


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!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
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
Who's Online Now
4 members (Gizmo, Baldeagle, Ruben, 1 invisible), 779 guests, and 156 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)