[PHP-DB] PHP informix function ifx_error problem

2001-07-26 Thread Andrey V. Glukhov

when I trying to execute the following php code:


and stored procedure is:
CREATE PROCEDURE TEST()
   RAISE EXCEPTION -746, 0, "testing...";
END PROCEDURE

I expect to see "testting..." but see nothing :-(
After some debuging I found out that while sqlca.sqlcode is equal -746,
sqlca.sqlerrm is empty.
I suppose it is informix/php interface bug because correspondent esqlc code
works with sqlca structure fine,
but I am not php or esqlc developer to patch php source :-(

Is there a way to send the message by stored pocedure exception to php?

Best wishes
Andrey Glukhov






-- 
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]




[PHP-DB] ODBC failed

2001-07-26 Thread Meng Yoke

Hi,

php 405
IIS 5.0 / W2K
MS Access 2000 

I had a simple script that will connect to MS Access
DB. I had created the DSN and it was tested ok on the
dos promopt.

When I tested using the IIS, it failed:

Warning: SQL error: [Microsoft][ODBC Driver Manager]
Data source name not found and no default driver
specified, SQL state IM002 in SQLConnect in
c:\inetpub\wwwroot\o2.php on line 3

Warning: Supplied argument is not a valid ODBC-Link
resource in c:\inetpub\wwwroot\o2.php on line 5


This is my script: 



any help appreciated?

thanks.

- yoke


=
===
   Yoke Meng Keong
   Email : [EMAIL PROTECTED] 
   eFax  : (253) 669-6578 (US)
===

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

-- 
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: [Fwd: [PHP-DB] How to LogOut?]Still no answer????

2001-07-26 Thread Paul Burney

on 7/26/01 6:25 PM, Ariunbold Gerelt-Od at [EMAIL PROTECTED] wrote:

> Somebody give me a advice???

You probably should try your question on the PHP General list:


This list should be reserved for messages related to using databases with
PHP.

Sincerely,

Paul Burney

++
Paul Burney
Webmaster && Open Source Developer
UCLA -> GSE&IS -> ETU
(310) 825-8365
<[EMAIL PROTECTED]>

++



-- 
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] report style printing

2001-07-26 Thread Sommai Fongnamthip

OK. How do I operate when finished generate text file or report file in 
server?  Could I download it and to view / print from client report viewer?

Sommai

At 09:32 27/7/2001 +0800, Beau Lebens wrote:
>i am also a tad confused.
>i have produced numerous reports in differing formats from PHP and a mysql
>database, using things such as many figures to calculate hours/dollar value
>for work in a timesheet format, text-based "comment" reports and simple
>archive reports for student details, these were all just formatted how i
>wanted them to print in the html, and then the user clicks print in their
>browser and they have a report.
>
>if you are referring to a "Custom Report Style" as in a different file
>format, then the most useful way I found of doing this is by generating a
>CSV file, or a tab delimited .txt file, which can then be opened in Excel or
>similar to display tabulated data, and most programs which manipulate data
>will accept a CSV file as input, and then manipulate it in different ways
>from there...
>
>hope something in there helps
>
>Beau
>
>// -Original Message-
>// From: [EMAIL PROTECTED]
>// [mailto:[EMAIL PROTECTED]]
>// Sent: Thursday, 26 July 2001 9:53 PM
>// To: Sommai Fongnamthip; [EMAIL PROTECTED]
>// Subject: Re: [PHP-DB] report style printing
>//
>//
>//
>// I'm confused - what do you mean? When you use the terms
>// "Browser Style" and
>// "Custom Report Style" are you referring to style sheets, a
>// property of a
>// particular browser, or what?
>//
>// If style sheets, keep in mind that different browsers react
>// in unique ways
>// to style sheets.
>//
>// As I understand PHP you use it to generate HTML output,
>// which more or less
>// constrains you to what you see in the browser. You can also
>// create a text
>// file and email it to the user, or display it in the browser,
>// but that will
>// involve programming the report in PHP, there is no report writer.
>//
>// Regards - Miles Thompson
>//
>//
>//
>// At 10:02 AM 7/26/01 +0700, Sommai Fongnamthip wrote:
>// >Hi,
>// > When I retrieve data to display on web with PHP,
>// it can print out
>// > from web in Browser Stlye.  How could we have some PHP
>// code to retrieve
>// > current display data into PC and print it with some Custom
>// Report Style?
>// >
>// >Sommai Fongnamthip
>// >
>// >
>// >--
>// >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]
>//
>//
>// --
>// 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]
>//
>
>--
>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]


-- 
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] PATCH for 9i support (was Re: [PHP-DB] Re: Oracle 9i Support)

2001-07-26 Thread Sommai Fongnamthip

Hi,
 I have oracle 8i in Linux server.  How could I connect it with PHP 
(on other server)?
SF

