If you are getting an error rebuilding the images, then the existing image has a problem. If the attachments are in the filesystem, then most likely you moved them at some point and didn't copy them correctly.
There is no gallery.php file in default vbulletin. You will need to ask for help with that in the thread where you got the modification.
4.2.0 will not work with PHP5.4. You will need to upgrade to 4.2.2 or you will have problems with attachments (as you are seeing).
|