Re: webserver script to localhost MySQL?
| From: | gary balkam | Date: | Sat, 22 Mar 2008 08:52:35 +0000 |
| Subject: | Re: webserver script to localhost MySQL? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44760@lists.php.net to get a copy of this message | ||
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@gwsystemsdns.net>
To: "'gary balkam'" <averybaddog@hotmail.com>
Sent: Saturday, March 22, 2008 4:57 AM
Subject: RE: [PHP-DB] webserver script to localhost MySQL?
Hi, Usually the line number give is very accurate.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. Garydefine('DB_HOST', '99.252.22.106:/tmp/mysql.sock''); //-----Original Message----- From: gary balkam [mailto:averybaddog@hotmail.com] Sent: Fri, March 21, 2008 10:15 PM To: >> Subject: [PHP-DB] 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 usernamedefine('DB_PASSWORD', '********'); // ...and passworddefine('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 LanguagesPHP Version PHP 5.xThe wordpress works on localhost under apache. Any ideas why this isnt working? Thanks in advance php noobie GBalkam