At 16:57 26/7/2001 -0500, Lee Whatley (System Admin) wrote:
>Here is a patch that will allow configure to properly detect oracle 9i
>If your mail server filters out attachments you can download it from
>http://www.cba.ua.edu/~spaff/php-4.0.6-oci8-oracle9i.patch
>
>The patch should be applied from directly outside of the php source
>tree.
>I am not a coder by any means so I hope this doesn't break anything.
>
>-Lee
>
>"Thies C. Arntzen" wrote:
> >
> > On Thu, Jul 26, 2001 at 02:21:02PM -0500, Lee Whatley (System Admin) wrote:
> > >
> > > If I try to use ocilogon("scott","tiger"); I get the following:
> > > Warning: _oci_open_server: Error while trying to retrieve text for error
> > > ORA-12546
> > >
> > > If its giving me an ORA-12546 error then I am assuming it is at least
> > > trying to talk to the database.  I guess it must be a library
> > > incompatibility issue.
> >
> > no -
> >
> > 12546, 0, "TNS:permission denied"
> > // *Cause: User has insufficient privileges to perform the
> > // requested operation.
> > // *Action: Acquire necessary privileges and try again.
> >
> > please make sure that the user that runs apache can actually
> > access $ORACLE_HOME and all needed files withing!
> >
> > tc
> >
> > >
> > > "Thies C. Arntzen" wrote:
> > > > if phpinfo says oci8 is included than it _is_. the libraries
> > > > used thing might (and probably is) broken. just try calling
> > > > ocilogon($user,$pw); and see what it does!
> > > >
> > > > tc--- ./php-4.0.6/configure.orig  Thu Jul 26 16:22:42 2001
>+++ ./php-4.0.6/configure   Thu Jul 26 16:30:31 2001
>@@ -573,8 +573,8 @@
>directory. If unspecified, the bundled MySQL 
> library
>will be used."
>  ac_help="$ac_help
>-  --with-oci8[=DIR]   Include Oracle-oci8 support. Default DIR is
>-  ORACLE_HOME."
>+  --with-oci8[=DIR]   Include Oracle-oci8 (oracle 8i and 9i) support.
>+  Default DIR is ORACLE_HOME."
>  ac_help="$ac_help
>--with-adabas[=DIR] Include Adabas D support.  DIR is the Adabas base
>install directory, defaults to /usr/local."
>@@ -31541,6 +31541,8 @@
> test -z "$OCI8_VERSION" && OCI8_VERSION=7.3
>elif test -f $OCI8_DIR/lib/libclntsh.s?.8.0; then
> OCI8_VERSION=8.1
>+  elif test -f $OCI8_DIR/lib/libclntsh.s?.9.0; then
>+   OCI8_VERSION=9.0
>elif test -f $OCI8_DIR/lib/libclntsh.s?.1.0; then
> OCI8_VERSION=8.0
>elif test -f $OCI8_DIR/lib/libclntsh.a; then
>@@ -31934,7 +31936,7 @@
>
>   ;;
>
>-   8.1)
>+   9.0)
>
>   case "clntsh" in
>   c|c_r|pthread*) ;;
>--- ./php-4.0.6/ext/oci8/config.m4.orig Thu Jul 26 16:22:51 2001
>+++ ./php-4.0.6/ext/oci8/config.m4  Thu Jul 26 16:24:34 2001
>@@ -7,6 +7,8 @@
> test -z "$OCI8_VERSION" && OCI8_VERSION=7.3
>elif test -f $OCI8_DIR/lib/libclntsh.s?.8.0; then
> OCI8_VERSION=8.1
>+  elif test -f $OCI8_DIR/lib/libclntsh.s?.9.0; then
>+   OCI8_VERSION=9.0
>elif test -f $OCI8_DIR/lib/libclntsh.s?.1.0; then
> OCI8_VERSION=8.0
>elif test -f $OCI8_DIR/lib/libclntsh.a; then
>@@ -72,6 +74,12 @@
>   ;;
>
> 8.1)
>+ PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
>+ PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
>+ AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
>+ ;;
>+
>+   9.0)
>   PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
>   PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
>   AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
>
>--
>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]


-- 
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] report style printing

2001-07-26 Thread Beau Lebens

i am also a tad confused.
i have produced numerous reports in differing formats from PHP and a mysql
database, using things such as many figures to calculate hours/dollar value
for work in a timesheet format, text-based "comment" reports and simple
archive reports for student details, these were all just formatted how i
wanted them to print in the html, and then the user clicks print in their
browser and they have a report.

if you are referring to a "Custom Report Style" as in a different file
format, then the most useful way I found of doing this is by generating a
CSV file, or a tab delimited .txt file, which can then be opened in Excel or
similar to display tabulated data, and most programs which manipulate data
will accept a CSV file as input, and then manipulate it in different ways
from there...

hope something in there helps

Beau

// -Original Message-
// From: [EMAIL PROTECTED]
// [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 26 July 2001 9:53 PM
// To: Sommai Fongnamthip; [EMAIL PROTECTED]
// Subject: Re: [PHP-DB] report style printing
// 
// 
// 
// I'm confused - what do you mean? When you use the terms 
// "Browser Style" and 
// "Custom Report Style" are you referring to style sheets, a 
// property of a 
// particular browser, or what?
// 
// If style sheets, keep in mind that different browsers react 
// in unique ways 
// to style sheets.
// 
// As I understand PHP you use it to generate HTML output, 
// which more or less 
// constrains you to what you see in the browser. You can also 
// create a text 
// file and email it to the user, or display it in the browser, 
// but that will 
// involve programming the report in PHP, there is no report writer.
// 
// Regards - Miles Thompson
// 
// 
// 
// At 10:02 AM 7/26/01 +0700, Sommai Fongnamthip wrote:
// >Hi,
// > When I retrieve data to display on web with PHP, 
// it can print out 
// > from web in Browser Stlye.  How could we have some PHP 
// code to retrieve 
// > current display data into PC and print it with some Custom 
// Report Style?
// >
// >Sommai Fongnamthip
// >
// >
// >--
// >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]
// 
// 
// -- 
// 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]
// 

