Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error changing server name

Status
Not open for further replies.

Clanger67

Programmer
Mar 28, 2002
28
GB
We are having to move our database from its original server onto a new one. Both servers have MySQL and SQL 2000 on them. They both have the same version of the ntwdblib

The only file I can find where the old server is named is in the dbconn

echo "<!-- Detected site 89.0.x.x -->";
define ('DIR_DB_SERVER','old-server-name');
define ('DIR_DB_USERNAME', 'user');
define ('DIR_DB_PASSWORD', 'password');
define ('DIR_SK_SERVER','old-server-name');
define ('DIR_SK_USERNAME', 'user');
define ('DIR_SK_PASSWORD', 'password');
define ('SD_PREFIX', 'sd_bk_intra_');

When I replace old-server-name with new-server-name and I get the following errors

PHP Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: xxx-21 in \IIS\xxx.co.uk\intranet\admin\updateAB.php on line 62 PHP Warning: array_multisort() [function.array-multisort]: Argument #1 is expected to be an array or a sort flag in \IIS\xxx.co.uk\intranet\admin\updateAB.php on line 101

and

PHP Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: xxx-21 in \IIS\xxx.co.uk\intranet\admin\updateSkills.php on line 29 PHP Fatal error: Cannot use string offset as an array in \IIS\xxxco.uk\intranet\admin\updateSkills.php on line 158


This is something I have inherited and I have no experience of php so any help is much appreciated
 
well, what can I say ...

you are unable to connect to your database. so you need to check that the database credentials are correct on your client installation and that your server installation allows those credentials to connect from your client's IP address.

the second error is impossible to debug with you providing the relevant pieces of code.
 
Can you post the first 100 or so lines so we can see the first errors ? (i.e. the ones at line 62 and 29.
We can go from there to see what's going on.
Hace you tried to connect to the DB on the new server, I assume you know how to do this?
 
Thank you jpadie and ingresman for your suggestions.

The solution was updating the ntwdblib.dll from versions 2000.2.8.0 to 2000.80.194.0 in the C:\php directory.

Once I did this the code ran with no errors
 
interesting as you say in the OP that you had the same versions of ntwdblib on both machines
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top