RE: [PHP-DB] Oracle Client Libraries?

2001-07-11 Thread Brian S. Dunworth


The Oracle Client for Windows NT/2000 and for Windows NT discs are both 
included in the CD-ROM distribution pack for Sun SPARC Solaris.  You don't 
indicate which version you're running, but I've found the Windows (whatever 
flavor) Client software to be included in every Oracle version we've had 
here since version 5.x.   Interestingly, if you're running your database on 
Solaris and your web server on Linux, you have to call WorldWide Support 
and request a Linux CD Pack to get the Oracle Client for Linux software 
(you can't get *just* the Client, you get the entire Oracle for Linux 
distribution pack.  :shrug:)

 - Brian

 ---------
   Brian S. Dunworth
   Sr. Software Development Engineer
   Oracle Database Administrator
   The Printing House, Ltd.

   (850) 875-1500  x225
   <[EMAIL PROTECTED]>
 -


-Original Message-
From:   Tom Tsongas [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, July 11, 2001 12:56 PM
To: [EMAIL PROTECTED]
Subject:[PHP-DB] Oracle Client Libraries?

Hi all.

Where can I get the Oracle client libraries for PHP4? I am running
Apache and PHP4 on my NT Server and I will be connecting to an Oracle
database on a Solaris server via remote connect? I saw some threads
earlier indicating that they could be found at download.swwwing.com but
that server is apparantly no longer running.

Anyone?

Thanks.

Tom Tsongas



--
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] problems connecting to remote oracle database

2001-07-03 Thread Brian S. Dunworth

Hi Phil...

   Since you have the server name (vs. the IP address) in the HOST= verb, 
make sure you have an entry in /etc/hosts for a server called 'staging'

eg:

 $ cat hosts
 127.0.0.1   localhost
 219.70.73.2staging
 $

 ...obviously, you'd want to put the actual IP address of your 'staging' 
server in there, not the one I made up. :)


 - Brian


 -----
   Brian S. Dunworth
   Sr. Software Development Engineer
   Oracle Database Administrator
   The Printing House, Ltd.

   (850) 875-1500  x225
   <[EMAIL PROTECTED]>
 -


-Original Message-
From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent:   Monday, July 02, 2001 7:52 PM
To: [EMAIL PROTECTED]
Subject:Re: [PHP-DB] problems connecting to remote oracle database

a little more info...

I've just tried a few public oracle-sql tools.
Seems to have the same problem.
I can connect just fine to the database using sqlplus.
But when I try the hand-compiled tools, linked against
libclntsh.so, it doenst properly authenticate to the remote system.

Hey... $ORACLE_HOME/bin/sqlplus isnt linked against
libclntsh.so, funnily enough.

any ideas? Some special magic I need to put in tnsnames.ora, thta I've
othrewise left out?

sample, that works fine with sqlplus;

TEST2.STAGING.our.com =
  (DESCRIPTION =
(ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = staging)(PORT = 1521))
)
(CONNECT_DATA =
  (SERVICE_NAME = test2.staging.our.com)
  (SID =  test2)
)
  )


--
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] problems connecting to remote oracle database

2001-07-02 Thread Brian S. Dunworth

Hi Phil,

   Make sure that the web user (usually 'nobody' on an Apache installation) 
has access to the $ORA_HOME/bin directory and permissions to execute the 
binaries within.  Also, be sure that ORA_HOME and ORACLE_SID are set in the 
'nobody' user environment...

 - Brian


 ---------
   Brian S. Dunworth
   Sr. Software Development Engineer
   Oracle Database Administrator
   The Printing House, Ltd.

   (850) 875-1500  x225
   <[EMAIL PROTECTED]>
 -


-Original Message-
From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent:   Saturday, June 30, 2001 12:39 PM
To: [EMAIL PROTECTED]
Subject:[PHP-DB] problems connecting to remote oracle database

Hi folks,

I'm having difficulties getting php4 to connect to a remote oracle
database.

I have an entry in tnsnames.ora, along the lines of

shorthostname = (etc, etc)

and I can use "sqlplus user/name@shorthostname" to connect just fine, as
a regular user. Even without ORACLE_SID set, since I have it set in
tnsnames.ora for that entry

But when I try
 ocilogin("user","name","shorthostname");

on a php page, I get a printout of oracle error 01017: authentication
failed.
The listener log on that oracle machine confirms that I am actually
attempting to connect. But no details on what's going wrong.