-- 
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]




[Fwd: [PHP-DB] How to LogOut?]Still no answer????

2001-07-26 Thread Ariunbold Gerelt-Od

Somebody give me a advice???

 Original Message 
Subject: [PHP-DB] How to LogOut?
Date: 26 Jul 2001 07:59:29 -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]


It looks like Logout is the \"Big Problem\"???
As the others has reccomended I\'ve tried using Realm assigning to him 
time() value.But
It works for IE normally but not NS6.1.
So can someone give me an advice???

-- 
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]


.



-- 
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]




[PHP-DB] Interbase - transactions that disappear then reappear

2001-07-26 Thread Jeffery Cann

Greetings.

I have a data-entry web application that runs on:

PHP 4.0.5
Interbase 6.01 (open source)
Apache 1.3.19
Windows NT Server

The users report an unreproducible problem:

1.  A record is entered.
2.  Some time later (hours, days, weeks), user wished to update record.  
Yet, record does not appear in database.
3.  User re-enters record (with a strange sense of deja vu).
4.  Some time later, both original and new record appear in database.

My PHP application does the following for every transaction:

1.  connect
2.  run SQL statement (either insert, update, delete, or select)
3.  disconnect

The reason I disconnect is to auto commit.  During development, the 
ibase_commit() function did not work and I was having problems issuing a 
'COMMIT' statement directly.

I am stumped, because predictably, I cannot reproduce this problem.  During 
testing, every transaction I have entered is available.

I welcome any advice or suggestions.

Thanks
Jeffery Cann

-- 
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]




[PHP-DB] porting from ms sql to mysql

2001-07-26 Thread Brian Weisenthal

anyone know of a good website for information on taking on the task of
porting from ms sql to mysql?



-- 
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]




[PHP-DB] Re: (preg_match ?

2001-07-26 Thread Phillip Bow

This works only if the list is space delimited because of the \b:
$search = "TheName";
$data = "TheName TheAddress ThePhone";
if (preg_match("/\b$search\b/i", $data))
{ echo "True"; }
else { echo "False"; }

However as your list is now this works:

$search = "TheName";
$data = "TheName,TheAddress,ThePhone";
if (preg_match("/$search/i", $data))
{ echo "True"; }
else { echo "False"; }
--
phill


<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> What's wrong with this use of preg_match?
>
> $search = "TheName"
> $data = "TheName,TheAddress,ThePhone"
>
> if (preg_match('"/\b'.$search.'\b/i"', $data))
> {
> echo "True";
> }
> else
> {
> echo "False";
> }
> I am trying to see if the search name matches exactly a name in the $data.
> Thanks
> Dave



-- 
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]




[PHP-DB] (preg_match ?

2001-07-26 Thread phpnet

What's wrong with this use of preg_match?

$search = "TheName"
$data = "TheName,TheAddress,ThePhone"

if (preg_match('"/\b'.$search.'\b/i"', $data)) 
{
echo "True";
}
else
{
echo "False";
}
I am trying to see if the search name matches exactly a name in the $data.
Thanks
Dave

-- 
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]




[PHP-DB] Re: PATCH for 9i support (was Re: [PHP-DB] Re: Oracle 9i Support)

2001-07-26 Thread Thies C. Arntzen

On Thu, Jul 26, 2001 at 04:57:29PM -0500, Lee Whatley (System
Admin) wrote:
> Here is a patch that will allow configure to properly detect
> oracle 9i
> If your mail server filters out attachments you can download it from
> http://www.cba.ua.edu/~spaff/php-4.0.6-oci8-oracle9i.patch
> 
> The patch should be applied from directly outside of the php source
> tree.
> I am not a coder by any means so I hope this doesn't break anything.

applied (slightly different, but should do the same thing;-)
thanx for submitting!
tc

-- 
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]




[PHP-DB] PATCH for 9i support (was Re: [PHP-DB] Re: Oracle 9i Support)

2001-07-26 Thread Lee Whatley (System Admin)

Here is a patch that will allow configure to properly detect oracle 9i
If your mail server filters out attachments you can download it from
http://www.cba.ua.edu/~spaff/php-4.0.6-oci8-oracle9i.patch

The patch should be applied from directly outside of the php source
tree.
I am not a coder by any means so I hope this doesn't break anything.

-Lee

"Thies C. Arntzen" wrote:
> 
> On Thu, Jul 26, 2001 at 02:21:02PM -0500, Lee Whatley (System Admin) wrote:
> >
> > If I try to use ocilogon("scott","tiger"); I get the following:
> > Warning: _oci_open_server: Error while trying to retrieve text for error
> > ORA-12546
> >
> > If its giving me an ORA-12546 error then I am assuming it is at least
> > trying to talk to the database.  I guess it must be a library
> > incompatibility issue.
> 
> no -
> 
> 12546, 0, "TNS:permission denied"
> // *Cause: User has insufficient privileges to perform the
> // requested operation.
> // *Action: Acquire necessary privileges and try again.
> 
> please make sure that the user that runs apache can actually
> access $ORACLE_HOME and all needed files withing!
> 
> tc
> 
> >
> > "Thies C. Arntzen" wrote:
> > > if phpinfo says oci8 is included than it _is_. the libraries
> > > used thing might (and probably is) broken. just try calling
> > > ocilogon($user,$pw); and see what it does!
> > >
> > > tc

