Reputation: 6975
I have a hosting package with php and mysql, and ive installed wordpress on the server which accessed the database and gets the info. My site works as expected.
However im trying to upgrade certain aspects but dont want to try new things on the live version of my website.
So I wanted to use xampp to test my website, but xampp wont connect the the external database.
im assuming its something to do with the php.ini or mysql config but i dont know how to allow it.
Basically i need to access the mysql database on my hosting provider through xampp!
Any ideas?
Edit:
the warning info xampp is returning is
Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Alex Morley-Finch\Dropbox\Shared\Projects\htdocs\A3MediaFinal\templates\side.php:71) in C:\Users\Alex Morley-Finch\Dropbox\Shared\Projects\htdocs\A3MediaFinal\news\wp-includes\functions.php on line 3286
Error establishing a database connection
line 3286:
function dead_db() {
global $wpdb;
// Load custom DB error template, if present.
if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) {
require_once( WP_CONTENT_DIR . '/db-error.php' );
die();
}
// If installing or in the admin, provide the verbose message.
if ( defined('WP_INSTALLING') || defined('WP_ADMIN') )
wp_die($wpdb->error);
// Otherwise, be terse.
status_header( 500 );
nocache_headers();
//3286 header( 'Content-Type: text/html; charset=utf-8' );
}
Upvotes: 0
Views: 1922
Reputation: 9415
Does you web hosting provider allow external access of the database. Some do not allow this as it is a potential security risk.
Would it now be better to obtain a dump of the database from the live site and run it locally whilst you make changes?
NOTE:
The error you are recieving is to do with some information that is being outputted. What is the content of line
wp-includes\functions.php on line 3286
This error is generally present when you are printing some values out in a function, then trying to do an operation which requires the headers to changed, such as a redirect.
Upvotes: 1