Any suggestions?

--
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] Oracle Client to connect to remote DB

2001-06-29 Thread Brian S. Dunworth

Hi Jeff...

   Hmm.  I'm not certain, as every Oracle installation (db or client) I've 
ever done has been from the console.  In this particular situation, I seem 
to recall that the Oracle 8i installation is an X11 application, and I have 
no idea whether it would work even if you had X11 emulation in your telnet 
program turned on.  Further, you don't state whether you are the 
administrator or have administrator rights to the machine you're hoping to 
install on --  as root, you'll need to create an 'oracle' user in 
(probably) an 'oinstall' group.

   So... short story is:  I don't think so.   If you try it and it turns 
out that it does work, please let us know...

 - Brian


 -
   Brian S. Dunworth
   Sr. Software Development Engineer
   Oracle Database Administrator
   The Printing House, Ltd.

   (850) 875-1500  x225
   <[EMAIL PROTECTED]>
 -


-Original Message-
From:   Mindblender [SMTP:[EMAIL PROTECTED]]
Sent:   Wednesday, June 27, 2001 10:58 PM
To: [EMAIL PROTECTED]
Subject:Re: [PHP-DB] Oracle Client to connect to remote DB

Do you know if the Oracle client can beinstalled via the command line?  I
don't have access to the box itself, only telnet access.

Jeff

""Brian S. Dunworth"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Jeff,
>
>   As far as I know, you cannot get *only* the Oracle client for Linux.
>  When I called Oracle Worldwide Support and asked for one, they sent me
the
> whole Oracle 8i installation package for Linux.  No problem, though --
when
> you start the install on your Linux machine, you can choose to install
only
> the client.   That's what I did, and it's working fine connecting to the
> Oracle 8i database on our Sun.
>
>
> -Original Message-
> From: Mindblender [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 12:35 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Oracle Client to connect to remote DB
>
> I read a post on faqt.com that said that I could connect to a remote
Oracle
> DB if I had the Oracle client installed.  Does anyone know where I can 
get
> a
> copy of only the client for Linux?  I don't want to install the whole
> Oracle
> package, I use MySQL on the server, but have a client that is needing to
> connect to an Oracle DB on their server from mine.
>
> Any suggestions?
>
> Thanks,
> Jeff
> 
>
> -
>Brian S. Dunworth
>Sr. Software Development Engineer
>Oracle Database Administrator
>The Printing House, Ltd.
>
>(850) 875-1500  x225
><[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] Oracle Client to connect to remote DB

2001-06-26 Thread Brian S. Dunworth

Jeff,

  As far as I know, you cannot get *only* the Oracle client for Linux. 
 When I called Oracle Worldwide Support and asked for one, they sent me the 
whole Oracle 8i installation package for Linux.  No problem, though -- when 
you start the install on your Linux machine, you can choose to install only 
the client.   That's what I did, and it's working fine connecting to the 
Oracle 8i database on our Sun.


-Original Message-
From:   Mindblender [SMTP:[EMAIL PROTECTED]]
Sent:   Tuesday, June 26, 2001 12:35 AM
To: [EMAIL PROTECTED]
Subject:[PHP-DB] Oracle Client to connect to remote DB

I read a post on faqt.com that said that I could connect to a remote Oracle
DB if I had the Oracle client installed.  Does anyone know where I can get 
a
copy of only the client for Linux?  I don't want to install the whole 
Oracle
package, I use MySQL on the server, but have a client that is needing to
connect to an Oracle DB on their server from mine.

Any suggestions?

Thanks,
Jeff


---------
   Brian S. Dunworth
   Sr. Software Development Engineer
   Oracle Database Administrator
   The Printing House, Ltd.

   (850) 875-1500  x225
   <[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] OCIFetch performance problem with more rows

2001-05-22 Thread Brian S. Dunworth

At 08:49 PM 5/22/01 +0200, snpe wrote:
>Hello,
> I have performance problem with OCIFetch (and OCIFetchInto, too) 
> when query return more rows.Same query from sqlplus is more fastest (more 
> rows is worse then less rows)

   Are the columns you're fetching included in an Oracle index?  Without an 
appropriate index, your SQL statement is probably doing a full table scan, 
which can be *very* time-consuming...

  - Brian

  ---------
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
<[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] Strange MySQL problem with multiple consequent inserts

2001-05-14 Thread Brian S. Dunworth

At 05:56 PM 5/14/01 +0200, Stefano Bizzi wrote:
>$result = mysql_query ("INSERT INTO Ordini (ORDERID, DATA, RAGSOC,
>INDIRIZZO, CAP, CITTA, PROVINCIA, NAZIONE, EU, TELEFONO, FAX, EMAIL, ICQUIN,
>PARTITAIVA, MODPAGAMENTO, IP) VALUES ('$ORDERID', $DATA',

   You're missing the opening single quote on $DATA ^^^


>'$RAGIONESOCIALE',
>'$INDIRIZZO', '$CAP', '$CITTA', '$PV', 'IT', 1, '$TELEFONO', '$FAX',
>'$EMAIL', '$ICQUIN', '$PIVACFISC', '$PAYMENT', '$CURRENTIP')", $db) or die
>("wrong query : " . mysql_error());
>  print "Ordini Table : Insert ID : " . mysql_insert_id();
>print "Result : $result";
>foreach ($dettaglio as $elemento)
>{
>$parti = explode("|", $elemento);
>$result = mysql_query ("INSERT INTO Dettaglio (ORDERID, PARTID,
>DESCRIZIONE, PREZZOIE, ALIVA) VALUES ('$ORDERID', '$parti[0]', '$parti[1]',
>'$parti[2]', '20')", $db) or die (mysql_error());
>print "Detail Table - Insert ID : " . mysql_insert_id();
>print "Result : $result";
> }
>
>is supposed to add several records to my MySQL table. As you notice, it is
>written to add a first record (order record) and a subset of records realted
>to that order (in the foreach cycle). I tried with 1 order and 5 details,
>and add OR the order OR the details (always all the detail records are added
>in this case)... never both together. The strange thing is that the output
>to the browser is the following:
>
>Ordini Table : Insert ID : 0
>Result : 1
>Detail Table - Insert ID : 1
>Result : 1
>Detail Table - Insert ID : 2
>Result : 1
>Detail Table - Insert ID : 3
>Result : 1
>Detail Table - Insert ID : 4
>Result : 1
>Detail Table - Insert ID : 5
>Result : 1
>
>So, from what i can understand, the queries are issued correctly (result is
>always true) and also the insert_id is updated correctly. What could cause
>the random insert of the records?
>
>Thanks in advance for any suggestion :)
>
>Stefano
>
>
>
>--
>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]

  -
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
<[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] Creating tables