--- ./php-4.0.6/configure.orig  Thu Jul 26 16:22:42 2001
+++ ./php-4.0.6/configure   Thu Jul 26 16:30:31 2001
@@ -573,8 +573,8 @@
   directory. If unspecified, the bundled MySQL library
   will be used."
 ac_help="$ac_help
-  --with-oci8[=DIR]   Include Oracle-oci8 support. Default DIR is 
-  ORACLE_HOME."
+  --with-oci8[=DIR]   Include Oracle-oci8 (oracle 8i and 9i) support.
+  Default DIR is ORACLE_HOME."
 ac_help="$ac_help
   --with-adabas[=DIR] Include Adabas D support.  DIR is the Adabas base
   install directory, defaults to /usr/local."
@@ -31541,6 +31541,8 @@
test -z "$OCI8_VERSION" && OCI8_VERSION=7.3
   elif test -f $OCI8_DIR/lib/libclntsh.s?.8.0; then
OCI8_VERSION=8.1
+  elif test -f $OCI8_DIR/lib/libclntsh.s?.9.0; then
+   OCI8_VERSION=9.0
   elif test -f $OCI8_DIR/lib/libclntsh.s?.1.0; then
OCI8_VERSION=8.0
   elif test -f $OCI8_DIR/lib/libclntsh.a; then 
@@ -31934,7 +31936,7 @@
 
  ;;
 
-   8.1)
+   9.0)
  
  case "clntsh" in
  c|c_r|pthread*) ;;
--- ./php-4.0.6/ext/oci8/config.m4.orig Thu Jul 26 16:22:51 2001
+++ ./php-4.0.6/ext/oci8/config.m4  Thu Jul 26 16:24:34 2001
@@ -7,6 +7,8 @@
test -z "$OCI8_VERSION" && OCI8_VERSION=7.3
   elif test -f $OCI8_DIR/lib/libclntsh.s?.8.0; then
OCI8_VERSION=8.1
+  elif test -f $OCI8_DIR/lib/libclntsh.s?.9.0; then
+   OCI8_VERSION=9.0
   elif test -f $OCI8_DIR/lib/libclntsh.s?.1.0; then
OCI8_VERSION=8.0
   elif test -f $OCI8_DIR/lib/libclntsh.a; then 
@@ -72,6 +74,12 @@
  ;;
 
8.1)
+ PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
+ PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
+ AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
+ ;;
+
+   9.0)
  PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
  PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
  AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])



-- 
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]


[PHP-DB] Using PHP/MySQL with IIS and MS Proxy Client

2001-07-26 Thread Scott Gines

Apparently, php won't connect to MySQL if MS Proxy Client is running.  I
uninstalled Proxy Client and everything worked fine.  However, I need the
client for all my other internet apps to work.  Does anyone know a work
around for this problem??



-- 
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] Re: Oracle 9i Support

2001-07-26 Thread Lee Whatley (System Admin)

Ok I'm a dumbass :) $ORACLE_HOME was set to mode 770.  That seemed to
fix the problem. I'll have to do some more stuff besides loging-on to
the database to make sure all the functions work right though. When I
get some time I'll send you those patches for configure and
configure.m4.  In the meantime making a libclntsh.so.8.0 a symlink to
libclntsh.so.9.0 will work. Thanks.


-Lee


"Thies C. Arntzen" wrote:
> 
> On Thu, Jul 26, 2001 at 02:21:02PM -0500, Lee Whatley (System Admin) wrote:
> >
> > If I try to use ocilogon("scott","tiger"); I get the following:
> > Warning: _oci_open_server: Error while trying to retrieve text for error
> > ORA-12546
> >
> > If its giving me an ORA-12546 error then I am assuming it is at least
> > trying to talk to the database.  I guess it must be a library
> > incompatibility issue.
> 
> no -
> 
> 12546, 0, "TNS:permission denied"
> // *Cause: User has insufficient privileges to perform the
> // requested operation.
> // *Action: Acquire necessary privileges and try again.
> 
> please make sure that the user that runs apache can actually
> access $ORACLE_HOME and all needed files withing!
> 
> tc
> 
> >
> > "Thies C. Arntzen" wrote:
> > > if phpinfo says oci8 is included than it _is_. the libraries
> > > used thing might (and probably is) broken. just try calling
> > > ocilogon($user,$pw); and see what it does!
> > >
> > > tc

-- 
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] Re: Oracle 9i Support

2001-07-26 Thread Thies C. Arntzen

On Thu, Jul 26, 2001 at 01:50:37PM -0500, Lee Whatley (System
Admin) wrote:
> Well, I was able to modify the main configure script and the
> configure.m4 script in the ext/oci8 directory to detect 9i, and doing so
> allowed the configure process to complete and php to compile.  When I
> did a phpinfo() command it showed php as having oracle support, but did
> not list anything under the "libraries used" section.  This is the same
> thing that would happen if I left the configure scripts unchanged and
> just made a symlink to libclntsh.so.9.0.  phpinfo() would still say that
> oci8 support was there but would not list any libraries used.  Also in
> both of these cases when I tried to use any oracle functions,
> (ora_logon, etc) I got an undefined function error.  I don't WANT to use
> odbc, but if thats my only choice I guess I'll have to for awhile.

