PDA

View Full Version : vBulletin Database Error


Shadow
10-09-2011, 07:58 PM
Alright, for the past hour or so, my site has been spitting out Database Errors. Now, the problem is, i don't know how to fix this because the email that is used for sending the DB Error logs isn't receiving the emails.

So now, i'm stuck with a non working website and confused members. Any suggestions guys?

Thanks in advance.

EDIT: Just to let you know, the most recent site/server change was to the "php.ini" file to increase the Maximum Memory Limit. No other changes have been made recently.

Reycer
10-09-2011, 08:11 PM
Can't help ya if we don't know the Database Error you are getting.

Shadow
10-09-2011, 08:18 PM
I understand that but I'm trying to find out what's wrong with the site myself but i'm not getting the emails and was wondering if there's another way to find out the cause.

Thanks though.

Max Taxable
10-09-2011, 08:18 PM
Alright, for the past hour or so, my site has been spitting out Database Errors. Now, the problem is, i don't know how to fix this because the email that is used for sending the DB Error logs isn't receiving the emails.

So now, i'm stuck with a non working website and confused members. Any suggestions guys?

Thanks in advance.

EDIT: Just to let you know, the most recent site/server change was to the "php.ini" file to increase the Maximum Memory Limit. No other changes have been made recently.How did you edit this file? As in, what program was used?

Reycer
10-09-2011, 08:24 PM
I understand that but I'm trying to find out what's wrong with the site myself but i'm not getting the emails and was wondering if there's another way to find out the cause.

Thanks though.

Look in your error logs on your server.

Shadow
10-09-2011, 08:25 PM
Notepad++ was used.

Max Taxable
10-09-2011, 08:29 PM
Notepad++ was used.Just as I'd assumed.

Notepad sometimes adds characters at the top or the bottom of these files, that you cannot see but WILL mess things up. If you have this file still in your vB packet, upload it to your server, to overwrite back to default. If not, must edit files with something like TextEdit, which is a free utility. You will see the added characters using TextEdit that you won't see using notepad.

Notepad is NOT for editing executable files or scripts.

Edit to add: I am not assuming the php.ini file is your problem, I am merely trying to eliminate it as a suspect.

Shadow
10-09-2011, 08:35 PM
Ah i get you. Thanks for that.

One thing though, TextEdit doesn't appear to be for Ubuntu or for Windows (My Operating Systems). Can you suggest an alternative please?

Max Taxable
10-09-2011, 08:39 PM
Ah i get you. Thanks for that.

One thing though, TextEdit doesn't appear to be for Ubuntu or for Windows (My Operating Systems). Can you suggest an alternative please?I use TextEdit with windowsXP no problem and it also integrates with my FileZilla FTP..

The first thing I would do though, were I you, is save a copy of your php.ini file as it is, then upload the stock one to overwrite on your server and see if this database error problem goes away. Then you can solve the mystery of file editing at a later time.

Let's see if your edits to this file are indeed causing the errors.

Shadow
10-10-2011, 02:31 PM
Yeah, I figured it out. I was looking at the TextEdit that comes bundled with OSXM my mistake.

I tried what you suggested and then rebooted my server but still no joy.

Max Taxable
10-10-2011, 02:46 PM
Yeah, I figured it out. I was looking at the TextEdit that comes bundled with OSXM my mistake.

I tried what you suggested and then rebooted my server but still no joy.You have excluded the "php.ini" file as the problem then? Did you upload the unaltered file from your vB packet?

If it is excluded, then must now know the error details, have you been able to retrieve those as yet?

Shadow
10-10-2011, 02:51 PM
Sorry, you've confused me. What is a vB Packet? Sorry for the noobish question.

And no, I have not been able to retrieve anything which details the problem.

Max Taxable
10-10-2011, 02:58 PM
Sorry, you've confused me. What is a vB Packet? Sorry for the noobish question.

And no, I have not been able to retrieve anything which details the problem.The complete files and folders you should still have from originally downloading your vBulletin software. I suggest going in there and retrieving the "php.ini" file and uploading it after you rename the one you altered, rename it something like "php_modded.ini" then upload the original, unaltered php.ini file to the same location.

If you do not have your original files and folders you can go to the customer area of vBulletin.com and download it all again.

