[PHP] Windows + php + oracle PL/SQL = ORA-06550

2008-03-13 Thread Martin Jerga

Hello everyone,
I just installed Zend Core 2.5.0 (simply apache + php 5) with oracle 
instant client. I enabled the oracle extension. Everything works ok, but 
I ran into one strange problem.
I can connect to the oracle server without problems, I can also perform 
SELECTs,INSERTs, etc. The problems start when I try to execute a PL/SQL 
script. E.g.

Lets have these 2 oracle tables.

CREATE TABLE TABLE_A
(
  AIDNUMBER,
  ADATA  VARCHAR2(255 BYTE)
)

CREATE TABLE TABLE_B
(
  BIDNUMBER,
  AIDNUMBER,
  BDATA  VARCHAR2(255 BYTE)
)

INSERT INTO TABLE_A (AID) VALUES (0)
INSERT INTO TABLE_B (BID) VALUES (0)

lets try to execute very simple PL/SQL

DECLARE AAID NUMBER;
BEGIN
SELECT MAX(AAID)+1 INTO AAID FROM TABLE_A;
INSERT INTO TABLE_A (
aid,adata)
VALUES (
AAID
, 'table_a data');
INSERT INTO TABLE_B (
bid,
aid,bdata)
VALUES (
(SELECT MAX(bid)+1 FROM TABLE_B)
,AAID
, 'table_b data');
END;

I can execute this script through TOAD or using simple Java script. But 
if I try to execute this script using the next php on the Zend Core, I 
get this warning.

Quote:

PHP Warning: oci_execute(): ORA-06550: line 1, column 21:
PLS-00103: Encountered the symbol "" when expecting one of the 
following:


begin function package pragma procedure subtype type use
  form
current cursor in C:\Program 
Files\Zend\Apache2\htdocs\coreLib\get_event_itm\test.php on line 21




Here is the very simplified code I'm using



Note: When I deployed this script onto the production server, running 
php5 on RH4, it finnished without problems.
To be honest, I don't even have an idea where the problem can be. I 
would be very thankful for any suggestions.

thank you
Martin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Nathan Nobbe
On 10/23/07, Daevid Vincent <[EMAIL PROTECTED]> wrote:
>
> I have a garage full of paper books/manuals that I have no idea WTF to do
> with because they're all outdated and the recycle people won't take them
> b/c
> it's too heavy in the blue bin.


maybe you could put them in there a few at a time ?

-nathan


RE: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Daevid Vincent
 

> -Original Message-
> Please include the list in replies.
> 
> > Thanks for your message, With regard to your message, the 
> main reason 
> > why I want it Electronically is because, Am a PHP Student 
> Who has no 
> > enough Cash to buy from Amazon or any bookseller and more 
> over, the book 
> > is not available in my West African Continent.
> >  
> > So therefore, If you have any way of assisting me in 
> getting it apart from E-Book Format, Please advice..
> >  
> 
> Being a poor student is not an excuse to ignore copyright, 
> nor is your 
> location. If you cannot get this particular book, for 
> whatever reason, I 
> can guarantee it says nothing that isn't available on the web 
> for free, 
> you just need to work a bit harder to find it.
> 
> Please don't ask this list to break the law for you again, 
> it's just not polite.

Okay. I stand corrected. It was for illegal reasons, 
but I still think people should be given the benefit of the doubt 
before being accused of anything. At least he was honest about it.

:)

d

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Daevid Vincent
 

> -Original Message-
> > >   Please I need a book called : "Oracle Database 10g 
> Express Edition PHP Web Programming (Osborne Oracle Press 
> Series): Books: by Michael McLaughlin".
> > >
> > >   Please if anyone with the E-Book Version of it should 
> be contact me on my Email
> > >
> > >   NOTE: I would prefer the E-Book Version if it is Available.
> > 
> > AFAIK this title is not available electronically, but it's readily 
> > available from Amazon or any other reputable bookseller.
> > 
> > Is there a particular reason why you want it electronically?
> 
> Pirate??

Or perhaps the OP doesn't want to cause more pollution via paper, or toxins
via all the ink used.

Or perhaps lugging around a huge 3 lb book in his brief-case or backpack is
not appealing.

Or perhaps it's the fact that most PDF books are all cross linked and
referenced with indexes and such so you can simply click.

Or perhaps b/c PDFs are convenient to keep on your PDA (or phone even these
days) so you always have the reference material handy.

Or perhaps they are a "pirate" and just didn't want to pay for the book and
a PDF is easier to obtain on USENET or other news feeds...

My point is, you don't know what the OP's reasons are, but there were FOUR
very real, very plausible reasons I just listed for wanting an eBook, vs.
your ONE single accusatory comment. Last I checked, it was not illegal to
purchase an eBook from someone that didn't want their copy anymore. Perhaps
he was requesting a private dialog for that reason and to keep the list
clear of unnecessary clutter.

I have a garage full of paper books/manuals that I have no idea WTF to do
with because they're all outdated and the recycle people won't take them b/c
it's too heavy in the blue bin. Libraries don't want them. I can't sell
them, shipping alone would cost too much -- I can't even give many of them
away. I *WISH* I had them in PDF form -- then I could sell them to people
over the internet, simply delete them, or archive them off to CD/DVD.

I always prefer PDF books to paper books now-a-days for the very reasons I
listed.

Whatever happened to "innocent until proven guilty"? How sad we've become as
a society.


D.Vin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Stut

Please include the list in replies.

Dare Williams wrote:

Dear Stut,
 
Thanks for your message, With regard to your message, the main reason 
why I want it Electronically is because, Am a PHP Student Who has no 
enough Cash to buy from Amazon or any bookseller and more over, the book 
is not available in my West African Continent.
 
So therefore, If you have any way of assisting me in getting it apart 
from E-Book Format, Please advice..
 
Expecting your response

Regards.
Darren.


Being a poor student is not an excuse to ignore copyright, nor is your 
location. If you cannot get this particular book, for whatever reason, I 
can guarantee it says nothing that isn't available on the web for free, 
you just need to work a bit harder to find it.


Please don't ask this list to break the law for you again, it's just not 
polite.


-Stut

--
http://stut.net/



-

