here is the entire function:

function readonlyConnect()
{
        $dbh=mysql_connect ("localhost", "george_readonly", "tiWhs!asAt!") or
die (formatSQLError(""));
        mysql_select_db ("george_crwash2");

        return $dbh;
}

a die() statment before the first line of code in this function echos to
the page, but if the die(); statment is placed after the call to
mysql_connect(), there is nothing printed to the page.

thanks for the help,
steve



> On 7/18/06, Steve Strong <[EMAIL PROTECTED]> wrote:
> > we are using php to connect to our mysql database and when we call the
> > php function with this line:
> >
> > $dbh = mysql_connect("localhost", "george_full", "passwd")  or die
> > (formatSQLError(""));
> >
> 
> That's the only line of your .php script?
> 
> > george_full has full priveleges on localhost with his password.
> > localhost resolves to 127.0.0.1 using the host command
> > pinging localhost returns packets as expected
> >
> > the execution of the script terminates.  from the command line i've done
> 
> As expected, if it did not error out, it only connects and returns,
> simply as that.
> 
> > the following:
> > 1. connected to the database with the same credentials as above
> > 2. selected a database
> > 3. querried the database with appropriate results.
> 
> If you issue those commands at PHP, would they return?
> 
> >
> > i work for a school district and the central office people have just
> > built a new LAN that involved changing the addresses of our dns servers.
> >  the servers are behind a NAT, and only their external addresses
changed.
> >
> > this is a really tough bug, so any help would be GREATLY appreciated.
> 
> Sorry if I did not quite get your question. PHP must connect, then
> issue a query of some sort, then deal with the resultset, else it will
> connect, and that's all. Maybe if you post the entire PHP code, along
> with any error messages...
> 
> -- 
> Daniel da Veiga
> Computer Operator - RS - Brazil
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
> PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
> ------END GEEK CODE BLOCK------
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 
> 

-- 
Steve Strong
Math and Computer Science
Washington High School
2205 Forest Dr. SE
Cedar Rapids, IA 52403
http://crwash.org

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to