2001-04-25 Thread Brian S. Dunworth

At 08:00 AM 4/25/01 +0200, Herman Wapenaar wrote:
>I am using a website based in the states to which is PHP enabled. I am 
>using MySQL.
>
>Is there a way to create a table with PHP? I do not see any command for that.

   Well, as an Oracle administrator, I may be going out on a limb here 
regarding MySQL, but doesn't it accept standard SQL syntax to create, alter 
or drop tables?

CREATE TABLE abc AS SELECT * FROM def WHERE ghi LIKE '%jkl';
 (to copy some elements from one table to a new table)

CREATE TABLE test (col1 NUMBER NOT NULL PRIMARY KEY,
   col2 CHAR(2) NOT NULL);

ALTER TABLE test ADD col3 NUMBER(5) NOT NULL;

DROP TABLE test;

  - Brian

  ---------
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
<[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] PHP and Oracle

2001-04-18 Thread Brian S. Dunworth

At 03:43 PM 4/18/01 +0800, Lester June Cabrera wrote:

>How would I install PHP with Oracle support if Oracle is on another 
>machine, not in the web server machine?

  1.  Install the Oracle Net8 client on your web server...

  2.  Configure the Oracle Net8 client on your web server...

  3.  Compile PHP with OCI8 support...

  Now, the next thing that usually happens is that I'll get an email asking 
me "where do I get the Oracle Net8 client?"  then, "how do I install the 
Net8 client?"  still later, I'll get another email asking "how do I 
configure the Net8 client?"  then...

  So, to avoid all that...

   The Oracle Net8 client is available from Oracle Corporation.  There is a 
client available for just about every platform imaginable.  Call Oracle 
support with your CSI number and they'll gladly ship whichever client 
platform software you need for free.  Sometimes, the client software isn't 
available as a stand-alone disk, and they'll send you an entire Oracle 8i 
installation set - fear not, it contains the Net8 client for that architecture.

   To configure the Net8 client, follow the directions provided with the 