*/Stut <[EMAIL PROTECTED]>/* wrote:

Dare Williams wrote:
 > Dear Pals,
 >
 > Please I need a book called : "Oracle Database 10g Express
Edition PHP Web Programming (Osborne Oracle Press Series): Books: by
Michael McLaughlin".
 >
 > Please if anyone with the E-Book Version of it should be contact
me on my Email
 > ([EMAIL PROTECTED]).
 >
 > NOTE: I would prefer the E-Book Version if it is Available.
 > Thanks.
 > Darren.

AFAIK this title is not available electronically, but it's readily
available from Amazon or any other reputable bookseller.

Is there a particular reason why you want it electronically?

-Stut

-- 
http://stut.net/


-- 
PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php


__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 20:34 +0100, Stut wrote:
> Dare Williams wrote:
> > Dear Pals,
> >
> >   Please I need a book called : "Oracle Database 10g Express Edition PHP 
> > Web Programming (Osborne Oracle Press Series): Books: by Michael 
> > McLaughlin".
> >
> >   Please if anyone with the E-Book Version of it should be contact me on my 
> > Email
> >   ([EMAIL PROTECTED]). 
> >
> >   NOTE: I would prefer the E-Book Version if it is Available.
> >   Thanks.
> >   Darren.
> 
> AFAIK this title is not available electronically, but it's readily 
> available from Amazon or any other reputable bookseller.
> 
> Is there a particular reason why you want it electronically?

Pirate??

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Stut

Dare Williams wrote:

Dear Pals,
   
  Please I need a book called : "Oracle Database 10g Express Edition PHP Web Programming (Osborne Oracle Press Series): Books: by Michael McLaughlin".
   
  Please if anyone with the E-Book Version of it should be contact me on my Email
  ([EMAIL PROTECTED]). 
   
  NOTE: I would prefer the E-Book Version if it is Available.

  Thanks.
  Darren.


AFAIK this title is not available electronically, but it's readily 
available from Amazon or any other reputable bookseller.


Is there a particular reason why you want it electronically?

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Dare Williams
Dear Pals,
   
  Please I need a book called : "Oracle Database 10g Express Edition PHP Web 
Programming (Osborne Oracle Press Series): Books: by Michael McLaughlin".
   
  Please if anyone with the E-Book Version of it should be contact me on my 
Email
  ([EMAIL PROTECTED]). 
   
  NOTE: I would prefer the E-Book Version if it is Available.
  Thanks.
  Darren.

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[PHP] oracle instantclient 10 problem

2007-08-21 Thread Rainhard
Ehlo,

I compiled php-5.2.3 with the
"--with-oci8=instantclient,/opt/instantclient_10_2/" switch and it
completed with no errors.
First it seems to work well, but now, sometimes i get the infamous -
OCIEnvNlsCreate() failed check LD_LIBRARY_PATH - error.
The funny thing is, those variables are all set.
I dont have really a clue why this appears now.

versions in use
apache 2.2.4
php 5.2.3
instantclient 10.2.0.3

These parameters are set before the apache is started
ORACLE_BASE=/opt/instantclient_10_2
ORACLE_HOME=$ORACLE_BASE
NLS_LANG=GERMAN_GERMANY.WE8ISO8859P9
PATH=$PATH:$ORACLE_BASE
LD_LIBRARY_PATH=$ORACLE_BASE
TNS_ADMIN=/etc
ORACLE_SID=SID

Any suggestions would be much appreciated.
TIA
Rainhard

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle XMLTYPE column truncates

2007-03-13 Thread Mikey

Richard Lynch wrote:

DB truncation could be either of the following:

#1.
The column is not large enough to hold that data.
Research LONGTEXT and BLOB

#2.
The query buffer is not large enough to pass the data in.
Re-configure your db/php setup.


It was definitely to do with casting it to a CLOB - it works fine now.




Note that cramming all that XML into the DB seems kinda silly to me,
unless you are using Oracle XML functionality on the data.

We've beaten this horse to death lately, but you should CONSIDER the
option of just storing the XML in a file, and the filename in the DB.

Read the "images in db" thread last week to view the dead horse.


Firstly, I *am* planning to use XMLDB, although that should be a "we" 
are planning to - the timings of the search results have made a 
compelling argument to my department.  And whilst I found the whole 
images in db thread amusing to read, I do not actually see how what we 
are doing is part of that "dead horse".


Oracle seems to be quicker at searching XML than it does a fully 
normalised relational model (once you have the indexing setup 
correctly), the query was a lot easier to write and as we have variable 
metadata schema it suits our business needs very well.  How could this 
be achieved by storing a link to the file?


For what it is worth, however, images belong on a file system - storing 
them in a db is just asking for scalability issues a bit down the road.


Mikey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle XMLTYPE column truncates

2007-03-12 Thread Richard Lynch
DB truncation could be either of the following:

#1.
The column is not large enough to hold that data.
Research LONGTEXT and BLOB

#2.
The query buffer is not large enough to pass the data in.
Re-configure your db/php setup.


Note that cramming all that XML into the DB seems kinda silly to me,
unless you are using Oracle XML functionality on the data.

We've beaten this horse to death lately, but you should CONSIDER the
option of just storing the XML in a file, and the filename in the DB.

Read the "images in db" thread last week to view the dead horse.

On Thu, March 8, 2007 5:47 am, Mikey wrote:
> Hi!
>
> I am running some tests for implementing variable metadata using
> Oracle's XMLTYPE.  Creating the XML and inserting it into the database
> works fine, however when trying to retrieve data it truncates the
> returned results.  The code I am using to fetch the data is as
> follows:
>
> $row_sql = "SELECT xml_metadata FROM mdt1_metadata WHERE key_id =
> :kid";
> $row_sth = oci_parse ($conn, $row_sql); // $conn defined elsewhere
> oci_bind_by_name ($row_sth, ":kid", $row['key_id']);
> if (oci_execute ($row_sth)) {
>   $xml_row = oci_fetch_array ($row_sth, OCI_ASSOC);
>   try {
>   $xml = new SimpleXMLElement ($xml_row['xml_metadata']);
>   }
>   catch (Exception $e) {
>   echo "\n\n{$xml_row['xml_metadata']}\n\n";
>   exit;
>   }
>   // stuff goes in here
> }
>
>
> I was wondering if anyone else on this list has had the same problem,
> or
> knows of a better way of returning long values using OCI?
>
> TIA,
>
> Mikey
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle XMLTYPE column truncates

2007-03-08 Thread Mikey

Hi!

I am running some tests for implementing variable metadata using 
Oracle's XMLTYPE.  Creating the XML and inserting it into the database 
works fine, however when trying to retrieve data it truncates the 
returned results.  The code I am using to fetch the data is as follows:


$row_sql = "SELECT xml_metadata FROM mdt1_metadata WHERE key_id = :kid";
$row_sth = oci_parse ($conn, $row_sql); // $conn defined elsewhere
oci_bind_by_name ($row_sth, ":kid", $row['key_id']);
if (oci_execute ($row_sth)) {
$xml_row = oci_fetch_array ($row_sth, OCI_ASSOC);
try {
$xml = new SimpleXMLElement ($xml_row['xml_metadata']);
}
catch (Exception $e) {
echo "\n\n{$xml_row['xml_metadata']}\n\n";
exit;
}
// stuff goes in here
}


I was wondering if anyone else on this list has had the same problem, or 
knows of a better way of returning long values using OCI?


TIA,

Mikey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Execute Function

2007-01-18 Thread Chris

Brad Bonkoski wrote:

Brad Bonkoski wrote:

Roman Neuhauser wrote:

# [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500:
 

Hello All,

I have this Oracle function, and within my code I call it like this:

$sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, 
null, null); END;";

   $stmt = $db->parse($sql);
   $rc = null;
   ocibindbyname($stmt, ":result", &$rc);
   $db->execute($stmt, $sql);

The problem is that the execute function spits back an error/warning 
message, but the Oracle function properly executes and the data is 
in the Database.



And the warning is...?

  

Nothing of real use from what I can see..
It falls into this statement:
die('Invalid Statement: ' . $stmt .'('.$query.')'. '  ' . 
htmlentities($error['message']));


So, I get this message back (and the error['message'] part is blank.

It gets there from this:
$result = @ociexecute($stmt);
if(!$result) {
   ...
}
so the return from ociexecute appears to be FALSE.


After removing the '@' from the ociexecute ... I get this:
PL/SQL: numeric or value error: character string buffer too small
Does this trigger any ideas?



Sounds like an issue with your function. Does it work ok outside of php?

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Execute Function

2007-01-18 Thread Brad Bonkoski

Brad Bonkoski wrote:

Roman Neuhauser wrote:

# [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500:
 

Hello All,

I have this Oracle function, and within my code I call it like this:

$sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, 
null, null); END;";

   $stmt = $db->parse($sql);
   $rc = null;
   ocibindbyname($stmt, ":result", &$rc);
   $db->execute($stmt, $sql);

The problem is that the execute function spits back an error/warning 
message, but the Oracle function properly executes and the data is 
in the Database.



And the warning is...?

  

Nothing of real use from what I can see..
It falls into this statement:
die('Invalid Statement: ' . $stmt .'('.$query.')'. '  ' . 
htmlentities($error['message']));


So, I get this message back (and the error['message'] part is blank.

It gets there from this:
$result = @ociexecute($stmt);
if(!$result) {
   ...
}
so the return from ociexecute appears to be FALSE.


After removing the '@' from the ociexecute ... I get this:
PL/SQL: numeric or value error: character string buffer too small
Does this trigger any ideas?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Execute Function

2007-01-18 Thread Brad Bonkoski

Roman Neuhauser wrote:

# [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500:
  

Hello All,

I have this Oracle function, and within my code I call it like this:

$sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, null, 
null); END;";

   $stmt = $db->parse($sql);
   $rc = null;
   ocibindbyname($stmt, ":result", &$rc);
   $db->execute($stmt, $sql);

The problem is that the execute function spits back an error/warning 
message, but the Oracle function properly executes and the data is in 
the Database.



And the warning is...?

  

Nothing of real use from what I can see..
It falls into this statement:
die('Invalid Statement: ' . $stmt .'('.$query.')'. '  ' . 
htmlentities($error['message']));


So, I get this message back (and the error['message'] part is blank.

It gets there from this:
$result = @ociexecute($stmt);
if(!$result) {
   ...
}
so the return from ociexecute appears to be FALSE.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Execute Function

2007-01-18 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500:
> Hello All,
> 
> I have this Oracle function, and within my code I call it like this:
> 
> $sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, null, 
> null); END;";
>$stmt = $db->parse($sql);
>$rc = null;
>ocibindbyname($stmt, ":result", &$rc);
>$db->execute($stmt, $sql);
> 
> The problem is that the execute function spits back an error/warning 
> message, but the Oracle function properly executes and the data is in 
> the Database.

And the warning is...?

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle Execute Function

2007-01-18 Thread Brad Bonkoski

Hello All,

I have this Oracle function, and within my code I call it like this:

$sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, null, 
null); END;";

   $stmt = $db->parse($sql);
   $rc = null;
   ocibindbyname($stmt, ":result", &$rc);
   $db->execute($stmt, $sql);

The problem is that the execute function spits back an error/warning 
message, but the Oracle function properly executes and the data is in 
the Database.

The execute function looks like this:
(This function enters the conditional where ii executes the die() function)

public function execute($stmt, $query = "") {
   if( $this->trans)
   $result = @ociexecute($stmt, OCI_DEFAULT);
   else
   $result = @ociexecute($stmt);
   if (!$result ) {
   $error = ocierror($this->link);
   $this->report('Invalid Statement: ' . $stmt 
.'('.$query.')'. '  '

   . htmlentities($error['message']));
   die('Invalid Statement: ' . $stmt 
.'('.$query.')'. '  ' . htmlentities($error['message']));

   }
   return $result;
   }

I use this wrapper class for many things, and the execute function for 
many things, without any problems.

Now, this is an initial run at calling Oracle functions within PHP.
Any words of wisdom as to what could be causing this problem, or any 
other insight?


TIA
-Brad

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Oracle Commits SOLVED

2006-06-22 Thread Jay Blanchard
[snip]
did the execute actually succeed? does the data get into the DB if you
use OCI_COMMIT_ON_SUCCESS instead of OCI_DEFAULT?

I don't support using oci_internal_debug() gives you any extra info?
[/snip]

I finally did an oci_bind_by_name and then performed the commit. It
worked.  Oci_internal_debug gave me nada at that point. The reason for
using OCI_DEFAULT was so that I could perform a kind of bulk update and
check before committing. oci_commit_on_success would have committed each
time the update was performed and it seems that would have cost more
overhead. 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Commits

2006-06-22 Thread Jochem Maas
Jay Blanchard wrote:
> Good afternoon and salutations denizens of the greatest list generated
> by electrons!
> 
> I have a situation where I am trying to commit a transaction in Oracle
> with PHP as follows;
> 
> $udGeocode = oci_parse($conn, "UPDATE CONT_ADDRESS SET GEOCODE =
> '".$geocode[0]."' WHERE CONTRACT_ID = '".$row[0]."' AND POSTAL_CODE =
> '".$ROW[1]."' AND ADDRESS_TYPE = 'S'");
> oci_execute($udGeocode, OCI_DEFAULT);

did the execute actually succeed? does the data get into the DB if you
use OCI_COMMIT_ON_SUCCESS instead of OCI_DEFAULT?

I don't support using oci_internal_debug() gives you any extra info?

>   
> // commit
>   $committed = oci_commit($conn);
> if (!$committed) {
>$error = oci_error($conn);
>echo 'Commit failed. Oracle reports: ' . $error['message'];
> } else {
>echo ' Commit succeeded';
> }
> 
> The commit returns as successful, but it is not successful in the
> database itself. Am I missing something here? I have RTFM on oci_execute
> and oci_commit and cannot find anything.
> 
> Thanks!
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle Commits

2006-06-22 Thread Jay Blanchard
Good afternoon and salutations denizens of the greatest list generated
by electrons!

I have a situation where I am trying to commit a transaction in Oracle
with PHP as follows;

$udGeocode = oci_parse($conn, "UPDATE CONT_ADDRESS SET GEOCODE =
'".$geocode[0]."' WHERE CONTRACT_ID = '".$row[0]."' AND POSTAL_CODE =
'".$ROW[1]."' AND ADDRESS_TYPE = 'S'");
oci_execute($udGeocode, OCI_DEFAULT);

// commit
$committed = oci_commit($conn);
if (!$committed) {
   $error = oci_error($conn);
   echo 'Commit failed. Oracle reports: ' . $error['message'];
} else {
   echo ' Commit succeeded';
}

The commit returns as successful, but it is not successful in the
database itself. Am I missing something here? I have RTFM on oci_execute
and oci_commit and cannot find anything.

Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bug Apache/PHP/Oracle on Debian

2006-04-06 Thread Chris

David BERCOT wrote:

Hi,

I have a server with Apache 2, PHP 5.1.1 and Oracle Instant Client
10.2.0.1.
As I have a little bug [http://bugs.php.net/bug.php?id=29779], I've
tried the solution (in oci8.c) and recompiled ! But then, everything was
broken. So, I get the source of PHP 5.1.2 and recompiled again.
Everything seems ok, with Apache and PHP, but it was impossible to use
oci !!! I thought about an environment problem (LD_LIBRARY_PATH), but
after some manipulations, I can see this variable in phpinfo(), but
nothing about oci8 !!! I've looked into logs but I couldn't find any
problem. It was like Oracle was not installed !!!


You might be better off asking the internals list.

http://www.php.net/mailing-lists.php

They deal with this sort of stuff, we're more for general php help..

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Bug Apache/PHP/Oracle on Debian

2006-04-06 Thread David BERCOT
Hi,

I have a server with Apache 2, PHP 5.1.1 and Oracle Instant Client
10.2.0.1.
As I have a little bug [http://bugs.php.net/bug.php?id=29779], I've
tried the solution (in oci8.c) and recompiled ! But then, everything was
broken. So, I get the source of PHP 5.1.2 and recompiled again.
Everything seems ok, with Apache and PHP, but it was impossible to use
oci !!! I thought about an environment problem (LD_LIBRARY_PATH), but
after some manipulations, I can see this variable in phpinfo(), but
nothing about oci8 !!! I've looked into logs but I couldn't find any
problem. It was like Oracle was not installed !!!

So, I am completly blocked !!!

Do you have any idea ? anu clue ?

Thank you very much.

David.


signature.asc
Description: Ceci est une partie de message	numériquement signée


RE: [PHP] Oracle stored procedures

2006-04-06 Thread Jay Blanchard
[snip]
I am using PHP with Oracle, but not executing stored procedures.
I assume you are already validating the contents of the $addr variable 
before you bind it?
Otherwise, no real ideas here...
[/snip]

Yes, I am validating the contents of the variable. I have ton some
reading, but details are sketchy at best. I strongly suspect that it has
to do with how the TYPE is declared;

p_BILL_TO_ADDRESS1  IN CONT_ADDRESS.ADDRESS1%TYPE  Default NULL,
--VC(50)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle stored procedures

2006-04-06 Thread Brad Bonkoski

I am using PHP with Oracle, but not executing stored procedures.
I assume you are already validating the contents of the $addr variable 
before you bind it?

Otherwise, no real ideas here...
-B

Jay Blanchard wrote:


[snip]
I have a stored procedure in Oracle;

p_BILL_TO_ADDRESS1 IN CONT_ADDRESS.ADDRESS1%TYPE
Default NULL,  --VC(50)

With a condition;
IF p_BILL_TO_ADDRESS1 is NULL THEN
   Raise_Application_Error(-20100,'BILL TO Address cannot be a NULL
Value');
 END IF;


I have some PHP code that tries to insert the data;

$addr = '1234 Main';
$sth = oci_parse($conn, "begin D_ACCT_NEW(:p_BILL_TO_ADDRESS1,
:P_Error_Return );end;");

oci_bind_by_name($sth, ":p_BILL_TO_ADDRESS1", $addr, -1);
oci_bind_by_name($sth, ":P_Error_Return", $errorcode, -1);
oci_execute($sth);

echo $errorcode;

And I always get the following error;

Warning: oci_execute() [function.oci-execute]: ORA-06502: PL/SQL:
numeric or value error ORA-06512: at "SYSADM.D_ACCT_NEW", line 483
ORA-20100: BILL TO Address cannot be a NULL Value ORA-06512: at line 1
in /home/foo/bar/glorp.php on line 25

If anyone on the list understands the intricacies of Oracle, could you
sooth my aching head and help me to understand what is going on here? I
have RTFM and the following article from the PHP Oracle Cookbook;

http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks
_sps.html


;and I still am clueless. Thanks a million in advance!
[/snip]

I hate to bring this up again, but is anyone on the list using PHP with
Oracle?

 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Oracle stored procedures

2006-04-06 Thread Jay Blanchard
[snip]
I have a stored procedure in Oracle;

p_BILL_TO_ADDRESS1 IN CONT_ADDRESS.ADDRESS1%TYPE
Default NULL,  --VC(50)

With a condition;
IF p_BILL_TO_ADDRESS1 is NULL THEN
Raise_Application_Error(-20100,'BILL TO Address cannot be a NULL
Value');
  END IF;


I have some PHP code that tries to insert the data;

$addr = '1234 Main';
$sth = oci_parse($conn, "begin D_ACCT_NEW(:p_BILL_TO_ADDRESS1,
:P_Error_Return );end;");

oci_bind_by_name($sth, ":p_BILL_TO_ADDRESS1", $addr, -1);
oci_bind_by_name($sth, ":P_Error_Return", $errorcode, -1);
oci_execute($sth);

echo $errorcode;

And I always get the following error;

Warning: oci_execute() [function.oci-execute]: ORA-06502: PL/SQL:
numeric or value error ORA-06512: at "SYSADM.D_ACCT_NEW", line 483
ORA-20100: BILL TO Address cannot be a NULL Value ORA-06512: at line 1
in /home/foo/bar/glorp.php on line 25

If anyone on the list understands the intricacies of Oracle, could you
sooth my aching head and help me to understand what is going on here? I
have RTFM and the following article from the PHP Oracle Cookbook;

http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks
_sps.html


;and I still am clueless. Thanks a million in advance!
[/snip]

I hate to bring this up again, but is anyone on the list using PHP with
Oracle?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle stored procedures

2006-04-05 Thread Jay Blanchard
Howdy group...

I have a stored procedure in Oracle;

p_BILL_TO_ADDRESS1 IN CONT_ADDRESS.ADDRESS1%TYPE
Default NULL,  --VC(50)

With a condition;
IF p_BILL_TO_ADDRESS1 is NULL THEN
Raise_Application_Error(-20100,'BILL TO Address cannot be a NULL
Value');
  END IF;


I have some PHP code that tries to insert the data;

$addr = '1234 Main';
$sth = oci_parse($conn, "begin D_ACCT_NEW(:p_BILL_TO_ADDRESS1,
:P_Error_Return );end;");

oci_bind_by_name($sth, ":p_BILL_TO_ADDRESS1", $addr, -1);
oci_bind_by_name($sth, ":P_Error_Return", $errorcode, -1);
oci_execute($sth);

echo $errorcode;

And I always get the following error;

Warning: oci_execute() [function.oci-execute]: ORA-06502: PL/SQL:
numeric or value error ORA-06512: at "SYSADM.D_ACCT_NEW", line 483
ORA-20100: BILL TO Address cannot be a NULL Value ORA-06512: at line 1
in /home/foo/bar/glorp.php on line 25

If anyone on the list understands the intricacies of Oracle, could you
sooth my aching head and help me to understand what is going on here? I
have RTFM and the following article from the PHP Oracle Cookbook;

http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks
_sps.html


;and I still am clueless. Thanks a million in advance!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP/Oracle : bug with accent...

2006-03-15 Thread David BERCOT
> > I have a big problem with my Debian server (Apache 2, PHP 5, Oracle
> > Instant Client). I've modified the environment variable NLS_LANG and,
> > with SQL*Plus, everything is ok ! But, in a PHP page, I can't insert a
> > value with accent (ex: Irène). I can read data with accent, but not
> > inserting !!!
> > I searched all the afternoon, testing many solutions, without success. I
> > think I'm not alone with this problem but...
> > 
> > Do you have any clue ? Something to look at ?
> 
> Try looking at the multi-byte string functions.  Not sure if that would 
> help you or not though.

OK. I've finally found the solution. Everything was ok except the Apache
environment variables (NLS_LANG). Now, it works...

Thank you.

David.


signature.asc
Description: Ceci est une partie de message	numériquement signée


Re: [PHP] PHP/Oracle : bug with accent...

2006-03-15 Thread Burhan

David BERCOT wrote:

Hi,

I have a big problem with my Debian server (Apache 2, PHP 5, Oracle
Instant Client). I've modified the environment variable NLS_LANG and,
with SQL*Plus, everything is ok ! But, in a PHP page, I can't insert a
value with accent (ex: Irène). I can read data with accent, but not
inserting !!!
I searched all the afternoon, testing many solutions, without success. I
think I'm not alone with this problem but...

Do you have any clue ? Something to look at ?


Try looking at the multi-byte string functions.  Not sure if that would 
help you or not though.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP/Oracle : bug with accent...

2006-03-14 Thread David BERCOT
Hi,

I have a big problem with my Debian server (Apache 2, PHP 5, Oracle
Instant Client). I've modified the environment variable NLS_LANG and,
with SQL*Plus, everything is ok ! But, in a PHP page, I can't insert a
value with accent (ex: Irène). I can read data with accent, but not
inserting !!!
I searched all the afternoon, testing many solutions, without success. I
think I'm not alone with this problem but...

Do you have any clue ? Something to look at ?

Thank you very much.

David.


signature.asc
Description: Ceci est une partie de message	numériquement signée


Re: [PHP] Oracle buying out Zend ... how does that affect PHP?

2006-02-11 Thread Kevin Kinsey

Marc G. Fournier wrote:



http://www.businessweek.com/technology/content/feb2006/tc20060209_810527.htm 



"Also in Oracle's crosshairs: closely held Zend, based in Cupertino, 
Calif.

Zend's PHP software language is one of the most prevalent on the Web,
present in more than 18 million Web sites. The company, which snared
headlines last year when Netscape co-founder Marc Andreessen joined
its board, has been trying to extend its success with the Web into
business applications. Zend could sell for $200 million, according to one
source."



Marc G. Fournier   Hub.Org Networking Services 
(http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 
7615664




Well, we'd run the risk of  a good support company and
optimizer.

But the language above is misleading: PHP isn't owned, per se,
by Zend, although Zend is owned or at least was founded by some
pretty big guns on the PHP Devel Team.  So the effects might not
be much beyond what I mention above.

It's kind of interesting to speculate, though; and it's good news for
the Zend guys --- nice (for them anyway) when you start "looking
that juicy to the big players", as a friend of mine says.

Makes you wonder if this really isn't a jab against the other DB
companies/orgs --- I could foresee Zend pushing some PHP/Oracle
interface/optimization products within a year or so if this happens

Kevin Kinsey

--
Reality -- what a concept!
-- Robin Williams

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle buying out Zend ... how does that affect PHP?

2006-02-10 Thread Marc G. Fournier


http://www.businessweek.com/technology/content/feb2006/tc20060209_810527.htm

"Also in Oracle's crosshairs: closely held Zend, based in Cupertino, 
Calif. Zend's PHP software language is one of the most prevalent on the 
Web, present in more than 18 million Web sites. The company, which snared 
headlines last year when Netscape co-founder Marc Andreessen joined its 
board, has been trying to extend its success with the Web into business 
applications. Zend could sell for $200 million, according to one source."




Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Question

2005-08-11 Thread Joseph Oaks
xfedex, yes you can connect to a remote Oracle DB, I'm doing for an app
I'm trying to write. You have to configure php with the oracle version
you have, more than likely with the --with-oci8=/u1/oracle/product/10g
line, of course your oracle location will differ.

I chose to use the PEAR::DB to do my oracle stuff instead of the oci calls.
This made it simple, and easy to read for me as I'm still learning.
The code looks cleaner also.



xfedex ([EMAIL PROTECTED]) wrote:
>
> Hi,
>
> Can PHP connect to a remote Oracle db?
> Because all oracle connecting functions only require 'user' and 'pass'
>
> http://us3.php.net/manual/en/function.oci-connect.php
> http://us3.php.net/manual/en/function.ora-plogon.php
>
> Thanks,
> Regards,
> pancarne.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
"Computers are like air conditioners - they stop working properly when you
open Windows"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Question

2005-08-11 Thread tg-php
Yeah, you can connect to Oracle remotely.  The standard PHP functions should do 
it probably, but I've done it using ADODB.

I don't know if this is the same on a *nix box, but I was running PHP on a 
Windows box and needed special Oracle stuff installed on my machine to connect 
to the Oracle DB.   There's a file..something like "tsnames.ora" that has the 
database information.  Sort of like their version of ODBC.  You give it an 
aliased name, then give it all the server info, then when you connect to 
Oracle, you give it the name that's entered into "tsnames.ora" (or whatever the 
file is) and the username/password combo.

Maybe that'll give you a nudge in the right direction.

Good luck!  Let us know what you find!

-TG

= = = Original message = = =

Hi,

Can PHP connect to a remote Oracle db?
Because all oracle connecting functions only require 'user' and 'pass'

http://us3.php.net/manual/en/function.oci-connect.php
http://us3.php.net/manual/en/function.ora-plogon.php

Thanks,
Regards,
pancarne.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle Question

2005-08-11 Thread xfedex
Hi,

Can PHP connect to a remote Oracle db?
Because all oracle connecting functions only require 'user' and 'pass'

http://us3.php.net/manual/en/function.oci-connect.php
http://us3.php.net/manual/en/function.ora-plogon.php

Thanks,
Regards,
pancarne.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Oracle Interface

2005-07-12 Thread Ford, Mike
Hi guys!!  I'm just getting back into harness after 4 months off work
following major surgery, so I'm well behind on all the PHP groups.  It's
nice to be back!

Forgive me for responding to this one over a month later, but I haven't seen
anybody else pointing this out:


On 13 June 2005 13:30, Shane Presley wrote:

> On 6/10/05, Richard Lynch <[EMAIL PROTECTED]> wrote:
> > On Fri, June 10, 2005 8:48 am, Shane Presley said:
> > > Where can I find some info on integrating Oracle and PHP?
> > 
> > http://php.net/oracle
> > 
> > pretty much covers it.

Actually, no it doesn't.  If you're using Oracle 8i or later, you should be
using the OCI extension (http://php.net/oci8).  The Oracle extension uses an
older protocol for versions up to Oracle 7, and is now pretty much obsolete
-- whilst it will work, more or less, with later versions, it's less
efficient and doesn't support many of the features that OCI does.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP+Oracle or PL/SQL Web Application - which one is efficient?

2005-07-04 Thread Richard Lynch
On Mon, July 4, 2005 6:36 am, Rasim SEN said:
> I need an advice about  PHP+Oracle or PL/SQL Web Application.
>
> We are using at the moment  PL/SQL Web Application for our all pages. But
> some of my friends says that php+oracle more effiecient than pl/sql.
>
> Does anybody have exprience or statistical data about this. Or how can we
> compare them?

You should probably Google for "benchmark Oracle PL/SQL" and see what
turns up.

Odds are really good somebody has made a comparison before...

Of course, you have to be REALLY careful that the comparison was made by a
relatively unbiased entity, that they are using the same versions of the
software as you, that they used similar hardware, that their needs/usage
are similar, that...

Hmmm.  Maybe you'd be better off just testing it for yourself. :-^

I have no doubt that some benchmark can "prove" Oracle is faster/slower
than PL/SQL. I also have no doubt that *SOME* benchmark can "prove" MS
Access is faster than Oracle. :-v

So unless Google turns up a BUNCH of benchmarks and they ALL say X is
better, you're gonna need to test for yourself.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP+Oracle or PL/SQL Web Application - which one is efficient?

2005-07-04 Thread Rasim SEN
Hi friends, 

I need an advice about  PHP+Oracle or PL/SQL Web Application. 

We are using at the moment  PL/SQL Web Application for our all pages. But some 
of my friends says that php+oracle more effiecient than pl/sql.

Does anybody have exprience or statistical data about this. Or how can we 
compare them? 

Thanks alot.


Rasim ŞEN
[EMAIL PROTECTED]

http://www.sahibinden.com 

Re: [PHP] Oracle Interface

2005-06-13 Thread Shane Presley
On 6/13/05, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> To find out how your PHP was compiled create a test page with this
> only...
> 
>  
> phpinfo();
> 
> ?>
> 
> And then load the page from your web server. It will return a wealth of
> information to you. As far as Oracle compatability it would be hard to
> know with the info you provided, but you'll find out things like PHP
> version when you do the test page.
> 

Thanks!  So it looks like PHP wasn't compiled with the needed variable.

PHP Version 4.3.2

'./configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux'
'--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr'
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin'
'--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect'
'--disable-debug' '--enable-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-db4=/usr'
'--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd'
'--enable-gd-native-ttf' '--with-ttf' '--with-gettext'
'--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-pspell' '--with-regex=system'
'--with-xml' '--with-expat-dir=/usr' '--with-pcre-regex=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-discard-path' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--enable-mbstring'
'--enable-mbstr-enc-trans' '--enable-mbregex'
'--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl'
'--with-kerberos=/usr/kerberos' '--with-ldap=shared'
'--with-mysql=shared,/usr' '--with-pgsql=shared'
'--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath'
'--enable-shmop' '--enable-versioning' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--enable-mcal'
'--with-apxs2filter=/usr/sbin/apxs'

However, there is a section about dbx...

dbx support enabled
dbx version 1.0.0
supported databases MySQL ODBC PostgreSQL Microsoft SQL Server
FrontBase Oracle 8 (oci8) Sybase-CT

Not sure what that is?

Shane

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Oracle Interface

2005-06-13 Thread Jay Blanchard
[snip]
How do I find out how my PHP was compiled? The documentation states:
  You have to compile PHP with the option --with-oracle[=DIR], where
DIR defaults to your environment variable ORACLE_HOME.

But I'm using PHP from the Red Hat default install (I didn't compile
it).

Also, do you know if this is Oracle version independent.  More
specifically will this work with Oracle 10g?
[/snip]

To find out how your PHP was compiled create a test page with this
only...



And then load the page from your web server. It will return a wealth of
information to you. As far as Oracle compatability it would be hard to
know with the info you provided, but you'll find out things like PHP
version when you do the test page.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Interface

2005-06-13 Thread Shane Presley
On 6/10/05, Richard Lynch <[EMAIL PROTECTED]> wrote:
> On Fri, June 10, 2005 8:48 am, Shane Presley said:
> > Where can I find some info on integrating Oracle and PHP?
> 
> http://php.net/oracle
> 
> pretty much covers it.

Thanks!  You're right, that looks pretty straight forward.  Although I
do have two additional questions...

How do I find out how my PHP was compiled? The documentation states:
  You have to compile PHP with the option --with-oracle[=DIR], where
DIR defaults to your environment variable ORACLE_HOME.

But I'm using PHP from the Red Hat default install (I didn't compile it).

Also, do you know if this is Oracle version independent.  More
specifically will this work with Oracle 10g?

Thanks
Shane

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Interface

2005-06-10 Thread Richard Lynch
On Fri, June 10, 2005 8:48 am, Shane Presley said:
> Where can I find some info on integrating Oracle and PHP?

http://php.net/oracle

pretty much covers it.

> I had some PHP front ends to a MySQL database, worked great.  Our DBAs
> want to change the back end from MySQL to Oracle 10g.  How hard would
> it be to convert my PHP scripts, and where would I go to read up on
> Oracle <--> PHP?

It's mostly a global search and replace to change out your mysql_query()
to, err, oracle_exec() or whatever it is...

Unless you used MySQL-specific SQL syntax and features.

Your biggest hurdle will probably be getting a database connection :-)

Do that first, in a simple example script, comletely outside the scope of
your project.  The hair you save, may be your own.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle Interface

2005-06-10 Thread Webmaster

Shane Presley wrote:


Where can I find some info on integrating Oracle and PHP?

I had some PHP front ends to a MySQL database, worked great.  Our DBAs
want to change the back end from MySQL to Oracle 10g.  How hard would
it be to convert my PHP scripts, and where would I go to read up on
Oracle <--> PHP?

Thanks
Shane
 



Hello,

I use Oracle and PHP everyday.  For the interaction, I use a PEAR 
package called DB.  In the future if I want to convert to another 
database, I should be able to change just one or two lines of code 
because PEAR does the rest...


http://pear.php.net/package/DB

The actual documentation that will interest you most...
http://pear.php.net/manual/en/package.database.db.php

Let me know if you need help with specific actions or statements.

Thanks,
Roger

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Oracle Interface

2005-06-10 Thread Jay Blanchard
[snip]
Where can I find some info on integrating Oracle and PHP?

I had some PHP front ends to a MySQL database, worked great.  Our DBAs
want to change the back end from MySQL to Oracle 10g.  How hard would
it be to convert my PHP scripts, and where would I go to read up on
Oracle <--> PHP?
[/snip]

http://www.php.net/oracle

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle Interface

2005-06-10 Thread Shane Presley
Where can I find some info on integrating Oracle and PHP?

I had some PHP front ends to a MySQL database, worked great.  Our DBAs
want to change the back end from MySQL to Oracle 10g.  How hard would
it be to convert my PHP scripts, and where would I go to read up on
Oracle <--> PHP?

Thanks
Shane

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle rpm?

2005-03-28 Thread D A GERM
Is there an rpm to install the oracle compnents for version 4.3.4 php?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP+Oracle+Apache

2004-11-14 Thread Evgeniy Sudyr
Good day,

I use Apache2+PHP5+Oracle8 under WindowsXP & I want use php with
Oracle. I uncommented strings in php.ini:

;extension=php_oci8.dll
;extension=php_oracle.dll
;extension=php_dbase.dll

Now when I start apache it say me that this extensions are not present
in extensions dir (But they are exactly here!)

Can anybody help me?
--- 
Best regards,
 Evgeniy Sudyr

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle Connection

2004-10-18 Thread Syed
Hi All,
(B
(Bwill anybody tell me how to connect oracle database using php script.
(B
(BThanx
(B
(BSyed

[PHP] Oracle statement handles... or resources in general

2004-09-23 Thread Mikey
Hi NG!

Consider the following piece of (simplified) code:

$sql = "SELECT * FROM table";
$sth = ociparse ($conn, $sql);
ociexecute ($sth);
$sql = "SELECT * FROM table2";
$sth = ociparse ($conn, $sql);
ociexecute ($sth);

I have just been reading an article on php|arch that states that each open
statement handle in Oracle represents a cursor, and given that I am using
persistent connections will hold resources until the Apache child thread
terminates.  Now, my question is whether, by using the same variable for the
statement handle, the previous resources are deallocated, or whether I am
just piling up loads of cursors on the database?

Mikey
---
Developer - Radius Design Ltd.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Oracle 8 functions

2004-05-05 Thread Fidencio Monroy
Thanks, i catch the prob, after ociparse(), using ocifetchinto, the indexes
in the array are generated as UPPERCASE...

-Original Message-
From: Fidencio Monroy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 05, 2004 2:08 PM
To: (PHP General List)
Subject: [PHP] Oracle 8 functions

Hi, im trying to use ora8 functions, and i have some trouble, the
documentation is a reference not a guide, so probably im skipping some
steps.
 
to connect ocilogon() is used, and the connection establishes, this is
verified checking the resurce returned.
 
then i do an ociparse() with a select statement; but every kind of statement
i send it returns different of false, including on purpose error to check
it.
 
do i need to do something before the call to ociparse()?
 
this is an ora 8.1.7.4.1 database, php 4.3.6RC1 as a CGI on apache 1.3.
 
Thanks in advance.
 
 
Fidencio Monroy.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle 8 functions

2004-05-05 Thread Fidencio Monroy
Hi, im trying to use ora8 functions, and i have some trouble, the
documentation is a reference not a guide, so probably im skipping some
steps.
 
to connect ocilogon() is used, and the connection establishes, this is
verified checking the resurce returned.
 
then i do an ociparse() with a select statement; but every kind of statement
i send it returns different of false, including on purpose error to check
it.
 
do i need to do something before the call to ociparse()?
 
this is an ora 8.1.7.4.1 database, php 4.3.6RC1 as a CGI on apache 1.3.
 
Thanks in advance.
 
 
Fidencio Monroy.


[PHP] Oracle 8i -- execution stops

2004-03-23 Thread Matthew Hillebrand
When I make a complex query to a table with 500,000 rows via PHP, my web 
browser thinks for a minute and then stops the execution of the script with 
no error messages at all.

I have set the max_execution_time to 400 and called error_reporting(E_ALL) 
with the same results. I'm using PHP 4.3.1 and Oracle 8i with Solaris 5.8.

I'm using the ORA functions because my sysadmin has not enabled the OCI 
functions. Oh, I'm also calling ora_commiton($conn) at the start of every 
script.

What's really strange is that I can often hit Refresh after a halt like 
this, and the script will then work perfectly. I don't understand why that 
is because I examine the $_REQUEST and $_SESSION variables each time, and 
nothing is changing.

Any advice would be greatly appreciated. I normaly use MySQL or SQL Server, 
so I'm assuming my Oracle ignorance is to blame.

Thanks!
Matt
_
Check out MSN PC Safety & Security to help ensure your PC is protected and 
safe. http://specials.msn.com/msn/security.asp

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP + Oracle and UK locale

2004-02-16 Thread Harry Sufehmi
(Redirected by "Harry Sufehmi" <[EMAIL PROTECTED]>)

First sorry if this email was already received by you, I sent this originally on the 
weekend but didn't seem to be showing up in the list, so trying to repost again today.

I've setup phpBB in my company using Oracle as its backend. Everyone's happy with it, 
but there's one small annoyance - the pound sign (british currency symbol) kept on 
getting stored as hash sign (#).

Anyone encountered this problem before?

I've tried a lot of things - searching on web and newsgroups (not easy when everyone 
else referred to pound sign and it turned out to be the hash sign..!), installed the 
latest version of PHP, setting up the proper environment variable (especially 
NLS_LANG="ENGLISH.UNITED KINGDOM.UTF8") in .profile & httpd.conf & using putenv() in 
the script itself, and so on - still no joy.

The database itself uses UTF8 charset and AMERICA.AMERICAN locale.

If I use sqlplus, it's correctly entered as the pound sign. But using a PHP test 
script, it was still fine just before it's submitted to Oracle, INSERT it, then it's 
suddenly turned into hash.

Please feel free to enlighten me on this matter.


Thanks!
Harry

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DB] Re: [PHP] Oracle + PHP

2004-02-04 Thread Luis Moran Ochoa
IT WORKS.

Exactly, I need to unset the locale variables With that It works 
without problems.

Thank you all.

in the start script to see which variables are set. Boot, move
/tmp/apache-start to /tmp/apache-boot, stop apache, start apache from
your root shell. "diff -u /tmp/apache-boot /tmp/apache-start" will show
the differences.
Or try to unset the locale variables in the start script:

unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL

Some parts of Apache/Oracle/whatever-else apparently has trouble with
locales.
Regards...
Michael
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: [PHP-DB] Re: [PHP] Oracle + PHP

2004-02-02 Thread Luis Moran Ochoa
Ok, thanks

I will try it.

Michael Mauch wrote:

Luis Moran Ochoa wrote:

 

ORACLE_SID=OWEB ;export ORACLE_SID; 
ORACLE_HOME=/usr/oracle/product;   export ORACLE_HOME;
TNS_ADMIN=/usr/oracle/product/network/admin; export TNS_ADMIN;
ORACLE_BASE=/usr/oracle; export ORACLE_BASE;
ORA_NLS33=/usr/oracle/product/ocommon/nls/admin/data; export ORA_NLS33;
ORA_NLS=/usr/oracle/product/ocommon/nls/admin/data; export ORA_NLS;
NLS_LANG=spanish_spain.we8dec; export NLS_LANG;
TNS_ADMIN=/usr/oracle/product/network/admin; export TNS_ADMIN;
CLASSPATH=:/usr/local/jre:/usr/oracle/product/jdbc/lib/classes111.zip: 
export CLASSPATH;
LD_LIBRARY_PATH=/usr/oracle/product/lib:/usr/oracle/product/jdbc/lib:
export LD_LIBRARY_PATH
   

Perhaps some variables are set in the start script, but not in your root
shell. Put a
 export >/tmp/apache-start

in the start script to see which variables are set. Boot, move
/tmp/apache-start to /tmp/apache-boot, stop apache, start apache from
your root shell. "diff -u /tmp/apache-boot /tmp/apache-start" will show
the differences.
Or try to unset the locale variables in the start script:

unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL

Some parts of Apache/Oracle/whatever-else apparently has trouble with
locales.
Regards...
Michael
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Oracle + PHP

2004-01-30 Thread Michael Mauch
Luis Moran Ochoa wrote:

> ORACLE_SID=OWEB ;export ORACLE_SID; 
> ORACLE_HOME=/usr/oracle/product;   export ORACLE_HOME;
> TNS_ADMIN=/usr/oracle/product/network/admin; export TNS_ADMIN;
> ORACLE_BASE=/usr/oracle; export ORACLE_BASE;
> ORA_NLS33=/usr/oracle/product/ocommon/nls/admin/data; export ORA_NLS33;
> ORA_NLS=/usr/oracle/product/ocommon/nls/admin/data; export ORA_NLS;
> NLS_LANG=spanish_spain.we8dec; export NLS_LANG;
> TNS_ADMIN=/usr/oracle/product/network/admin; export TNS_ADMIN;
> CLASSPATH=:/usr/local/jre:/usr/oracle/product/jdbc/lib/classes111.zip: 
> export CLASSPATH;
> LD_LIBRARY_PATH=/usr/oracle/product/lib:/usr/oracle/product/jdbc/lib:
> export LD_LIBRARY_PATH

Perhaps some variables are set in the start script, but not in your root
shell. Put a

  export >/tmp/apache-start

in the start script to see which variables are set. Boot, move
/tmp/apache-start to /tmp/apache-boot, stop apache, start apache from
your root shell. "diff -u /tmp/apache-boot /tmp/apache-start" will show
the differences.

Or try to unset the locale variables in the start script:

unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER 
LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL

Some parts of Apache/Oracle/whatever-else apparently has trouble with
locales.

Regards...
Michael

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle + PHP

2004-01-29 Thread Luis Moran Ochoa
These are the exact details...

/usr/oracle permissions 750 owner oracle.oinstall
apache belongs to oinstall.
script permissions in /etc/init.d/apache --> 755

ORACLE_SID=OWEB ;export ORACLE_SID; 
ORACLE_HOME=/usr/oracle/product;   export ORACLE_HOME;
TNS_ADMIN=/usr/oracle/product/network/admin; export TNS_ADMIN;
ORACLE_BASE=/usr/oracle; export ORACLE_BASE;
ORA_NLS33=/usr/oracle/product/ocommon/nls/admin/data; export ORA_NLS33;
ORA_NLS=/usr/oracle/product/ocommon/nls/admin/data; export ORA_NLS;
NLS_LANG=spanish_spain.we8dec; export NLS_LANG;
TNS_ADMIN=/usr/oracle/product/network/admin; export TNS_ADMIN;
CLASSPATH=:/usr/local/jre:/usr/oracle/product/jdbc/lib/classes111.zip: 
export CLASSPATH;
LD_LIBRARY_PATH=/usr/oracle/product/lib:/usr/oracle/product/jdbc/lib:
export LD_LIBRARY_PATH

case "$1" in
  start)  
   /opt/apache/bin/apachectl startssl 
   ;;
  stop)
   /opt/apache/bin/apachectl stop   ;;
esac






But the problem is the next:

When I login as root (on a console or an xterm) and run that script 
(/etc/init.d/apache start) everything works
fine.

So I've created a link from /etc/rc5.d/S99apache to /etc/init.d/apache 
for starting it during boot process..

But when I  reboot the system and apache is started on boot (oracle is 
launche thru S20oracle), it start. If you request a php page or other
kind of webpage it works fine, until you request a php page that 
connects to oracle Then the instance that is serving that request 
dies,
raise an error that says something like "Couldn't connect to database" 
and no more php+oracle pages can be requested... But php and apache
still works.

If I stop apache and launch it again from console using 
/etc/init.d/apache start It works again and works fine, all 
connections are successfull.

User apache belongs to oinstall group and have read and execution 
access to all the oracle directories.

Where can be the problem Why it works if I launch it from a 
console or xterm and not if the system starts it???

Thank you

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Oracle + PHP

2004-01-29 Thread Luis Moran Ochoa
Hello

I have Oracle 9 + RedHat 7 + PHP 4.3.4 + Apache 1.3.29.

I've compiled apache and php I've compiled PHP using the 
documentation and activating OCI.

I've build the typical  script for starting apache, it's like this:

$ORACLE_HOME=blablahblah...
 more oracle variables 
case "$1" in
start)
   /opt/apache/bin/apachectl startssl
  ;;
stop)
/opt/apache/bin/apachectl stop
  ;;
esac
But the problem is the next:

When I login as root (on a console or an xterm) and run that script 
(/etc/init.d/apache start) everything works
fine.

So I've created a link from /etc/rc5.d/S99apache to /etc/init.d/apache 
for starting it during boot process..

But when I  reboot the system and apache is started on boot (oracle is 
launche thru S20oracle), it start. If you request a php page or other
kind of webpage it works fine, until you request a php page that 
connects to oracle Then the instance that is serving that request dies,
raise an error that says something like "Couldn't connect to database" 
and no more php+oracle pages can be requested... But php and apache
still works.

If I stop apache and launch it again from console using 
/etc/init.d/apache start It works again and works fine, all 
connections are successfull.

User apache belongs to oinstall group and have read and execution access 
to all the oracle directories.

Where can be the problem Why it works if I launch it from a console 
or xterm and not if the system starts it???

Thank you

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP - Oracle - BLOBs - Display BLOB data in a table

2003-12-03 Thread Justin Patrin
Actually, I would suggest using two scripts. The first takes the id of 
the row as a GET parameter (say $id) and grabs the image data, sends the 
header, and echoes the data. The second script outputs a web page with 
an img tag. As such:

image.php

page.php


Image.jpg



Chris W. Parker wrote:

Ahbaid Gaffoor 
on Wednesday, December 03, 2003 2:46 PM said:

I have written the first half of my application which stores images in
BLOB fields of an oracle database.
This part of my app. works fine.

I am now trying to download the database stored blob and display it in
my web page.


You might have to write that data to a temporary file and then load that
file in your page. Reason being, in the code sample you gave you are
specifying a header which can't be done halfway down the page unless you
want to get an error. And I think especially you can't change the
Content-type of a page halfway through it and then change it back.
Those are just my thoughts on the subject.

HTH,
Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP - Oracle - BLOBs - Display BLOB data in a table

2003-12-03 Thread Chris
You would need to have two separate pages, theimage.php and
displayimage.php.

theimage.php will just return the image data in a readable format the
browser knows is an image.:



displayimage.php will be a normal php page with an image tag like this:



Chris
-Original Message-
From: Ahbaid Gaffoor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 2:46 PM
To: PHP General Mailing List
Subject: [PHP] PHP - Oracle - BLOBs - Display BLOB data in a table


I have written the first half of my application which stores images in
BLOB fields of an oracle database.

This part of my app. works fine.

I am now trying to download the database stored blob and display it in
my web page.


I am able to get the blob data into a variable called $blobdata.

If I just throw up a fresh page and issue the following code, the image
displays fine:



Assume that I have a function which when given an image id it returns
the blob data as follows:

$blobdata = get_image_data(2); // Get the blob data for image as stored
in the database with id = 2

However, I would like to be able to place the blobdata say in a  table
cell as follows:


 


only problem is that I am getting gobbledygook charcaters in the cell as
the raw data is being printed, what sort of HTML or PHP functions
should I use to do this?

many thanks,

Ahbaid.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP - Oracle - BLOBs - Display BLOB data in a table

2003-12-03 Thread Chris W. Parker
Ahbaid Gaffoor 
on Wednesday, December 03, 2003 2:46 PM said:

> I have written the first half of my application which stores images in
> BLOB fields of an oracle database.
> 
> This part of my app. works fine.
> 
> I am now trying to download the database stored blob and display it in
> my web page.

You might have to write that data to a temporary file and then load that
file in your page. Reason being, in the code sample you gave you are
specifying a header which can't be done halfway down the page unless you
want to get an error. And I think especially you can't change the
Content-type of a page halfway through it and then change it back.

Those are just my thoughts on the subject.


HTH,
Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP - Oracle - BLOBs - Display BLOB data in a table

2003-12-03 Thread Ahbaid Gaffoor
I have written the first half of my application which stores images in 
BLOB fields of an oracle database.

This part of my app. works fine.

I am now trying to download the database stored blob and display it in 
my web page.

I am able to get the blob data into a variable called $blobdata.

If I just throw up a fresh page and issue the following code, the image 
displays fine:


Assume that I have a function which when given an image id it returns 
the blob data as follows:

$blobdata = get_image_data(2); // Get the blob data for image as stored 
in the database with id = 2

However, I would like to be able to place the blobdata say in a  table 
cell as follows:




only problem is that I am getting gobbledygook charcaters in the cell as 
the raw data is being printed, what sort of HTML or PHP functions
should I use to do this?

many thanks,

Ahbaid.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Oracle 9iAS - Add PHP module

2003-11-15 Thread Ahbaid Gaffoor
I'm running Oracle 9iAS on Linux,

does anyone know if it's possible to add PHP to it as a module?

Given that it's based on Apache?

are there any docs out there on how to do this?

thanks

Ahbaid

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Oracle - Win32

2003-10-12 Thread Paul Gregg
In mail.php.general, imran <[EMAIL PROTECTED]> wrote:
[snip]
> format like such: php_xxx. For Oracle DD, you'll need php_oracle.dll.  Take
> the oracle dll.

Only use the oracle dll if you are using oracle 7 client libs.  If you are
using Oracle 8+ then you want the oci8 dll.  Do not copy the php_oracle.dll
and do not enable that extension in php.ini

> THAT's it!
> Save the php.ini.
> 
> Now you can call Oracle functions

You also have to ensure that you have installed the Oracle Client Library
software. All php does is to convert the oracle calls to oracle's api and
gets the Oracle client lib to do the work.  Without this, you won't get too
far.  You can download the oracle client libs at otn.oracle.com (create a
free account).

Hope this helps.

Paul.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle - Win32

2003-10-10 Thread imran
-Edit the php.ini file

GET THE DLLs:

The Dlls for mssql and others (oracle, sybase, etc.) are NOT included in the
installation (Install Shield Wizard) in the root folder.

Get the other package for windows systems (NO Install shield!).  Just plain
files.  After unzipping the file, look for the subdirectory called
extensions.  NOT the dlls folder! You'll find a bunch of dlls with the name
format like such: php_xxx. For Oracle DD, you'll need php_oracle.dll.  Take
the oracle dll.

PLACE THE DLL(s):
Place the dll you want in the root folder where you installed php locally.

EDITING THE PHP.INI:
Your php.ini SHOULD be in the Windows System Root (commonly C:\WINNT).
Ok, in the php.ini file, look for the Paths and Directories section.
Your extension_dir path should look like a DOS path like this:
extension_dir = C:/php/   ; Point the directory where you installed php
; inside the root should be the dll you placed!
If the default value of extension_dir is = ./ REMOVE IT!  This path should
be identical to a DOS path!
Ok, this is just a side note:

If you find a comment section for Windows Extensions inside another section
called Dynamic Extensions that has a bunch of lines like this:
;extension=php_xxx1.dll
;extension=php_xxx2.dll

un-comment this line for oracle dll...

THAT's it!
Save the php.ini.

Now you can call Oracle functions

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 11, 2003 10:29 AM
Subject: [PHP] Oracle - Win32


>
> > > Hello mailing list, I want to use Oracle function in PHP parser in
Win32
> > OS,
> > > but I don't know how to install it, in the official documentation tell
> > this:
> > >
> > > Installation
> > > You have to compile PHP with the option --with-oracle[=DIR], where DIR
> > > defaults to your environmment variable ORACLE_HOME.
> > >
> > >
> > >
> > > I think that this steps is by Linux user, any help, I will appreciate,
> > > thanks.
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle - Win32

2003-10-10 Thread John Nichel
[EMAIL PROTECTED] wrote:
Hello mailing list, I want to use Oracle function in PHP parser in Win32
OS,

but I don't know how to install it, in the official documentation tell
this:

Installation
You have to compile PHP with the option --with-oracle[=DIR], where DIR
defaults to your environmment variable ORACLE_HOME.


I think that this steps is by Linux user, any help, I will appreciate,
thanks.


http://www.php.net/manual/en/install.windows.php

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Oracle - Win32

2003-10-10 Thread orlandopozo

> > Hello mailing list, I want to use Oracle function in PHP parser in Win32
> OS,
> > but I don't know how to install it, in the official documentation tell
> this:
> >
> > Installation
> > You have to compile PHP with the option --with-oracle[=DIR], where DIR
> > defaults to your environmment variable ORACLE_HOME.
> >
> >
> >
> > I think that this steps is by Linux user, any help, I will appreciate,
> > thanks.
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle - Win32

2003-10-10 Thread orlandopozo

> Hello mailing list, I want to use Oracle function in PHP parser in Win32
OS,
> but I don't know how to install it, in the official documentation tell
this:
>
> Installation
> You have to compile PHP with the option --with-oracle[=DIR], where DIR
> defaults to your environmment variable ORACLE_HOME.
>
>
>
> I think that this steps is by Linux user, any help, I will appreciate,
> thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle - Win32

2003-10-10 Thread orlandopozo

Hello mailing list, I want to use Oracle function in PHP parser in Win32 OS,
but I don't know how to install it, in the official documentation tell this:

Installation
You have to compile PHP with the option --with-oracle[=DIR], where DIR
defaults to your environmment variable ORACLE_HOME.



I think that this steps is by Linux user, any help, I will appreciate,
thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle 8i - PEAR - Problem

2003-10-01 Thread orlandopozo
Hello, I have been trouble about to connect Oracle 8i through PEAR db class, I think 
it is the connection argument, any suggestion could help me, thanks in advanced, here 
you are the code:

Test DB Class - PEAR


IdName
getMessage());
  }
  //issue the query
  $sql ="SELECT *
 FROM test ORDER BY id ASC";
  $q =$db->query($sql);
  if (DB::iserror($q)) {
die($q->getMessage());
  }
  //generate table
  while ($q->fetchInto($row)) {
?>








[PHP] Oracle 8i problem connection with pear

2003-09-15 Thread ORLANDO POZO
  Hello, mailing-list people, I need help about connect 
the RDBMS Oracle8i through PEAR library, look this code

Test DB Class - PEAR


NAMEPHONEADDRESS

  //connect
  require_once('DB.php');
  $db 
=DB::connect("oci8://system:[EMAIL PROTECTED]/orcl");
  // message
  if (DB::iserror($db)) {
die($db->getMessage());
  }
  //issue the query
  $sql ="SELECT *
 FROM S_CUSTOMER";
  $q =$db->query($sql);
  // message
  if (DB::iserror($q)) {
die($q->getMessage());
  }
  //generate table
  while ($q->fetchInto($row)) {
  ?>
  




  }
  ?>
  
  

  When I execute this code, I receive this output:

  DB Error: extension not found
  NAME PHONE ADDRESS
  I think that is a problem with the DSN in the 
connection (oci8://system:[EMAIL PROTECTED]/orcl)

  I put oci8 for the db type, user: system, pass: 
manager, 
and db: orcl
I could connect oracle8i with PHP, but using ODBC methods, 
I want now connect oracle8i through the PEAR library.

  If someone know, please give me a hand, thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP / Oracle support (8/9) under Redhat 9

2003-08-04 Thread Robert Mena
Thanks for the reply.

I already use 4.3.1 in my current server.

I always compile my version of php since the ones that
come with the distro are always too old and usually
does not contain support for need features such as
mcrpyt or oracle.

- rt


--- Justin French <[EMAIL PROTECTED]> wrote:
> I can't help with the Oracle question, but yes,
> stick with apache 1.3.x 
> for the moment...
> 
> It would also pay to look at what version of PHP
> you're currently 
> running (eg 4.1) and see what major changes you're
> likely to experience 
> when upgrading to the latest stable version.
> 
> If your existing version is pre 4.1, the register
> globals will be an 
> issue, for example.
> 
> Sorry, I have no idea what version of PHP was on RH
> 7
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP / Oracle support (8/9) under Redhat 9

2003-08-04 Thread Robert Mena
Hi Juan,

But I'd need to compile php with oracle support.

Do you have any experience with this setup ? RH9 + PHP
with oracle support ?

Regards.

--- Juan Nin <[EMAIL PROTECTED]> wrote:
> From: "Robert Mena" <[EMAIL PROTECTED]>
> 
> > a) apache
> >
> > It seems that apache + php does not work well
> under
> > heavy load so I should stick with 1.3.X right ? 
> Any
> > ideas where I can find a rpm package for redhat 9
> ?
> 
> Yes, stick with apache-1.3.x
> Latest 1.3.x version RPM from Red Hat for RH 7.3 is
> apache-1.3.27-2.i386.rpm
> 
> I'm using the latest RH 7.1 apache RPM in a RH 9 and
> runs ok, which is
> apache-1.3.27-1.7.1
> 
> Latest PHP version for RH 7.1 is php-4.1.2-7.1.6
> For RH 9 it's php-4.2.2-17, I guess there should be
> no problem in running
> that version with the apache-1.3.x from RH 7.x
> 
> Regards,
> 
> Juan
> 
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP / Oracle support (8/9) under Redhat 9

2003-08-04 Thread Juan Nin
From: "Robert Mena" <[EMAIL PROTECTED]>

> But I'd need to compile php with oracle support.
> Do you have any experience with this setup ? RH9 + PHP
> with oracle support ?

nope, have only used it with MySQL...

the problem is that the php RPM does not have Oracle support compiled in?
if it's that, then download the SRPM and compile it again with Oracle
support  :)

regards,

Juan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP / Oracle support (8/9) under Redhat 9

2003-08-04 Thread Jon Drukman
At 06:33 PM 8/3/2003, Robert Mena wrote:
a) apache

It seems that apache + php does not work well under
heavy load so I should stick with 1.3.X right ?
i don't know about that.  i'm running an extremely high traffic website 
with apache + php + linux and it's a total champ.  we've got 6 compaq 
dl380's (dual xeon 2.8ghz, 4G ram) behind a load balancer and so far there 
hasn't been a single apache/php failure that wasn't caused by me doing 
something stupid (like writing an infinite loop in php).

we're using apache 2.0.47 (prefork model), php 4.3.1, redhat 7.3, mysql 4.0.12.

-jsd-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP / Oracle support (8/9) under Redhat 9

2003-08-04 Thread Juan Nin
From: "Robert Mena" <[EMAIL PROTECTED]>

> a) apache
>
> It seems that apache + php does not work well under
> heavy load so I should stick with 1.3.X right ?  Any
> ideas where I can find a rpm package for redhat 9 ?

Yes, stick with apache-1.3.x
Latest 1.3.x version RPM from Red Hat for RH 7.3 is apache-1.3.27-2.i386.rpm

I'm using the latest RH 7.1 apache RPM in a RH 9 and runs ok, which is
apache-1.3.27-1.7.1

Latest PHP version for RH 7.1 is php-4.1.2-7.1.6
For RH 9 it's php-4.2.2-17, I guess there should be no problem in running
that version with the apache-1.3.x from RH 7.x

Regards,

Juan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP / Oracle support (8/9) under Redhat 9

2003-08-03 Thread Justin French
On Monday, August 4, 2003, at 11:33  AM, Robert Mena wrote:

a) apache

It seems that apache + php does not work well under
heavy load so I should stick with 1.3.X right ?  Any
ideas where I can find a rpm package for redhat 9 ?
I can't help with the Oracle question, but yes, stick with apache 1.3.x 
for the moment...

It would also pay to look at what version of PHP you're currently 
running (eg 4.1) and see what major changes you're likely to experience 
when upgrading to the latest stable version.

If your existing version is pre 4.1, the register globals will be an 
issue, for example.

Sorry, I have no idea what version of PHP was on RH 7

Justin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP / Oracle support (8/9) under Redhat 9

2003-08-03 Thread Robert Mena
Hi,

I am planning to migrate my current web server from
redhat 7.x to 9 and I am currently evaluating what may
go wrong or need special attention before I actually
replace it.

After searching the archives and other lists I still
have a couple of questions :

a) apache

It seems that apache + php does not work well under
heavy load so I should stick with 1.3.X right ?  Any
ideas where I can find a rpm package for redhat 9 ?

b) oracle support

For the current setup I've downloaded and installed
the oracle 8i (8.1.5) in a separate machine, tar.gz
the lib directory in order to compile and run php with
oracle 8i.

Is this the best approach for Redhat 9 or should I try
to install oracle 9 which hopefully may have a
devel-only option ?  Note that php needs to access
external oracle 8 servers which I do not mantain.

Regards.

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle Odbc Connection Problem

2003-07-21 Thread angel
I'm trying to connect to a oracle database using the " Microsoft ODBC for
Oracle " driver with the
followin script:

";
exit;
}
if ($result = odbc_Exec($conn, $query))
{  print  "Query returned : " . odbc_num_rows($result) . " rows";
odbc_result_all($result, "border = 1");}
  ?>

And received the following error:
Warning: SQL error: [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154:
TNS:could not resolve
service name, SQL state 08001 in SQLConnect in c:\php\files\p.php on line 6


Can any body help With this error.

Wha i have to set for connecting with oracle using odbc?

Regards,

Angel M.S.F.






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle CMS

2003-07-17 Thread Chris Cook
Are there any open source CMSs that work with Oracle?

Thanks,
Chris
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Oracle 9.2.0 stored procedure & PHP 4.3.2

2003-06-04 Thread jon
Hi, I have deveolped a stored procedure within oracle 9.2.0. This procedure
has an output parameter that is a defined as a REF CURSOR and I would to
know if it is posible, using ORA functions in PHP, to run this procedure and
retrieve the data contained by this REF CURSOR.

I would be very grateful if you could enclose a simple example explaining
the solution in a few lines of code. I think that this should clarify very
much my doubts. Thanks




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle support under PHP / 8i or 9 and a RedHat 9 / Apache 1.3.X machine

2003-06-03 Thread Robert Mena
Hi,

I have a server (currently 7.1) with apache + php
compiled with oracle (mcrypt, imap, gettext) support.

In order to do so I've installed the 8i linux
versions, make a tar.gz of the libs directory and
installed in my server.

I runs fine accessing a remote (not mantained by me)
oracle database.

I am planning to switch to a newer distribution and
was considering the RH9 but with the "old" apache.

Since I do not actually use Oracle (just enable php
scripts to do so) I am kind of lost if the combo (old
8i libs with redhat 9) are stable enough or should I
try a newer version, such as oracle 9.

And in that case if PHP level of support is the same
(oracle 8 or 9).

Since the answer can be slighty OT fell free to send
me directly.

Thanks.

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP & Oracle

2003-03-03 Thread 1LT John W. Holmes
> i have one big Oracle database, 20GB. Is it better to comunicate
> directly to Oracle with PHP, or to export data to MySQL. How secure is
> PHP & Oracle, can they communicate well?

Why would you send it to MySQL? Just get PHP and Oracle talking and go with
that.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP & Oracle

2003-03-03 Thread Reuben D. Budiardja
On Monday 03 March 2003 09:29 am, Simon wrote:
> Hi,
>
> i have one big Oracle database, 20GB. Is it better to comunicate
> directly to Oracle with PHP, or to export data to MySQL. How secure is
> PHP & Oracle, can they communicate well?

I don't see why you would want to export data to MySQL first. PHP has a built 
in support for Oracle and OCI8, and it works really well. I've been doing a 
lot of developement using PHP + Oracle. You lose some SQL capability that are 
native to Oracle if you export from Oracle to Mysql.

RDB


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP & Oracle

2003-03-03 Thread Simon
Hi,

i have one big Oracle database, 20GB. Is it better to comunicate 
directly to Oracle with PHP, or to export data to MySQL. How secure is 
PHP & Oracle, can they communicate well?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Php Oracle & Word object

2003-02-21 Thread 1LT John W. Holmes
SELECT it out, send Word headers with header() and echo your data.

---John Holmes...

- Original Message - 
From: "M.ALPER KARASAHIN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 8:53 AM
Subject: [PHP] Php Oracle & Word object


Hi,
i want to display a blob column, that contain a word object. 

My database is Oracle Ver 8.1.7.
Php version is 4.2.3

How can i do this?

Thanks for your help.

Alper.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Php Oracle & Word object

2003-02-21 Thread M.ALPER KARASAHIN
Hi,
i want to display a blob column, that contain a word object. 

My database is Oracle Ver 8.1.7.
Php version is 4.2.3

How can i do this?

Thanks for your help.

Alper.



Re: [PHP] Oracle to MySQL

2003-02-20 Thread Philippe Saladin
> I'm recalling this from memory, and I may not be 100% right, but it
> should put you on the right path.  You will need to install the Oracle
> client libraries on the box with php (you can find these on the Oracle
> discs used to install the actual database).
Yes

> correctly, the Oracle discs will be for a specific OS, so if the db
> isn't on OS X, the client libraries for OS X won't be on there.  If you
> can find the libraries for OS X, and get them installed,
www.otn.oracle.com ?

> to recompile php with Oracle support"--with-oci8", or the other
> option (I can't remember what it is ( "--with-oracle"?, and this depends
> on the version of the Oracle DB you have).
--with-oci8 is the good one. used for both oracle 7 and oracle 8 (and oracle
9?). With that, you will use the php oci* functions (ocilogon, etc. See
http://www.php.net/manual/en/ref.oci8.php)
--with-oracle is older, and only for oracle 7. this is for php ora*
functions (ora_logon, etc.). IMHO, you can forget them.


Regards,
Philippe



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Oracle to MySQL

2003-02-19 Thread John Nichel
I'm recalling this from memory, and I may not be 100% right, but it 
should put you on the right path.  You will need to install the Oracle 
client libraries on the box with php (you can find these on the Oracle 
discs used to install the actual database).  However, if I remember 
correctly, the Oracle discs will be for a specific OS, so if the db 
isn't on OS X, the client libraries for OS X won't be on there.  If you 
can find the libraries for OS X, and get them installed, you will need 
to recompile php with Oracle support"--with-oci8", or the other 
option (I can't remember what it is ( "--with-oracle"?, and this depends 
on the version of the Oracle DB you have).

My memory of how to do this gets really fuzzy now.  I remeber having to 
set up enviroment variables like ORA_HOME, and creating a file ("sid"?) 
with the connection string.  It's not that it's real hard to do this, 
just that I have very little Oracle experience, and I was given this as 
a task about 18 months ago when our sysadmin quit.  There's quite a few 
steps involved in this, and I'm sure that since you're doing this on OS 
X, there is going to be alot less help out there for you.

Okay, I babbled, and don't think I really helped.  Maybe these URL's 
will help...
http://www.enderunix.org/documents/eng/php_oracle_en.html
http://www.phpbuilder.com/columns/yenigul20020122.php3?

Chris Cook wrote:
Hi all,

I am working on PHP project with a MySQL backend. However, we would like 
update the MySQL database periodically with an Oracle database not on 
our server. What should I do to interface with Oracle? Do I need to 
install anything on our server (OS X Server running Apache)?

Thanks for any help,
Chris

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail




--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Oracle to MySQL

2003-02-19 Thread Chris Cook
Hi all,

I am working on PHP project with a MySQL backend. However, we would like 
update the MySQL database periodically with an Oracle database not on our 
server. What should I do to interface with Oracle? Do I need to install 
anything on our server (OS X Server running Apache)?

Thanks for any help,
Chris

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Oracle and CLOBs

2003-01-14 Thread Jadiel Flores
Hi, I'm having a big problem with php and Oracle.

I'm using Oracle 8.1.6 and PHP 4.2 with the Oracle component in a Solaris 
server, I can not recompile apache and php to install the oci8 component 
and I'm having lot of problems with CLOBs, I'm receiving this error:

Warning: Ora_Exec failed (ORA-00932: inconsistent datatypes -- while
processing OCI function OEXEC/OEXN) in
/var/www/espejo/includes/con.php on line 107

Line 107 contains this code:
Ora_Exec($this->cursor);

The query is:
SELECT Title, NewsDate, Content FROM inf_news WHERE ID_News = 5

Where:
Title is VarChar, NewsDate is Date and Content is a CLOB

It works fine if the query doesn't contain the CLOB field.

Any suggestion???


Jadiel Flores
-
http://www.abargon.com
[EMAIL PROTECTED]
(52-55) 52-29-80-34



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP/Oracle Command line Segmentation Fault

2003-01-10 Thread Maxim Maletsky

Are you saying that OCILogoff gives you the segfault?
It's very strange because OCILogoff is actually an "empty" function -
all the contents of that function is commented and is there only for the
backwards compatibility reasons. Zend API ends OCI sessions
automatically as script's execution ends.

Do what, try removing the last function from your script and run again.
If the segfault happens again submit a bug report at http://bugs.php.net
with all the possible details (server log, script, system etc) and I
will take over the bug myself (I maintain the OCI8 extension)


--
Maxim Maletsky
[EMAIL PROTECTED]



"Christopher Ditty" <[EMAIL PROTECTED]> wrote... :

> Anyone?
> 
> CDitty
> 
> >>> "Christopher Ditty" <[EMAIL PROTECTED]> 01/09/03 04:04PM >>>
> I have successfully installed oracle 8.1.7 w/ php and have it
> configured
> to run from the command line.  When I run a simple script that
> connects,
> and selects records from the database, the last line is a segmentation
> fault error.  This does not seem to happen when the same script is run
> through the browser.  
> 
> Can anyone offer any help or advice?  The code is listed below.
> 
> CDitty
> 
> #!/usr/bin/php
>  function oci8Connect(){
>  $db_conn = ocilogon("usrname","pwd", "dbase");
>  if (!$db_conn){
>   echo "Help";
> exit ();
>  }
>  echo "Connected";
>  return ($db_conn);
> }
> 
> $conn = oci8Connect();
> 
> $stmt = ociparse($conn,"select * from US_MSTR");
>   ociexecute($stmt);
> 
>   $i=0;
>   $row = array();
> 
>   while(OCIFetchInto($stmt, &$row, OCI_ASSOC)){
>   # do stuff with $row...
>   echo $row['US_ID'] . " $i";
>   $i++;
>   }
> 
>   ocifreestatement($stmt);
>   ocilogoff($conn);
> ?>
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP/Oracle Command line Segmentation Fault

2003-01-10 Thread Christopher Ditty
Anyone?

CDitty

>>> "Christopher Ditty" <[EMAIL PROTECTED]> 01/09/03 04:04PM >>>
I have successfully installed oracle 8.1.7 w/ php and have it
configured
to run from the command line.  When I run a simple script that
connects,
and selects records from the database, the last line is a segmentation
fault error.  This does not seem to happen when the same script is run
through the browser.  

Can anyone offer any help or advice?  The code is listed below.

CDitty

#!/usr/bin/php
";
exit ();
 }
 echo "Connected";
 return ($db_conn);
}

$conn = oci8Connect();

$stmt = ociparse($conn,"select * from US_MSTR");
  ociexecute($stmt);

$i=0;
$row = array();

  while(OCIFetchInto($stmt, &$row, OCI_ASSOC)){
# do stuff with $row...
echo $row['US_ID'] . " $i";
$i++;
}

ocifreestatement($stmt);
ocilogoff($conn);
?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP/Oracle Command line Segmentation Fault

2003-01-09 Thread Christopher Ditty
I have successfully installed oracle 8.1.7 w/ php and have it configured
to run from the command line.  When I run a simple script that connects,
and selects records from the database, the last line is a segmentation
fault error.  This does not seem to happen when the same script is run
through the browser.  

Can anyone offer any help or advice?  The code is listed below.

CDitty

#!/usr/bin/php
";
exit ();
 }
 echo "Connected";
 return ($db_conn);
}

$conn = oci8Connect();

$stmt = ociparse($conn,"select * from US_MSTR");
  ociexecute($stmt);

$i=0;
$row = array();

  while(OCIFetchInto($stmt, &$row, OCI_ASSOC)){
# do stuff with $row...
echo $row['US_ID'] . " $i";
$i++;
}

ocifreestatement($stmt);
ocilogoff($conn);
?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Oracle 7 support

2002-11-12 Thread Dan Field
> First, let me just say that I'm no Oracle guru. :) But while we're waiting
> for them...

Thanks, all help appreciated :)

> *I think* you need to have Oracle installed even if you wouldn't really
> connect to it but instead connect to a different server. Since I installed
> Oracle with most of the Linux installations that I did, I haven't really
> tried enabling Oracle support in PHP without Oracle on the same server. In
> other words, I haven't really tried configuring --with-oci8 without
> supplying the path (e.g.  --with-oci8=/path/to/oracle/ ).

It certainly looks that way.

> PHP will look for the needed file when configuring so I don't think you can
> really get away without installing Oracle first. (Of course, you can just
> try to find out what files are needed, ask a friend to give you a copy,
> "trick" php that it exists, etc.--it might not work though...)

Yes this is right too. I greabed the SRC RPM for PHP 4.2.2 and edited
the spec file to include --with-oci8 but it now throws the following
errors:

checking for Oracle-OCI8 support... yes, shared
checking Oracle Install-Dir...
checking Oracle version... configure: error: Oracle-OCI8 needed
libraries not found
error: Bad exit status from /var/tmp/rpm-tmp.47391 (%build)

> Anyway, if you need Oracle, try the OTN site. There's one that you can use
> for development.

Luckally I had downloaded the Oracle-Linux (Version 8i) installer a few
weeks ago incase this problem arised. but the installer is currently
taking 98% of my CPU with the Java Runtime and it doesn't seem to be
doing a lot else (not even a GUI window yet . 20 minutes later). I
fear this is too OT for the list though.

If anyone does know if I can "trick" PHP by just copying some files from
the Oracle-Linux.tar then this would be a great help though.

Thanks all for your support.

-- 
Dan Field
Systems Development Officer - Social Services Dept.
Ceredigion County Council.




Mae'r neges ebost hon, ynghyd ag unrhyw ffeiliau sydd ynghlwm wrthi,
yn gyfrinachol ac at ddefnydd yr unigolyn neu sefydliad y cyfeiriwyd hi ato.
Pe  dderbynioch y neges hon mewn camgymeriad, byddwch
mor garedig a rhoi gwybod i'r rheolwr system.

Mae'r nodyn hwn hefyd yn cadarnhau bod y neges ebost hon wedi
cael ei archwilio am bresenoldeb feirws cyfrifiadurol gan MIMEsweeper.


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Oracle 7 support

2002-11-12 Thread @ Edwin


"Maxim Maletsky" <[EMAIL PROTECTED]> wrote:

> 
> Well, I will spread some light - I maintain OCI8 extension :)
> 
> Your machine does not need Oracle Server installed, it needs Oracle
> Client installed. These are two completely different things.
> 
> So, try this in your command prompt:
> 
> echo $ORACLE_HOME
> 
> if you get a result, means the client is there and you can recompile php
> --with-oci8=$ORACLE_HOME
> 
> That will compile the OCI8 extension with all the required headers.
> 

Now, that make sense :)

Thanks!

- E

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Oracle 7 support

2002-11-12 Thread Chris Hewitt
Dan Field wrote:


functionality included. If I recompile PHP, will I need the Oracle
headers on the machine also? If so this could be a problem as the Oracle
server I wish to use is not on the same machine as the webserver.


Seems lots of us have not actually tried doing it without Oracle 
installed! To connect to a database you will need the networking code 
and specifically the tnsnames.ora file. Check for this. I think it 
unlikely to come with php since it is proprietry code. Its only the 
Oracle client installation you would need (not server) and only the 
networking code.

HTH
Chris



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Oracle 7 support

2002-11-12 Thread Maxim Maletsky

Well, I will spread some light - I maintain OCI8 extension :)

Your machine does not need Oracle Server installed, it needs Oracle
Client installed. These are two completely different things.

So, try this in your command prompt:

echo $ORACLE_HOME

if you get a result, means the client is there and you can recompile php
--with-oci8=$ORACLE_HOME

That will compile the OCI8 extension with all the required headers.

Cheers,


--
Maxim Maletsky
[EMAIL PROTECTED]



"@ Edwin" <[EMAIL PROTECTED]> wrote... :

> Hello,
> 
> First, let me just say that I'm no Oracle guru. :) But while we're waiting
> for them...
> 
> "Ford, Mike [LSS]" <[EMAIL PROTECTED]> wrote:
> 
> > > -Original Message-
> > > From: Dan Field [mailto:danf@;ceredigion.gov.uk]
> > > Sent: 12 November 2002 13:39
> 
> ...[snip]...
> 
> > > That is great news, thanks Mike. My second problem then lies with my
> > > current PHP Setup. I have been using the binary RPMs from RedHat up to
> > > now, which do not sem to have been compiled with the Oracle
> > > functionality included. If I recompile PHP, will I need the Oracle
> > > headers on the machine also? If so this could be a problem as
> > > the Oracle
> > > server I wish to use is not on the same machine as the webserver.
> >
> > Sorry, I can't help with this one as I'm not the administrator of our main
> Unix
> > server, and my test server is Windows so I used the pre-compiled binaries.
> >
> > But hopefully one of the Oracle gurus on this list will spring to your
> aid!
> >
> 
> *I think* you need to have Oracle installed even if you wouldn't really
> connect to it but instead connect to a different server. Since I installed
> Oracle with most of the Linux installations that I did, I haven't really
> tried enabling Oracle support in PHP without Oracle on the same server. In
> other words, I haven't really tried configuring --with-oci8 without
> supplying the path (e.g.  --with-oci8=/path/to/oracle/ ).
> 
> PHP will look for the needed file when configuring so I don't think you can
> really get away without installing Oracle first. (Of course, you can just
> try to find out what files are needed, ask a friend to give you a copy,
> "trick" php that it exists, etc.--it might not work though...)
> 
> Anyway, if you need Oracle, try the OTN site. There's one that you can use
> for development.
> 
> - E
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Oracle 7 support

2002-11-12 Thread Maxim Maletsky
Your machine will need the Oracle headers which are included in Oracle
Client. So, in two words - your machine needs Oracle client installed.

Try doing:

echo $ORACLE_HOME

in your command prompt


--
Maxim Maletsky
[EMAIL PROTECTED]



Dan Field <[EMAIL PROTECTED]> wrote... :

> On Tue, 2002-11-12 at 13:03, Ford, Mike [LSS] wrote:
> > > -Original Message-
> > > From: Dan Field [mailto:danf@;ceredigion.gov.uk]
> > > Sent: 12 November 2002 12:18
> > > 
> > > Can anyone tell me if Oracle 7 is supported by PHP 4.2.2 ?
> > 
> > Yes.
> >  
> > > I have found functions specific to Oracle 8i and some more generic
> > > functions (are these only for Oracle 9?).
> > 
> > No -- the OCI8 functions are actually recommended for Oracle 7 upwards.  The
> > ora_* functions are older and do not use the newer OCI methodology.
> 
> That is great news, thanks Mike. My second problem then lies with my
> current PHP Setup. I have been using the binary RPMs from RedHat up to
> now, which do not sem to have been compiled with the Oracle
> functionality included. If I recompile PHP, will I need the Oracle
> headers on the machine also? If so this could be a problem as the Oracle
> server I wish to use is not on the same machine as the webserver.
> 
> Cheers
> 
> -- 
> Dan Field
> Systems Development Officer - Social Services Dept.
> Ceredigion County Council.
> 
> 
> 
> 
> Mae'r neges ebost hon, ynghyd ag unrhyw ffeiliau sydd ynghlwm wrthi,
> yn gyfrinachol ac at ddefnydd yr unigolyn neu sefydliad y cyfeiriwyd hi ato.
> Pe  dderbynioch y neges hon mewn camgymeriad, byddwch
> mor garedig a rhoi gwybod i'r rheolwr system.
> 
> Mae'r nodyn hwn hefyd yn cadarnhau bod y neges ebost hon wedi
> cael ei archwilio am bresenoldeb feirws cyfrifiadurol gan MIMEsweeper.
> 
> 
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Oracle 7 support

2002-11-12 Thread @ Edwin
Hello,

First, let me just say that I'm no Oracle guru. :) But while we're waiting
for them...

"Ford, Mike [LSS]" <[EMAIL PROTECTED]> wrote:

> > -Original Message-
> > From: Dan Field [mailto:danf@;ceredigion.gov.uk]
> > Sent: 12 November 2002 13:39

...[snip]...

> > That is great news, thanks Mike. My second problem then lies with my
> > current PHP Setup. I have been using the binary RPMs from RedHat up to
> > now, which do not sem to have been compiled with the Oracle
> > functionality included. If I recompile PHP, will I need the Oracle
> > headers on the machine also? If so this could be a problem as
> > the Oracle
> > server I wish to use is not on the same machine as the webserver.
>
> Sorry, I can't help with this one as I'm not the administrator of our main
Unix
> server, and my test server is Windows so I used the pre-compiled binaries.
>
> But hopefully one of the Oracle gurus on this list will spring to your
aid!
>

*I think* you need to have Oracle installed even if you wouldn't really
connect to it but instead connect to a different server. Since I installed
Oracle with most of the Linux installations that I did, I haven't really
tried enabling Oracle support in PHP without Oracle on the same server. In
other words, I haven't really tried configuring --with-oci8 without
supplying the path (e.g.  --with-oci8=/path/to/oracle/ ).

PHP will look for the needed file when configuring so I don't think you can
really get away without installing Oracle first. (Of course, you can just
try to find out what files are needed, ask a friend to give you a copy,
"trick" php that it exists, etc.--it might not work though...)

Anyway, if you need Oracle, try the OTN site. There's one that you can use
for development.

- E


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Oracle 7 support

2002-11-12 Thread Ford, Mike [LSS]
> -Original Message-
> From: Dan Field [mailto:danf@;ceredigion.gov.uk]
> Sent: 12 November 2002 13:39
> 
> On Tue, 2002-11-12 at 13:03, Ford, Mike [LSS] wrote:
> > > -Original Message-
> > > From: Dan Field [mailto:danf@;ceredigion.gov.uk]
> > > Sent: 12 November 2002 12:18
> > > 
> > > Can anyone tell me if Oracle 7 is supported by PHP 4.2.2 ?
> > 
> > Yes.
> >  
> > > I have found functions specific to Oracle 8i and some more generic
> > > functions (are these only for Oracle 9?).
> > 
> > No -- the OCI8 functions are actually recommended for 
> Oracle 7 upwards.  The
> > ora_* functions are older and do not use the newer OCI methodology.
> 
> That is great news, thanks Mike. My second problem then lies with my
> current PHP Setup. I have been using the binary RPMs from RedHat up to
> now, which do not sem to have been compiled with the Oracle
> functionality included. If I recompile PHP, will I need the Oracle
> headers on the machine also? If so this could be a problem as 
> the Oracle
> server I wish to use is not on the same machine as the webserver.

Sorry, I can't help with this one as I'm not the administrator of our main Unix 
server, and my test server is Windows so I used the pre-compiled binaries.

But hopefully one of the Oracle gurus on this list will spring to your aid!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  1   2   3   >