Date: 12/31/98
- Next message: Steve Williams: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- Previous message: Michael Brennen: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- In reply to: Rasmus Lerdorf: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- Next in thread: Steve Williams: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- Reply: Steve Williams: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm probably doing something dumb here, but....
I tried to emulate the problem with the Solid RDBMS use of the ODBC
interface with Empress. I built it as an Apache module and then built a
small application that was called repeatedly using odbc_pconnect. It
worked fine, but when I began to monitor the connections from the RDBMS
server I saw that the connections are NOT sustained. The connections are
transient.
Either there's something wrong with pconnect, or (more likely :-) )
theres something wrong with the way I've configured my system....
Any suggestions....
Steve
For info, the main part of the test I am using is below:
<?
if (($dbhandle = odbc_pconnect ("Examples", "swilliam", "")) == 0)
{
print ("Failed to Connect to database\n");
exit;
}
if (($cursor = odbc_prepare ($dbhandle, "SELECT ArtistID, FirstName,
LastName,
Nationality FROM artist")) == 0)
{
print ("Failed to prepare statement\n");
exit;
}
if (($boo = odbc_execute ($cursor) == 0))
{
print ("Execute Failed<BR>\n");
exit;
}
printf ("The Name of the Cursor is %s<BR>\n", odbc_cursor ($cursor));
$num_attrs = odbc_num_fields ($cursor);
printf ("Record has %d fields<BR>\n", $num_attrs);
?>
<TABLE WIDTH=80%><TR>
<?
for ($index=1; $index <= $num_attrs; $index++)
{
$name = odbc_field_name ($cursor, $index);
$type = odbc_field_type ($cursor, $index);
printf ("<TH>%s (%s)</TH>", $name, $type);
}
?>
</TR>
<?
$count = 1;
while (odbc_fetch_row ($cursor, $count) == true)
{
printf ("<TR>");
for ($index=1; $index <= $num_attrs; $index++)
{
printf ("<TD>%s</TD>\n", odbc_result ($cursor, $index));
}
printf ("</TR>");
}
?>
-- Steve Williams Interactive Media & Tools Group Empress Software Inc. http://www.empress.com-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: Steve Williams: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- Previous message: Michael Brennen: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- In reply to: Rasmus Lerdorf: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- Next in thread: Steve Williams: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- Reply: Steve Williams: "Re: [PHP-DEV] 3.0.6 Sporadic Tests"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

