[thelist] PHP Apache & MySql the next step
Andrew Maynes
andrew at humanbehaviour.co.uk
Thu Aug 29 08:16:11 CDT 2002
running that little baby showed me the path to righteousness and the errors of
my ways, well just a connection to MySql :)
excellent
Andrew
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Jay Blanchard
Sent: Thursday, August 29, 2002 02:01
To: thelist at lists.evolt.org
Subject: RE: [thelist] PHP Apache & MySql the next step
[snip]
ok Mysql is running now, which it wasn't before!! only the manger was!
but I cant vconnect to it :( I have a script running in apache/apache
group/htdocs/dir and it just doesn't want to connect? with this info
[/snip]
Make it simple, run the following as a php script; (substitutung username
and password of course)
<?php
//connect to & select database
if(!($connect = mysql_pconnect("127.0.0.1", "username", "password"))){
print("Failed to connect to database!\n");
exit();
}
if(!mysql_select_db("test", $connect)){
print("Failed to select database!\n");
exit();
}
?>
If either condition fails, then you can start troubleshooting. Unless I
completely misunderstand your situation as I am coming in late to the
thread.
HTH!
Jay
*****************************************************
* Texas PHP Developers Conf Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braunfels, Texas *
* Contact jay.blanchard at niicommunications.com *
* *
* Want to present a paper or workshop? Contact now! *
*****************************************************
--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.384 / Virus Database: 216 - Release Date: 8/21/02
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.384 / Virus Database: 216 - Release Date: 8/21/02
More information about the thelist
mailing list