RE: [PHP-DB] webserver script to localhost MySQL?

2008-03-22 Thread Gary Wardell
Hi,

Ok, the warning is a warning and can safely be ignored since this debugging 
code.

It looks like your constant doesn't have a port number so questiuons you need 
to find out about:

Is it trying to connect on the proper port by default?  (My guess is no)

Or does the define need to be changed to set the proper port number?  (My guess 
is probably)

Or is the host you're trying to connect to unreachable?

Or is the port being blocked by a firewall?

Once you get the connection working you can remove the echo.

Gary

> -Original Message-
> From: gary balkam [mailto:[EMAIL PROTECTED]
> Sent: Sat, March 22, 2008 4:53 AM
> To: Gary Wardell; php-db@lists.php.net
> Subject: Re: [PHP-DB] webserver script to localhost MySQL?
> 
> 
> 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/baddbl
> og/wp-config.php:11) 
> in 
> /hermes/bosweb/web250/b2508/ipw.testgbalkam/public_html/baddbl
> og/wp-includes/functions.php 
> on line 1438
> 
> Error establishing a database connection
> 
> 
> - Original Message - 
> From: "Gary Wardell" <[EMAIL PROTECTED]>
> To: "'gary balkam'" <[EMAIL PROTECTED]>
> 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.
> >
> >> 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:[EMAIL PROTECTED]
> >> 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
> >>
> >>  >> // ** 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



Re: [PHP-DB] webserver script to localhost MySQL?

2008-03-22 Thread gary balkam

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" <[EMAIL PROTECTED]>

To: "'gary balkam'" <[EMAIL PROTECTED]>
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.


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:[EMAIL PROTECTED]
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



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