Re: webserver script to localhost MySQL?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thanks.  I removed the additional ' at the end
and get this error (adding the echo as suggested)

http://testgbalkam.ipower.com/baddblog/

99.252.22.106
Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosweb/web250/b2508/ipw.testgbalkam/public_html/baddblog/wp-config.php:11) in /hermes/bosweb/web250/b2508/ipw.testgbalkam/public_html/baddblog/wp-includes/functions.php on line 1438

Error establishing a database connection


----- Original Message ----- From: "Gary Wardell" <gwardell@xxxxxxxxxxxxxxxx>
To: "'gary balkam'" <averybaddog@xxxxxxxxxxx>
Sent: Saturday, March 22, 2008 4:57 AM
Subject: RE:  webserver script to localhost MySQL?


Hi,

Usually the line number give is very accurate.

define('DB_HOST', '99.252.22.106:/tmp/mysql.sock'');    //

Looks to me like the quote marks aren't matched.

Also, it may be that after you fix the quotes you will get another error.

I suggest displaying DB_HOST:

 echo(DB_HOST);

So you can verify that the ip address and port are picked up correctly.

Gary

-----Original Message-----
From: gary balkam [mailto:averybaddog@xxxxxxxxxxx]
Sent: Fri, March 21, 2008 10:15 PM
To: >> Subject:  webserver script to localhost MySQL?


I'm pretty new to php and mysql.  And I just found this news
group about 4
minutes ago.
What I need to know, is how do I connect a wordpress
application, located on
a web server to a database located on my own computer.  The
reason for doing
this instead of syncing the dbs is the Sql server on the web
host is shared
and SLOW.  Mine only runs 1 maybe 2 databases.  wordpress and
maybe gallery
(maybe a forum later)

How can i do this?

URL is http://www.baddblog.info  changed this to
http://testgbalkam.ipower.com/baddblog/

here is the wp_config.php

<?php
// ** MySQL settings ** //
define('DB_NAME', 'junior');    // The name of the database
define('DB_USER', 'gbalkam');     // Your MySQL username
define('DB_PASSWORD', '********'); // ...and password
define('DB_HOST', '99.252.22.106:/tmp/mysql.sock'');    //
99% chance you
won't need to change this value define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

// You can have multiple installations in one database if you
give each a
unique prefix
$table_prefix  = 'wp_';   // Only numbers, letters, and
underscores please!

// Change this to localize WordPress.  A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set
WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');

/* That's all, stop editing! Happy blogging. */

define('ABSPATH', dirname(__FILE__).'/');
require_once(ABSPATH.'wp-settings.php');
?>

This script as above generates this error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in
/home/content/g/b/a/gbalkam/html/wp-config.php on line 6

PHP on LOCALHOST
Apache Version Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8
OpenSSL/0.9.8g
mod_autoindex_color PHP/5.2.5

PHP on WEBSERVER
Activate/Deactivate Languages
     PHP Version PHP 5.x



The wordpress works on localhost under apache.
Any ideas why this isnt working?
Thanks in advance
php noobie
GBalkam







--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux