PDA

View Full Version : Just moved hosts.. worked fine for a bit...


majoreyeswater
08-17-2006, 03:12 PM
then....


There seems to have been a problem with the database.
Please try again by clicking the Refresh button in your web browser.

An E-Mail has been dispatched to our Technical Staff, whom you can also contact if the problem persists.

We apologise for any inconvenience.


This is the error that I find in viewing the page source:


Database error in vBulletin :

mysql_connect(): Can't connect to MySQL server on 'localhost' (10061)
D:\domains\weareleeds.com\wwwroot\includes\class_c ore.php on line 279

MySQL Error :
Error Number :
Date : Thursday, August 17th 2006 @ 05:10:52 PM
Script : http://www.weareleeds.com/index.php
Referrer :
IP Address : 80.3.160.9
Username :
Classname : vb_database
-->




This is what I have within my \includes\config.php


// ****** DATABASE TYPE ******
// This is the type of the database server on which your vBulletin database will be located.
// Valid options are mysql and mysqli. Try to use mysqli if you are using PHP 5 and MySQL 4.1+
$config['Database']['dbtype'] = 'mysql';

// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$config['Database']['dbname'] = 'forum';

// ****** TABLE PREFIX ******
// Prefix that your vBulletin tables have in the database.
$config['Database']['tableprefix'] = '';

// ****** TECHNICAL EMAIL ADDRESS ******
// If any database errors occur, they will be emailed to the address specified here.
// Leave this blank to not send any emails when there is a database error.
$config['Database']['technicalemail'] = 'admin@weareleeds.com';

// ****** FORCE EMPTY SQL MODE ******
// New versions of MySQL (4.1+) have introduced some behaviors that are
// incompatible with vBulletin. Setting this value to "true" disables those
// behaviors. You only need to modify this value if vBulletin recommends it.
$config['Database']['force_sql_mode'] = true;



// ****** MASTER DATABASE SERVER NAME AND PORT ******
// This is the hostname or IP address and port of the database server.
// If you are unsure of what to put here, leave the default values.
$config['MasterServer']['servername'] = 'localhost';
$config['MasterServer']['port'] = 5533;
// $config['MasterServer']['port'] = 3306;

// ****** MASTER DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$config['MasterServer']['username'] = '*****';
$config['MasterServer']['password'] = '*****';

// ****** MASTER DATABASE PERSISTENT CONNECTIONS ******
// This option allows you to turn persistent connections to MySQL on or off.
// The difference in performance is negligible for all but the largest boards.
// If you are unsure what this should be, leave it off. (0 = off; 1 = on)
$config['MasterServer']['usepconnect'] = 0;


I changed the port from the default of 3306 as my host advised that is what their settings are, and obviously I have edited out the username and password. Like I said, worked for a bit, then the above happened. All help appreciated.

Ntfu2
08-17-2006, 08:01 PM
Contact your host to make sure the port is still the same.

That error is caused from not having a connection to the database. You may have a limit to the number of connections you can have open at one time.

majoreyeswater
08-19-2006, 01:44 PM
Thanks for your help, I've worked with the hosting service and can now connect to the db, although I have concerns over the timeout value. Also the host has advised they downgraded to MySQL v4 and then recreated the database from the dump file I provided.

However... everything is working EXCEPT when I click on active users I get the error below. This error never occurred under 5.0 but the host is advising that MySql 5.0 is causing them a few problems in their windows environment.

Anyway any advice I'd appreciate it - getting closer and closer to resolution, just a few more steps...

Database error in vBulletin 3.5.3:

Invalid SQL:

SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo,user.skype, user.lppstatus,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM session AS session
LEFT JOIN user AS user USING (userid)
WHERE session.lastactivity > 1155997352

ORDER BY user.username asc;

MySQL Error : Unknown column 'user.lppstatus' in 'field list'
Error Number : 1054
Date : Saturday, August 19th 2006 @ 03:37:32 PM
Script : http://www.weareleeds.com/online.php
Referrer : http://www.weareleeds.com/index.php
IP Address : **.**.**.**
Username : MajorEyeswater
Classname : vb_database

Thanks.

majoreyeswater
08-21-2006, 10:13 PM
I know I'm replying to myself here, but I am trying to sort this out.

*NOTHING* has changed between hosting it on my own server and now that it is on a managed server, except the version of mysql. The old server still works without this error occurring.

If someone could tell me what the user.lppstatus field is, I might be able to work wht the site thinks I have a field missing in the db...

Any help appreciated

Zachery
08-21-2006, 10:24 PM
You've got a hack or an addon trying to access that field, its not there by default.