if phpinfo says oci8 is included than it _is_. the libraries
used thing might (and probably is) broken. just try calling
ocilogon($user,$pw); and see what it does! 

tc  

-- 
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] mysql query problem

2001-07-26 Thread Paul Burney

on 7/26/01 11:11 AM, Steve Fitzgerald ([EMAIL PROTECTED]) wrote:

> ran the query in the MySQL client and got the ERROR 1054: Unknown column
> '$ContactID' in 'where clause'.  I know the column ContactID exists.

Of course it did.  It can't find the text $ContactID in the table.  Try
putting in a number (1,2,3, etc.) and see if it works.

If it does, try echo'ing out the $ContactID and the $sql to the screen.  See
if $ContactID really is set and then try the output of $sql in the MySQL
client.

';
 
$sql="SELECT * FROM contacts WHERE ContactID='$ContactID'";

echo 'SQL query is: ' , $sql, '';

$result = mysql_query($sql,$db);

printf("%s\n", mysql_result($result,"FirstName"));

printf("%s\n", mysql_result($result,"LastName"));

?>

Hope that helps.

Sincerely,

Paul Burney

+-+-+
| Paul Burney | P: 310.825.8365 |
| Webmaster && Programmer | E: <[EMAIL PROTECTED]>   |
| UCLA -> GSE&IS -> ETU   | W:  |
+-+-+


-- 
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] Re: Oracle 9i Support

2001-07-26 Thread Lee Whatley (System Admin)

Well, I was able to modify the main configure script and the
configure.m4 script in the ext/oci8 directory to detect 9i, and doing so
allowed the configure process to complete and php to compile.  When I
did a phpinfo() command it showed php as having oracle support, but did
not list anything under the "libraries used" section.  This is the same
thing that would happen if I left the configure scripts unchanged and
just made a symlink to libclntsh.so.9.0.  phpinfo() would still say that
oci8 support was there but would not list any libraries used.  Also in
both of these cases when I tried to use any oracle functions,
(ora_logon, etc) I got an undefined function error.  I don't WANT to use
odbc, but if thats my only choice I guess I'll have to for awhile.

-Lee

"Thies C. Arntzen" wrote:
> 
> On Thu, Jul 26, 2001 at 01:17:57PM -0500, Lee Whatley (System
> Admin) wrote:
> > Well I found out that the reason I got the error message was
> > that the
> > --with-oci8 option was looking for libclntsh.so.8.0
> > I made a symlink of this which pointed to the libclntsh.so.9.0 that
> > comes with oracle 9i.  This was enough to fool the configure script and
> > allowed php to compile, but none of the oracle functions worked.  I
> > guess we will just have to wait until the developers add support in.
> > Could you please give me some more information as to how you set up the
> > oracle odbc drivers?
> 
> i haven't managed to install 9i so far - if you could write a
> patch that detects 9i correctly on your system we'll gladly
> apply it!
> 
> but _why_ do you want to use the oracle-odbc stuff?
> 
> tc
> 
> --
> 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]

-- 
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] Re: Oracle 9i Support

2001-07-26 Thread Thies C. Arntzen

On Thu, Jul 26, 2001 at 01:17:57PM -0500, Lee Whatley (System
Admin) wrote:
> Well I found out that the reason I got the error message was
> that the
> --with-oci8 option was looking for libclntsh.so.8.0
> I made a symlink of this which pointed to the libclntsh.so.9.0 that
> comes with oracle 9i.  This was enough to fool the configure script and
> allowed php to compile, but none of the oracle functions worked.  I
> guess we will just have to wait until the developers add support in. 
> Could you please give me some more information as to how you set up the
> oracle odbc drivers?

i haven't managed to install 9i so far - if you could write a
patch that detects 9i correctly on your system we'll gladly
apply it!

but _why_ do you want to use the oracle-odbc stuff?

tc

-- 
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]




[PHP-DB] Re: Oracle 9i Support

2001-07-26 Thread Lee Whatley (System Admin)

Well I found out that the reason I got the error message was that the
--with-oci8 option was looking for libclntsh.so.8.0
I made a symlink of this which pointed to the libclntsh.so.9.0 that
comes with oracle 9i.  This was enough to fool the configure script and
allowed php to compile, but none of the oracle functions worked.  I
guess we will just have to wait until the developers add support in. 
Could you please give me some more information as to how you set up the
oracle odbc drivers?

Thanks,
-Lee

Marcin Floryan wrote:
> 
> Lee Whatley wrote:
> 
> > I am trying to use php 4.0.6 with an Oracle 9i database.  Using the
> > --with-oci8 compile option does not seem to work as it gives me the
> > following message:
> 
> I have the same problem so If you find any good solution please let me know
> by e-mail. For now I think it is best to use Oracle ODBC drivers.
> 
> --
> Marcin Floryan
> [EMAIL PROTECTED]

-- 
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] mysql query problem

2001-07-26 Thread Steve Fitzgerald

