vBulletin Manage Attachments Button Missing

vBulletin is great software, but every now and then it needs a kick in the behind to get working correctly. Occasionally, something will popup that just doesn’t make sense. Lets examine the add attachment feature.

If the “Add Attachement” button is missing from your new thread or new post page, there are a couple of things to consider:

  • Is your current usergroup allowed to post attachments?
  • Is the current forum allowed to post attachments?
  • Is the setting: Number of attachment buttons greater than zero?
  • Does the “View Permissions” for your user show that you’re allowed to post attachments?

If all of those are YES, and you are still stumped, lets dig deeper.

  • Have you had a recent crash of vBulletin?
  • Have you upgraded vBulletin recently?
  • Do you use memcached?

If YES to any of those, or even if you had NO for all of them, lets check the cache.

Go to Attachments menu on your admincp, and then click “Allowed Filetypes.” Make sure you have some! If you don’t, that is your problem there. If you DO have some, click on any one of them. Then click “Save.”

What we are doing is rebuilding your datastore’s cache. It is an internal glob of settings that the vBulletin software uses. Go ahead and check your new post page and check to see if your Add Attachment Button is back!

Until Next Time!

P.s. Remember to sacrifice enough chickens this time so you won’t piss off vBulletin again!

 


vBulletin Memcached Troubles

memcache vbulletin key bug

Bugged Out

vBulletin has two bugs which drastically affect the performance and reliability of the default vBulletin forum installation. This post explains the two bugs and shows you how to fix them.

Invalid key name. (Causes Invalid or Corrupted Datastore)

Have you ever gotten this error when using memcached?

Fatal error: vBulletin datastore cache incomplete or corrupt.

When you are using multiple memcached servers to power your vBulletin installation, vbulletin will actually try to fall back onto the database if there is a memcahed outage (Graceful Degradation.) However, in the process of falling back, it passes the same keys that it stores in memcached to the database. That would be great if only the key names did not differ between memcached and the database.

vBulletin appends a prefix to the key names only for the memcached service in order to prevent key hash clashing with servers running multiple installations of vBulletin. If the software did not do this you could not have 2 or more vbulletin websites using the same memcached server.

After the key names are prefixed with the COOKIE_PREFIX config setting, vbulletin then stores and retrieves the values from memcached. It is on the fetch function of vbulletin’s memcached implementation does this affect your website. If your memcached server does not have the item in the server (because the server was reset or the items expired in cache), vBulletin will then try to go to the database. However instead of asking the database for the correct item using the real key name, it will use the key name that has been prefixed with the COOKIE_PREFIX for the database query. The server will return 0 results. When this happens, vBulletin has no option but to crash and ask you to rebuild your datastore.

Bug 2: vBulletin Memcached Availability Dependency

This bug is concerning users who are only using 1 memcached server, or users who are using PHP with the php-memcache module v. 1.5.0 or older. vBulletin will throw the error:

Unable to connect to memcache server.

This is because if the memcached connection is not available, vBulletin will just give up and die. This is a big no-no. Cache’s are meant to be a convenience, not a dependency. If the cache is unavailable or if the cache request misses, basic logic is to return to the data source and try to get the original information. The fix is a simple one liner, which replaces all

trigger_error(‘Unable to connect to memcache server’, E_USER_ERROR);

with

return 3;

in /includes/class_datastore.php

The return “3″ is just an arbitrary number, the function which the errors occur in already have a number code return type.

Degrading Memcached
Memcached vBulletin Key Value Bug

Resolution

We have submitted the bug reports to vBulletin, available at:

http://tracker.vbulletin.com/browse/VBIV-12149 and http://tracker.vbulletin.com/browse/VBIV-12147


./memcached: error while loading shared libraries: libevent-1.3e.so.1: cannot open shared object file: No such file or directory

About Memcached

Memcached is a high performance caching system which is used by many of the world’s top trafficked websites. Including LiveJournal, Facebook, and many of our own websites. It enables you to save data results that would normally (in most cases) come from a database into memory. This can make your application thousands of times faster. In this post, we will show you how to install memcached on CentOS (or Fedora Core) while overcoming a common obstacle: The libevent.so module not being found.

Installing Memcached on CentOS / Fedora Core

To install memcached on Cent OS without getting the error

./memcached: error while loading shared libraries: libevent-1.3e.so.1: cannot open shared object file: No such file or directory

Run the command

yum install libevent-devel

The complete steps to compiling and installing memcached are as follows:

  1. Make sure you have a GCC Compiler. If not, run
    yum install gcc
  2. Install the libevent dependency
    yum install libevent-devel
  3. Download the latest memcached source from www.memcached.org
    wget “http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
  4. Unzip
    tar zxpfv memcached*
  5. Change directory into unziped dir
    cd memcached*
  6. Configure Memcached
    ./configure
  7. Make and Install
    make install
  8. Run memcached: These values may not work for you but they are just to make sure memcached will run.
    ./memcached -u nobody -m 48 -p 11211
  9. ??
  10. Profit

New Website Design

Hello, we have re designed our company’s website: http://j2websystems.com It now features a blog section where we will write about industry news, projects, and tech solutions for your business.

Look forward to our new posts in the near future!


Donations Towards Berkeley Open Infrastructure

J2 Web Systems Donates to the Berkeley Open Infrastructure

The Berkeley Open Infrastucture for Network Computing is an community of open source software that enables servers, and desktop computers to donate their processing power toward the advancement of numerous humanity projects. Computers that participate in the BOINC program run software that is linked to a backbone cluster of scientific computers controlled by BOINC. The software that is hosted on participating computers retrieve information and equations for it to compute. It then returns the results to the BOINC infrastructure and repeats the process.

Our steps towards the cure of HIV

We have donated two of our internal development servers and one of our production servers to the project. The computers that we have donated are computing information that determines the 3-dimensional shapes of protiens that scientist use in research to create new medicines and discoveries which combat HIV, Malaria, Cancer, an Aylmer’s disease. We do not get tax write offs, or anything that would benefit us. But that is ok, because C2 Global Technologies wants to better the world, both on the Internet and off.


Book Trade Now Case Study

SYNOPSIS

J2 Web Systems developed a version of the site booktradenow for the purpose of selling, buying, and trading textbooks. The website was developed using the web framework & language Ruby on Rails. We choose to use mySQL as for the databases which would contain thousands of books in their inventory. The website was built on time and ahead of schedule, which was outstanding considering their previous contractor took over 9 months.

OUR CONSULTATION

Book Trade Now asked J2 Web Systems to give consultation for various functions & aspects of the website. We then formulatedthree additional methods for which they can bring better customer service, increased revenue, and overall funcationality to the site. Those features were:

  1. Buying TextBooks
  2. Selling TextBooks
  3. Linking Amazon’s Book API to their front end

OTHER

One important note to state is that they are a small, young, yet motivated company. Their website may have changed due to their constant research and innovative methods of business. For this reason screen shots our version of the website will be available soon.

J2 Web Systems was so efficient in taking care of my needs. The company showed full rapport and provided excellent customer service by laying everything out that they can provide on paper very clearly and everything was professionally documented. They produced excellent results in an amazing amount of time. Our whole website was done in only one week! Our previously scrapped attempts took nine months!”
-Douglas Chan, CEO booktradenow.com

BOOKTRADENOW Overview

  • Enables Students to buy sell or trade textbooks
  • Based in San Antonio Texas
  • Website written in Ruby on Rails
  • Implemented mySQL Databases
  • Implemented Amazon’s book API