majoreyeswater
08-21-2006, 10:30 PM
Oh my god! Oh my god! I sorted it... my god, you'd never know I'd started out life as a COBOL developer... this is what happens when you end up in mgmt.

lppstatus is a field refernce for lil's pizza messenger (or whatever it was called) which I installed for a about 5 minues months and months ago.

Now, perhaps mysql 5 is more forgivng towards calls to non-exitsent variables, but I have just looked at the online.php on my old server and its exactly the same, yet I don't get the error AND I don't have the pizza messenger installed either AND it's the same db. Bizarre huh?

Any road up... I just deleted the reference to it in online.php and it's working.

Simplest answers always the best and thanks to those that took time to respond. I like it here...

Zachery
08-22-2006, 04:26 AM
^^ glad to be of help.

majoreyeswater
08-22-2006, 12:27 PM
I've decided to own this thread, and rather than create a million threads about my host migration, I am sticking them all in here, in the hope someone can help when they have time.

Afterall, it's multiple symptoms to the same issue.. moving hosts.

Right, here's my latest. GD image processing. It worked before (when it was my server, in my house, with me looking after it..) but since giving someone else the responsibility, it has stopped working.

Dead easy I thought, they just haven't set up the lib to be used. This was true and I advised them what they needed to do - which they did yesterday.

The host assures me that they have uncommented the following in php.ini: extension=php_gd2.dll

and that php_gd2.dll is definitely in their php extensions directory, identified by extension_dir in their set-up.

However, I get nothing. nada. zip.

In admin cp I have set it for both GD 2+ and GD 1.6.x/GD 1.8.x. Still nothing.

I don't get the example images in admin cp, and my image attachments in amongst my threads simply look like links, despite thumbnails being to 'yes' in attachment settings.

The host has even cycled the server for me to make sure any new settings are picked up.

Any ideas anyone, or perhaps confirming I've done everythig I need to and need to ask the host to look at their settings again?

Zachery
08-22-2006, 04:08 PM
Are you sure you are on a windows host?

majoreyeswater
08-22-2006, 04:25 PM
Are you sure you are on a windows host?
absolutely positively

Zachery
08-22-2006, 04:27 PM
Its possible since they made the change they haven't reloaded IIS or restarted the server.

majoreyeswater
08-23-2006, 12:04 PM
Its possible since they made the change they haven't reloaded IIS or restarted the server.

Unfortunately, they've restarted twice. Sooo annoying when you don't have access to the server, so much for saving me money, it's costing me a fortune in time.

Their last response was:
"Just changed the extensions location in php.ini from .\ to c:\php4\extensions and phpinfo() doesn't seem to display anything about GD despite a reboot"

I've looked through the phpinfo() output and indeed, GD is not refernced anywhere... you can see this here: PHP info output (http://www.weareleeds.com/test.php) and I can't pickup GD in admincp at all, so don't know what this might be...

I-Web
08-25-2006, 09:05 AM
Just looking thru phpinfo and noticed a few anomolies......

Configuration File (php.ini) Path C:\WINDOWS
is part of yours when it should read......
Configuration File (php.ini) Path C:\WINDOWS\php.ini
also noticed he has 2 installations of php as seen in ENV[Path]

C:\\PHP4;C:\\PHP5;

also looking at info the php.ini is situated in C:\\PHP5\\php.ini

majoreyeswater
08-25-2006, 09:46 AM
Thank you for that, I am taking it up with my hosts as I type. Should the php.ini file be situated in the Windows directory at all, especially is later on it is suggesting it is on \PHP5\ - am a little confused by that.

UPDATE:

I have just had a response from the hosting service, although I am getting more than slightly concerned that they don't really know what they are doing:

We have PHP4 and PHP5, some customers prefer one or the other and our control panel allows them to choose which.

PHP4 is in C:\PHP4
PHP5 is in C:\PHP5

Neither should be using a php.ini in C:\Windows. In fact there isn't such a file in that location. They should use their own .ini in their respective directories.

I don't know how (or why) PHP4 could be picking up the .ini for PHP5. I also don't know if there is any way of forcing it to use the correct one. Any ideas?

My set up is pointing to the PHP4 option and rather than change my own board settings, I rather keep the config as it is and get them to correct the PHP config so as simple things like GD lib will actually work.

I'm out of my depth at the moment and short of taking this all back in house, or moving it elsewhere and inconveniencing my users yet again, I could do with some other pointers.

All your inputs and efforts are appreciated.

Zachery
08-25-2006, 03:22 PM
Why is because they failed to set the ini dir via the registry. which needs to be set.