installation.  Basically, you need to set up your tnsnames.ora file to 
locate the oracle server.  There are utilities installed with the client to 
help you configure and test it.  It probably wouldn't be a bad idea for you 
to *also* install the SQL*Plus software, which operates through the Net8 
interface as well...

  - Brian

  -
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
<[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] Fatal error: Call to unsupported or undefined function mysql_connect()

2001-04-12 Thread Brian S. Dunworth

Such patience!  You waited nearly 7 whole minutes before reposting your 
message!

I don't run MySQL, so I'm not sure... but it looks like you probably don't 
have MySQL support in your version of PHP. Try:



...and see if it says you do.


At 12:44 PM 4/13/01 -0400, franky wrote:
>I'm trying to connect to mySQL DB by Web page
>  and
>
>when I use mysql_connect()
>this append:
>Fatal error: Call to unsupported or undefined function mysql_connect()
>
>thanks!
>
>Franky
>[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]

  -
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
<[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] date_format for Oracle

2001-04-12 Thread Brian S. Dunworth

At 10:12 PM 4/11/01 +, Richard Crawford wrote:
>This isn't strictly a PHP question, I suppose... but is anyone aware of a 
>date_format function for Oracle comparable to MySQL's date_format() function?

   I'm not familiar at all with MySQL nor its date_format() function, but 
Oracle has two functions for changing the DATE type to CHAR strings and 
vice-versa.  Take a look at the TO_CHAR and TO_DATE functions in Oracle (in 
the online help pages, if they were installed, or on the documentation CDROM)

   example:

select to_char(date_field,'DD-MON- HH24:MI:SS')
   from table1
   where rownum < 5;

   output:

26-MAR-2001 18:09:59
26-MAR-2001 18:09:59
26-MAR-2001 18:09:59
26-MAR-2001 18:09:59


   example:

select to_char(date_field,'Day, Month DD,  HH:MI AM')
   from table1
   where rownum < 5;

   output:

Monday   , March 26, 2001 06:09 PM
Monday   , March 26, 2001 06:09 PM
Monday   , March 26, 2001 06:09 PM
Monday   , March 26, 2001 06:09 PM


  ...there's a lot you can do with this formatting to get exactly what you 
want.  Try typing "HELP FORMAT DATES" at the SQL prompt, and if you're 
lucky your DBA has installed the online help files.

  - Brian

  -
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
<[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] oracle and php

2001-04-06 Thread Brian S. Dunworth

At 09:05 AM 4/6/01 -0500, Brian.J.Mauter wrote:
>If you're using Linux or Unix, then you're going to have to compile Oracle 
>into PHP.

   right...

>This is quite troublesome.

   not really.

>For this to work, you first must install Oracle8i (maybe just the client 
>will work?).

   Yes, you may install only the client Net8 client on the 
webserver.  ..but you also must configure it so that it can reach your 
Oracle database (presumably on a different server).  Here, I've got 
Apache/PHP and the Oracle Net8 client installed on a Linux box.  The 
database is installed on a huge Sun box.


>This also requires a specific version of the Java Runtime Environment 
>(available at www.blackdown.com for Linux).

   Could you explain this?  I don't recall having to install any specific 
Java Runtime Environment on our Linux box...

>After that, on your ./configure line, you need the option
>  --with-oci=/usr/local/Oracle/ or wherever you installed
>Oracle.

   or, more specifically, the ORACLE_HOME directory.  Quite likely, it's 
more apt to be --with-oci=/home/oracle/OraHome1/

>Brian Mauter
>[EMAIL PROTECTED]

   Roll Tide!

- Brian

  -
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
<[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] count function?

2001-03-30 Thread Brian S. Dunworth

At 10:06 AM 3/30/01 -0800, Larry Rivera wrote:
>I think you have to run multiple queries, ie run some loop after finding out
>what topics you wil count from e==>
>
>run a select distinct to get the topics
>run a while or for loop then run queries again like count(*) where
>topic='$topic'

   Better yet (and less db-intensive), run a

SELECT TOPIC,COUNT(*) FROM table_name
   WHERE condition
   GROUP BY TOPIC
   ORDER BY COUNT(*);

That'll return:

  TOPICCOUNT(*)
   
  Topic A 8
  Topic B 3
  Topic C 1
  Topic D 0
  Topic E 0


  ---------
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.

(850) 875-1500  x225
<[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]