ContactID is setup as a tinyint so I dropped the single ticks. No luck. I
ran the query in the MySQL client and got the ERROR 1054: Unknown column
'$ContactID' in 'where clause'.  I know the column ContactID exists.

Steve


"Josh Hoover" <[EMAIL PROTECTED]> wrote in message
E973048AB322D411AE99009027E32DF685CCF3@FRAZ">news:E973048AB322D411AE99009027E32DF685CCF3@FRAZ...
> In your query, do you need the single ticks around the $ContactID?  Is the
> ContactID column a char/varchar field which would require the single
ticks?
> I'm wondering if that's causing your problem.  Also, what if you do that
> query via the MySQL client?  What do you get then?
>
> Josh Hoover
> KnowledgeStorm, Inc.
> [EMAIL PROTECTED]
>
> Searching for a new IT solution for your company? Need to improve your
> product marketing?
> Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can
simplify
> the process for you.
> KnowledgeStorm - Your IT Search Starts Here
>
> > I'm trying to query my database to fill in data First Name
> > Last Name. Using
> > the script below I get (depending on the ContactID I enter)
> >
> > Contact: 1 1 or 2 2
> >
> > If ContactID=0 I get
> >
> > Contact:
> >
> > Any ideas on what I am doing wrong?
> >
> > Thanks.
> >
> > Steve Fitzgerald
> >
> >  > $sql="SELECT * FROM contacts WHERE ContactID='$ContactID'";
> >   $result = mysql_query($sql,$db);
> >
> >printf("%s\n", mysql_result($result,"FirstName"));
> >
> > printf("%s\n", mysql_result($result,"LastName"));
> >
> >
> >   ?>
>



-- 
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] OCI Persistent Conncetion - how is shared?

2001-07-26 Thread Thies C. Arntzen

On Thu, Jul 26, 2001 at 01:18:11PM +0200, cristiano wrote:
> A question...
> How is shared the connection with oracle db by using OCIPLogon() function?
> 
>  - One for each child web processes
that's the way it works...
tc

-- 
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] mysql query problem

2001-07-26 Thread Hoover, Josh

In your query, do you need the single ticks around the $ContactID?  Is the
ContactID column a char/varchar field which would require the single ticks?
I'm wondering if that's causing your problem.  Also, what if you do that
query via the MySQL client?  What do you get then?

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 
 
> I'm trying to query my database to fill in data First Name 
> Last Name. Using
> the script below I get (depending on the ContactID I enter)
> 
> Contact: 1 1 or 2 2
> 
> If ContactID=0 I get
> 
> Contact:
> 
> Any ideas on what I am doing wrong?
> 
> Thanks.
> 
> Steve Fitzgerald
> 
>  $sql="SELECT * FROM contacts WHERE ContactID='$ContactID'";
>   $result = mysql_query($sql,$db);
> 
>printf("%s\n", mysql_result($result,"FirstName"));
> 
> printf("%s\n", mysql_result($result,"LastName"));
> 
> 
>   ?>



[PHP-DB] PHP and Informix installation

2001-07-26 Thread Muciño Zúñiga Marco Antonio

Hi, I installed php y my UNIX SCO Openserver and it works fine. Now, in the
same server is installed the Informix Online 5.10. I want to access the
Informix databases then I run the next commands successfully:

cd php-4.0.6
./configure --with-apache=../apache_1.3.20 --enable-track-vars
--with-informix=/usr/informix
make
make install
cd ../apache_1.3.20
./configure --prefix=/usr/internet/apache
--activate-module=src/modules/php4/libphp4.a

All is OK until the last command (./configure ...) I get the error messages:

# ./configure --prefix=/usr/internet/apache
--activate-module=src/modules/php4/libphp4.a

Configuring for Apache, Version 1.3.20

 + using installation path layout: Apache (config.layout)

 + activated php4 module (modules/php4/libphp4.a)

Creating Makefile

Creating Configuration.apaci in src

Creating Makefile in src

 + configured for SCO 5 platform

 + setting C compiler to gcc

 + setting C pre-processor to gcc -E

 + checking for system header files

 + adding selected modules

o php4_module uses ConfigStart/End

 + checking sizeof various data types

 + doing sanity check on compiler and options

** A test compilation with your Makefile configuration

** failed.  The below error output from the compilation

** test will give you an idea what is failing. Note that

** Apache requires an ANSI C Compiler, such as gcc.

 

cd ..; gcc  -DSCO5 -I/tmp/php-4.0.6 -I/tmp/php-4.0.6/main
-I/tmp/php-4.0.6/main 
-I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/Zend -I/tmp/php-4.0.6/TSRM
-I/tmp/php-4.0
.6/TSRM -I/tmp/php-4.0.6 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED
`./apaci`
 -o helpers/dummy helpers/dummy.c   -L/usr/informix/lib
-L/usr/informix/lib/
esql -L/tmp/php-4.0.6/ext/informix  -L/usr/informix/lib
-L/usr/informix/lib/esql
 -L/tmp/php-4.0.6/ext/informix -Lmodules/php4 -L../modules/php4
-L../../modules/
php4 -lmodphp4   -lifsql -lifasf -lifgen -lifos -lifgls -lnsl_s -lcrypt_i
-lgen 
-lsocket -lnsl -lsuds -ltinfo -lprot -lx -ltinfo -lc -lphpifx -lifglx
-lcrypt -l
m -lsocket  -lsocket   -lsocket -lmalloc -lprot -ltinfo -lx -lm