I suggest replacing the file you edited, with the original as a troubleshooting measure, testing to see if your altered file is causing your errors. Without details of the error, it's the only thing we can try. We are trying to either exclude the php.ini file as the cause of your problems, or identify it as the source of the problems. Process of elimination.

Shadow
10-10-2011, 03:22 PM
Okay, as you instructed, i downloaded all the original files and folders from the customer area and ran a search for the "php.ini" file. However nothing came up? Am i doing something wrong here?

Max Taxable
10-10-2011, 03:32 PM
Okay, as you instructed, i downloaded all the original files and folders from the customer area and ran a search for the "php.ini" file. However nothing came up? Am i doing something wrong here?I think I'm wrong... Not finding this file in my vB packet either.

You say you edited it? Where was it located?

Shadow
10-10-2011, 03:36 PM
Yeah that's correct. It was the one located here:

/home/[sitename]/etc/php5

Max Taxable
10-10-2011, 03:43 PM
Yeah that's correct. It was the one located here:

/home/[sitename]/etc/php5When you opened it again with TextEdit, did you see any added characters at the top line or bottom one?

If you PM me the file as a attachment, I can look and identify them quickly, seen them before.

BirdOPrey5
10-10-2011, 04:01 PM
Notepad++ is not the same as Windows Notepad.

Notepad++ is a good text editor, I have used it for years- it is not the problem.

When you get a database error simply "View source" of the page and the real database error will be in the code.

php.ini is not a vbulletin file. It is a file that usually isn't needed at all- it allows you (on some server setups) to override default php settings.

Shadow
10-10-2011, 04:01 PM
I couldn't spot anything. Sent you a PM with it instead.

EDIT: The only reason i used Notepad++ is because i use it when writing code. I find it much easier so i thought it wouldn't pose a problem when editing the "php.ini" file.

And thanks, BOP5, i'll try that right away!

EDIT2: Here's what i got using the view source option:

Database error in vBulletin :

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
/home/ex-reapers/www/includes/class_core.php on line 314

MySQL Error :
Error Number :
Request Date : Monday, October 10th 2011 @ 06:02:54 PM
Error Date : Monday, October 10th 2011 @ 06:02:54 PM
Script : [Site]
Referrer :
IP Address : 82.46.204.134
Username :
Classname : vB_Database
MySQL Version :

Max Taxable
10-10-2011, 04:05 PM
Thanks for helping out BOP5, clearly I was talking nonsense and lacked the knowledge to be of any help here.

I hope you get the issue solved Shadow.

BirdOPrey5
10-10-2011, 04:08 PM
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
/home/ex-reapers/www/includes/class_core.php on line 314

Unfortunately this error doesn't give a whole lot of information, but we know it's not a table error or something like that.

vBulletin can't establish a connection to the database- is this happening every time? It sounds like you're saying it's intermittent... The latter being much harder to diagnose.

However since you mentioned you edited the php.ini file obviously the first place to start is to return it back the way it was and see if the problem goes away.

What type of hosting do you have? Shared/VPS/Dedicated?

Shadow
10-10-2011, 04:12 PM
Thanks for helping out though Max, it's much appreciated.

The DB error has been there constantly since yesterday evening.

I have returned the php.ini file back to it's original state however earlier on Max stated that there may be some characters in there that have ruined the file. After checking, i found nothing of the sort and the file looks like it should.

I have a VPS server.

BirdOPrey5
10-10-2011, 04:23 PM
I doubt there are any unusual characters. This is something that is sometimes an issue with Windows Notepad but almost never with a real text editor like Notepad++ which you said you used.

If it's a constant error meaning you can NEVER get to your forum we have to see why VB can't make the database connection.

Do you have phpmyadmin installed? If so can you confirm the database is accessible? You should be able to browse your forum database.

Did you do anything to your config.pp file? Is it possible your database settings changed?

Shadow
10-10-2011, 04:51 PM
I cannot access my phpmyadmin panel at this time due to a username/password mismatch.

My config file hasn't been touched recently and my database settings have remained the same as far as i know.

EDIT: Site has been fixed, turns out the DB and Apache server turned themselves off for some reason.

BirdOPrey5
10-10-2011, 07:04 PM
Glad to hear you are up again. :up: