[PHP-DB] Interbase + PHP Error

2001-03-01 Thread W. Yuen

I am getting this error, but I don't know what the reason is for this
error. can somebody help me out?

Warning: InterBase: Unable to complete network request to host
"localhost". Failed to establish a connection. Connection refused in
/home/httpd/html/test/php-test/ibconnect.php on line 12
Can't connect to CV.gdb with SYSDBA user.

Ibconnect.php look likes this:

 html
  head
  titleInterBase ISQL/title
  /head
  ?
  $ibdir="/home/http/html/test/php-test/";
  ?
  BODY bgcolor="#ff" text="black"font
face="arial,verdana,helvetica" size=3
  bInterBase Connect/b/font
  p
  ?
  $ibfullname="localhost:" . $ibdir . $ibname;
  $conn=ibase_connect($ibfullname,$login,$password);
  if (!$conn) {
 echo "Can't connect to $ibname with $login user.";
  } else {
 echo "$ibname connected by $login user.";
 ibase_close($conn);
  }
  ?

  FORM ACTION="ibquery.php" METHOD="POST"
  table border=0 cellpadding=15 cellspacing=0 bgcolor="#6699cc"
  tr
  tdfont face='arial, helvetica' size=2Enter your
query:/fontbr
  TEXTAREA NAME="query" ROWS="8" COLS="50"/textarea/td
  /trtr
  td
  INPUT TYPE=submit VALUE="Send" INPUT VALUE="Clear" TYPE=reset
  INPUT TYPE='HIDDEN' NAME='login'? echo "VALUE='$login'"; ?

  INPUT TYPE='HIDDEN' NAME='password' ? echo "VALUE='$password'";
? 
  INPUT TYPE='HIDDEN' NAME='ibname'   ? echo "VALUE='$ibname'";
? 
  /td
  /tr
  /table
  /form
  /body
  /html


Thnx for the help.

Wicky


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Interbase + PHP Error

2001-03-01 Thread Meir kriheli

On Thursday 01 March 2001 16:19, W. Yuen wrote:

Hi Wicky

To start with, never store the database file under your http document root, 
it is a big security risk.

Can you connect to the databse with isql, using the same connection string ?

If so, examine the log file to see what's going on (interbase.log in 
interbase's installation directory).

If you're using the superserver version you shuold add localhost to
/etc/hosts.equiv.

p.s
  $ibname in your script seems to be CV.gdb (it's not set in the script 
you've posted). if the file is name cv.gdb it will not work.


HTH
-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

 I am getting this error, but I don't know what the reason is for this
 error. can somebody help me out?

 Warning: InterBase: Unable to complete network request to host
 "localhost". Failed to establish a connection. Connection refused in
 /home/httpd/html/test/php-test/ibconnect.php on line 12
 Can't connect to CV.gdb with SYSDBA user.

 Ibconnect.php look likes this:

  html
   head
   titleInterBase ISQL/title
   /head
   ?
   $ibdir="/home/http/html/test/php-test/";
   ?
   BODY bgcolor="#ff" text="black"font
 face="arial,verdana,helvetica" size=3
   bInterBase Connect/b/font
   p
   ?
   $ibfullname="localhost:" . $ibdir . $ibname;
   $conn=ibase_connect($ibfullname,$login,$password);
   if (!$conn) {
  echo "Can't connect to $ibname with $login user.";
   } else {
  echo "$ibname connected by $login user.";
  ibase_close($conn);
   }
   ?

   FORM ACTION="ibquery.php" METHOD="POST"
   table border=0 cellpadding=15 cellspacing=0 bgcolor="#6699cc"
   tr
   tdfont face='arial, helvetica' size=2Enter your
 query:/fontbr
   TEXTAREA NAME="query" ROWS="8" COLS="50"/textarea/td
   /trtr
   td
   INPUT TYPE=submit VALUE="Send" INPUT VALUE="Clear" TYPE=reset
   INPUT TYPE='HIDDEN' NAME='login'? echo "VALUE='$login'"; ?

   INPUT TYPE='HIDDEN' NAME='password' ? echo "VALUE='$password'";
 ? 
   INPUT TYPE='HIDDEN' NAME='ibname'   ? echo "VALUE='$ibname'";
 ? 
   /td
   /tr
   /table
   /form
   /body
   /html


 Thnx for the help.

 Wicky

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]