Undefined   first referenced

 symbol in file

getspnam/usr/informix/lib/esql/libifos.so

helpers/dummy: fatal error: Symbol referencing errors. No output written to
help
ers/dummy

make: *** [dummy] Error 1

 Error Output for sanity check 

= End of Error Report =

 

 Aborting!




Looks like the library libifos.so is wrong, does anyone have an idea what's
going on? Thanks in advance.

Marco Muciño


--
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]




[PHP-DB] mysql query problem

2001-07-26 Thread Steve Fitzgerald

I'm trying to query my database to fill in data First Name Last Name. Using
the script below I get (depending on the ContactID I enter)

Contact: 1 1 or 2 2

If ContactID=0 I get

Contact:

Any ideas on what I am doing wrong?

Thanks.

Steve Fitzgerald

\n", mysql_result($result,"LastName"));


  ?>



-- 
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] simple database question

2001-07-26 Thread Hoover, Josh

OK, you're using SQL Server, right?  Try executing this statement after you
insert the user and before you try inserting the address record:

select @@identity

That should give you the last inserted id, assuming it's an identity column.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 


-Original Message-
From: Brian Weisenthal [mailto:[EMAIL PROTECTED]]
Sent: 26 July 2001 15:08
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: simple database question


oh, using ms sql



RE: [PHP-DB] Re: simple database question

2001-07-26 Thread Dave Watkinson


Oops sorry

I keep assuming this is a MySQL/PHP list! D'oh!



Dave



-Original Message-
From: Brian Weisenthal [mailto:[EMAIL PROTECTED]]
Sent: 26 July 2001 15:08
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: simple database question


oh, using ms sql

"Brian Weisenthal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ok this should be an easy one, i am just blanking on it here.
>
> i want to link two tables together, a user table and address table. i
create
> the user entry first, then create the address entry. after creating the
> address entry how do i get the auto_id that was entered in to enter it
into
> the user table? there is no unique field in the address table. any ideas?
>
>



-- 
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]



-- 
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]




[PHP-DB] Re: simple database question

2001-07-26 Thread Brian Weisenthal

oh, using ms sql

"Brian Weisenthal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ok this should be an easy one, i am just blanking on it here.
>
> i want to link two tables together, a user table and address table. i
create
> the user entry first, then create the address entry. after creating the
> address entry how do i get the auto_id that was entered in to enter it
into
> the user table? there is no unique field in the address table. any ideas?
>
>



-- 
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] simple database question

2001-07-26 Thread Hoover, Josh

Hi Brian,

Are you using MySQL?  If so, you can use the function mysql_insert_id().

http://www.php.net/manual/en/function.mysql-insert-id.php

That will give you the last id inserted by MySQL which you can use in the
address table.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

> -Original Message-
> From: Brian Weisenthal [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 9:53 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] simple database question
> 
> 
> ok this should be an easy one, i am just blanking on it here.
> 
> i want to link two tables together, a user table and address 
> table. i create
> the user entry first, then create the address entry. after 
> creating the
> address entry how do i get the auto_id that was entered in to 
> enter it into
> the user table? there is no unique field in the address 
> table. any ideas?
> 
> 
> 
> -- 
> 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] simple database question

2001-07-26 Thread Dave Watkinson

What I usually do is do a SELECT COUNT(user_primary_key_column_name) and
count the number of rows - then I'll know what the last autonumber added
was.

A more accurate way is to do your INSERT statement, then follow it
immediately with a SELECT

select uid,name,address1,phone from users where name = '$name', address1 =
'$address1', phone = '$phone'

or whatever

then you can retrieve the value of uid for your address INSERT.


hth

Dave
currently been here 16 hours...and counting
Zzz




-Original Message-
From: Brian Weisenthal [mailto:[EMAIL PROTECTED]]
Sent: 26 July 2001 14:53
To: [EMAIL PROTECTED]
Subject: [PHP-DB] simple database question


ok this should be an easy one, i am just blanking on it here.

i want to link two tables together, a user table and address table. i create
the user entry first, then create the address entry. after creating the
address entry how do i get the auto_id that was entered in to enter it into
the user table? there is no unique field in the address table. any ideas?



--
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]



-- 
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]




[PHP-DB] simple database question

2001-07-26 Thread Brian Weisenthal

ok this should be an easy one, i am just blanking on it here.

i want to link two tables together, a user table and address table. i create
the user entry first, then create the address entry. after creating the
address entry how do i get the auto_id that was entered in to enter it into
the user table? there is no unique field in the address table. any ideas?



-- 
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] report style printing

2001-07-26 Thread Miles Thompson


I'm confused - what do you mean? When you use the terms "Browser Style" and 
"Custom Report Style" are you referring to style sheets, a property of a 
particular browser, or what?

If style sheets, keep in mind that different browsers react in unique ways 
to style sheets.

As I understand PHP you use it to generate HTML output, which more or less 
constrains you to what you see in the browser. You can also create a text 
file and email it to the user, or display it in the browser, but that will 
involve programming the report in PHP, there is no report writer.

Regards - Miles Thompson



