[PHP-DEV] PHP 4.0 Bug #6091: Work with 2 or more IBase DB cause segmentation fault From: pasha <email protected>
Date: 08/10/00

From: pasha <email protected>
Operating system: FreeBSD 4.0 Release
PHP version: 4.0.0
PHP Bug Type: Scripting Engine problem
Bug description: Work with 2 or more IBase DB cause segmentation fault

If remove comment and try to work with both of databases
in same time, this cause segmentation fault with creation
core dump

In php 3.015 all work good

<?php
  require '$DBZAKAZ$.inc';
// $DB_ZAKAZ = ibase_connect($DB_ZAKAZ_PATH, $USERNAME, $PASSWORD);
  $DB_MAILBOX = ibase_connect($DB_MAILBOX_PATH, $USERNAME, $PASSWORD);

  $Insert_ML = ibase_prepare($DB_MAILBOX, "insert into MAILS_LIST
    values (?, ?, ?, ?, ?, NULL, NULL, 0, ?)");
  $Insert_MB = ibase_prepare($DB_MAILBOX, "insert into MAILS_BODY
    values (?, ?)");
// $Update_ZS = ibase_prepare($DB_ZAKAZ, "update ZAKAZ_FOR_NEW
// set SENDET=\"T\" where ID=?");
  $SQL_MB_NEW_NO = ibase_prepare($DB_MAILBOX,
    "select * from GET_NO_NEW_MAILS_BODY");
  $SQL_ML_NEW_NO = ibase_prepare($DB_MAILBOX,
    "select * from GET_NO_NEW_MAILS_LIST");
// $SQL_Phone = ibase_prepare($DB_ZAKAZ,
// "select * from PHONE_FOR_NEW_ZAKAZ where ZAKAZ_ID=?");
// $SQL_PhoneRecordCount = ibase_prepare($DB_ZAKAZ,
// "select count(*) from PHONE_FOR_NEW_ZAKAZ where ZAKAZ_ID=?");
// $SQL_Option = ibase_prepare($DB_ZAKAZ,
// "select * from OPTIONS_FOR_ZAKAZ_NEW_VIEW where ZAKAZ_ID=?");
// $SQL_OptionRecordCount = ibase_prepare($DB_ZAKAZ,
// "select count(*) from OPTIONS_FOR_ZAKAZ_NEW_VIEW where ZAKAZ_ID=?");
// $SQL_Fillial = ibase_prepare($DB_ZAKAZ,
// "select * from fillials_list where (ZAKAZ='t' or ZAKAZ='T')
// and E_MAIL is not null and id in (select parrent_fillial
// from marki_for_zakaz where marka=?)");
// $SQL_FillialRecordCount = ibase_prepare($DB_ZAKAZ,
// "select count(*) from fillials_list where (ZAKAZ='t' or ZAKAZ='T')
// and E_MAIL is not null and id in (select parrent_fillial
// from marki_for_zakaz where marka=?)");

// Work with Data
// Free Queries
  ibase_free_query($Insert_ML);
  ibase_free_query($Insert_MB);
// ibase_free_query($Update_ZS);
  ibase_free_query($SQL_MB_NEW_NO);
  ibase_free_query($SQL_ML_NEW_NO);
// ibase_free_query($SQL_Phone);
// ibase_free_query($SQL_PhoneRecordCount);
// ibase_free_query($SQL_Option);
// ibase_free_query($SQL_OptionRecordCount);
// ibase_free_query($SQL_Fillial);
// ibase_free_query($SQL_FillialRecordCount);

// ibase_close($DB_ZAKAZ);
  ibase_close($DB_MAILBOX);
  echo "<B>Ok!!!</B>";
?>

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>