At 10:02 AM 7/26/01 +0700, Sommai Fongnamthip wrote:
>Hi,
> When I retrieve data to display on web with PHP, it can print out 
> from web in Browser Stlye.  How could we have some PHP code to retrieve 
> current display data into PC and print it with some Custom Report Style?
>
>Sommai Fongnamthip
>
>
>--
>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]


-- 
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]




[PHP-DB] OCI Persistent Conncetion - how is shared?

2001-07-26 Thread cristiano

A question...
How is shared the connection with oracle db by using OCIPLogon() function?

 - One for each child web processes
 - One for all child web processes

thanks

cristiano



-- 
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]




[PHP-DB] Re: report style printing

2001-07-26 Thread threetc

Sommai Fongnamthip wrote:
> 
> Hi,
> When I retrieve data to display on web with PHP, it can print out from web
> in Browser Stlye.  How could we have some PHP code to retrieve current
> display data into PC and print it with some Custom Report Style?
> 
> Sommai Fongnamthip

I'm currently trying to figure this one out myself - with limited
success :-(

One way of doing it I suspect is to generate PDF documents with which to
do your reports.

You might need to install PDFlib (see www.pdflib.com) and also the TIFF
library (www.libtiff.org) and the JPEG library
(ftp://ftp.uu.net/graphics/jpeg/).

I've managed to install these libraries but I stll can't seem to compile
PHP so that it recognizes them.

Any suggestions would be welcome.

Michael Egan

-- 
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]




[PHP-DB] Anyone got phpdbform working with PostgreSQL?

2001-07-26 Thread Philip Rhoades

Hi all,

phpdbform appears to be just what I need for some development work but I 
need to run it with PostgreSQL - I tried modifying the demo include file 
but I still get a connect MySQL error on phpdbform_db . .

Has anyone got phpdbform files that are already working with PG?

I registered on the phpdbform site but I still could not login in to leave 
a message on their forum - I wrote a note to the author with no response . .

Thanks,

Phil.

-
Philip Rhoades

Pricom Pty Limited  (ACN  003 252 275)
GPO Box 3411
Sydney NSW  2001
Australia
Mobile:  +61:0411-185-652
Fax:  +61:2:8923-5363
E-mail:  [EMAIL PROTECTED]



-- 
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] Question on how to test a value

2001-07-26 Thread Dobromir Velev

Hi,
even if there was no data in the price field when the form was submited the
$price variable exists and isset($price) returns true. May be you could try
!empty($price) instead of isset($price) - Something like.

$query7 = !empty($price) ? "INSERT INTO price (itemid, price) VALUES
($itemid, '$price')" : 0;
$result7 = @pg_Exec($connection, $query7 );

Then when the price field is empty your script will not insert anything into
the database.
You can also modify your select query not to show records without price

select * from price where itemid=50 and price is not Null and price<>"";

Hope this will help
Dobromir Velev

-Original Message-
From: Lara J. Fabans <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, July 25, 2001 7:52 PM
Subject: [PHP-DB] Question on how to test a value


Hi, friends,

Here is how I'm putting the information into the database:
$query7 = isset($price) ? "INSERT INTO price (itemid, price) VALUES
($itemid, '$price')" : 0;
$result7 = @pg_Exec($connection, $query7 );

I'm having difficulties with my test in display.
I've tried isset and == 'NULL' and == '0' as such:

if ($values2 == 'NULL')
{
   print " ";
} else
{
print "US$
$values2->price";
}


and


if (isset($values2))
{
   print "US$
$values2->price";
} else
{
print " ";
}


However, in both cases, if the price doesn't exist in the database, the  US$
still shows up in the
display.

db=> select * from price where itemid=50;
priceid | itemid | price
-++---
  48 | 50 |
(1 row)


I was surprised that the insert put something into the database at all.

I could use some advice.

I cleaned up the database to remove all the lines where price wasn't set.
Why is it creating a table row?  If the insert form is passing in where they
didn't set the price,
wouldn't that get picked up by the isset?

And if there isn't a row in the database, wouldn't testing isset of the
result of the query be
sufficient, or should I do a test on $values2->price instead?

I've tried lots of things and nothing seems to be doing the right behavior.
So thanks!
Lara



-- 
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]




[PHP-DB] How to LogOut?

2001-07-26 Thread god


It looks like Logout is the \"Big Problem\"???
As the others has reccomended I\'ve tried using Realm assigning to him time() 
value.But
It works for IE normally but not NS6.1.
So can someone give me an advice???

-- 
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] 'htaccess" method : how to modify passwords from PHP scripts ?

2001-07-26 Thread Samuel Torton

Hi,


Thank you to everybody who answered my question.
Unfortunately, I don't use classes in my php.
Here is the solution I actually used :


--
--
// Generate new line for username + modified password
$line = read_cgi("username").":".crypt(read_cgi("password"))."\n";

// opens a temp file
$pass_file_tmp = fopen(PASS_FILE_TMP,"a");

// reads actual password file
$fcontents = file(PASS_FILE);
while ( list( $numero_ligne, $ligne ) = each( $fcontents ) )
{
  if (!ereg(read_cgi("username"),$ligne))
  {
fwrite($pass_file_tmp,$ligne);
  }
}

// add new password of the selected user
fwrite($pass_file_tmp,$line);

// deletes the old passwd file and replaced by the new one
rename(PASS_FILE_TMP,PASS_FILE);
--
--


Regards,

--
Samuel Torton
NCSLab.com

-- 
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]