Re: [PHP-DB] Re: PHP crashing with using Oracle (SOLVED... well, sorta)
On Mon, Jul 07, 2003 at 03:58:45PM -0400, Reuben D. Budiardja wrote: Apparently there is a bug or something with OCI8 extention for PHP-4.3.2. Using the same configuration and everything, I compiled PHP-4.3.1, and 4.2.3 and both worked. I send e-mail to PHP-DEV wondering if this is a known bug that has been reported before. So if anyone has the same experience, I would certainly like to know. It's curious that no one has catch this, if that's really the case. please add an #undef HAVE_OCI8_SHARED_MODE in line 460 of oci8.c and recompile. also don't forget to report back if that solved your problem! re, tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Oracle errors not returning w 4.30
On Wed, Feb 12, 2003 at 07:43:48PM +1100, Steve Farmer wrote: Hi all, We recently upgraded to php 4.30 and now our oracle errors are not returning.. This used to work $errmsg = ocierror($err_curs); ocirollback($err_conn); $errtext = $errmsg['message']; works for me - could you send a _short_ selfcontained script that shows your problem? re, tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] OCIBindByName with Oracle 8i17 problem ?!
On Mon, Nov 04, 2002 at 06:16:04PM +0100, Fabien JOSEPH wrote: I discovered recently that it was impossible to bind an output placeholder plsql (an input work only). Configuration 1 : Suse + Oracle 8i17 + oci (oracle) + PHP4.2.3 Configuration 2 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.3 Configuration 3 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.2 With script : inoutdemo.sql CREATE OR REPLACE PROCEDURE inoutdemo (par_in IN VARCHAR2, par_in_out IN OUT VARCHAR2, par_out OUT VARCHAR2) IS BEGIN par_out:=par_in; par_in_out:=par_in||' '||par_in_out;END; $db=OCILogon(toto,titi); $stmt=OCIParse($db,BEGIN inoutdemo(:in,:inout,:out);END;); OCIBindByName($stmt,:in,$in,32); OCIBindByName($stmt,:inout,$inout,32); OCIBindByName($stmt,:out,$out,32); $in=Hello ; $inout=World!; OCIExecute($stmt); echo $in.\n.$inout.\n.$out.\n; //Result Warning: OCIStmtExecute: ORA-06550: line 1, column 17: PLS-00553: character set name is not recognized ORA-06550: line 0, column 0: i'd say you have a problem with your NLS_LANG setting. re, tc PL/SQL: Compilation unit analysis terminated in /opt/apache/htdocs/fab.php4 on line 58 Hello World! I tested this script with the 3 configurations but it's the same error I changed $in, inout , out into $in, $out, $inout but it's the same error Please help me !!! Fabien JOSEPH -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Thies C. Arntzen - Looking for all sorts of freelance work - just ask.. http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] OCILogon Question
On Tue, Oct 15, 2002 at 03:10:20PM +0200, [EMAIL PROTECTED] wrote: Hi everybody, I have set up a connection to an Oracle database using OCILogon. In general that works, but frequently (without a clear pattern) it does not. I know that the performance of the network is variying very much (tsnping takes between 20ms up to hundreds of ms). Does someone know whether this might have an impact on OCILogon or has anybody an idea, whether OCILogon has got a time limit, in which the database has to answer? no, you can only set timeouts etc in your tnsnames.ora file, ocilogon has no intelligence at all;-) re, tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] OSCON: anybody interested in my Oracle talk?
hi, seems like oreilley will cancel my tutorial about PHP and Oracle at OSCON in san diego as there are not enough ppls interested. so - if you go to oscon, and if you are interested in that subject _and_ if you have not decided to sign up for my tutorial - hurry up and register (deadline is friday), elsewise it'll be cancelled:-( hoping for the best... tc PS: i was going to do some intersting new stuff for OSCON (scollable cursors etc) - so if you use oracle with PHP this is a *must*:-) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Using OCI, can I retrieve multiple values from DELETE/UPDATE RETU RNING?
On Wed, May 01, 2002 at 12:35:48PM +0100, Ford, Mike [LSS] wrote: Using the Oracle OCI interface, as far as I can see if I do the following: $stmt = OCIParse($conn, 'DELETE FROM TITLES' . ' WHERE TAG0' . ' RETURNING ID INTO :T_ID'); there seems to be no way of picking up more than one ID when multiple rows are deleted. The obvious OCIBindByName($stmt, ':T_ID', $t_id, 10); only returns one ID, and not an array of IDs as I might have expected. No other method I can think of is able to return even that! (Including any OCIFetch variation, which doesn't surprise me as they're labelled as being for SELECT results only!) I would be very grateful for any suggestions of how to do this, or confirmation that it can't be done (in which case I'll submit a Feature/Change request to ask for it!). have you tried an array bind? i have not tries myself, but that would be my 1st guess. see http://conf.php.net/pres/slides/oci/paper.txt for a small sample. It seems ridiculous that I should have to do a SELECT/DELETE pair, when Oracle provides such a useful feature to get the same result in a single statement. bla bla bla... php comes for free - please choose your words a bit more careful, ppls might get offended and not respond to you at all! if you require this feature and it's not in PHP you can: - moan - implement it and keep it private - implement it and give it back to PHP for other ppls to use - find someone who implements it for free - sponsor someone to implement it if you are interested in sponsoring this development please contact me via PM. tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] OCIRowCount for a BEGIN...END block
On Wed, Apr 17, 2002 at 01:03:49PM -0500, Pedro Garre wrote: *This message was transferred with a trial version of CommuniGate(tm) Pro* Hi, OCIRowCount does not seem to work when inserts are made in a block: BEGIN insert ...; insert ...; insert ...; END; It returns 1, but 3 rows have actually been inserted. How can I get the correct number of rows inserted ? no idea. ocirowcount mappes 1 to 1 to the underlying oci call. read the oracle-docs, if you find a way to get your desired count back, i'd be glad to implement it in PHP. re, tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Oracel 9i connection problems.
On Tue, Apr 16, 2002 at 06:28:19PM +0200, [EMAIL PROTECTED] wrote: Put this on your php page Putenv(ORACLE_HOME=/home/oracle/8.0.5); Putenv(LD_LIBRARY_PATH=/home/oracle/8.0.5/lib); Putenv(TWO_TASK=WAGNER_PC); no. do not use PutEnv or SetEnv in httpd.conf! please set _ALL_ needed oracle env-vars in /etc/init.d/http using PutEnv won't work! re, tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: LOBS with CURSOR_SHARING=FORCE gives core dump
On Thu, Apr 11, 2002 at 06:09:02PM +0800, John Lim wrote: Hmm, I have also been having similar problems with LOBs. However it might not be cursor_sharing=force, because on my Win 2000 oracle, LOBs work fine with PHP with this parameter set. However on our Sun server, PHP crashes as you mention (yes cursor_sharing=force is set here too). PS: this is set in init.ora. could one of your please send me a backtrace o fthis crash? see: http://bugs.php.net/bugs-generating-backtrace.php re, tc Prince [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have the following php code. If I add the parameter CURSOR_SHARING=FORCE in my init.ora and while executing the program I get the Segmentation fault. $ /usr/local/php4/bin/php -q curshare.php Segmentation fault (core dumped) Is there any work-around for this? Is this a bug? This seems to be happening only when LOB with returning clause is present. I tested a similar program from C program and is fine. Note: currently I have set the parameter (CURSOR_SHARING=FORCE ) only in the program/session level. Thanks, Prince. $ cat curshare.php #!/usr/local/php4/bin/php -q ? //program name curshare.php $conn = OCILogon($dbuser, $dbpass, $dbname); //This is added to affect only the current session. $sql = alter session set cursor_sharing=force; $stmt = ociparse($conn,$sql); OCIExecute($stmt,OCI_DEFAULT); $lob = OCINewDescriptor($conn, OCI_D_LOB); $sqlstmt = insert into blob_test ( packageid, packagebody ) values('12344321123efd', EMPTY_BLOB()) returning packagebody into :packagebody; $stmt = OCIParse($conn, $sqlstmt) ; OCIBindByName($stmt, ':packagebody', $lob, -1, OCI_B_BLOB); OCIExecute($stmt, OCI_DEFAULT); OCICommit($conn); OCIFreeDesc($lob); OCIFreeStatement($stmt); OCILogoff($conn); ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Oracle - Executing Stored QUERIES
On Fri, Apr 05, 2002 at 01:08:20PM +0100, Chris Andrew wrote: Hi, Please tell me this is possible: I have a bunch of stored queries on an Oracle machine. Using PHP from a separate RedHat box, I want to run these stored queries. My PHP is compiled with oracle support, and I can issue regular SQL to the Oracle box - such as SELECT foo FROM bar. This works no problem. But - surely there must be a way to issue some kind of SQL statement that will run a pre-stored query (not procedure)? what is a pre-stored query? tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Bindbyname error in solaris
On Wed, Mar 06, 2002 at 10:59:33PM +0500, Mohammad Saad wrote: Hello I have PHP4.10 on solaris with oci8 support. everything seems to work well. Oracle support is working fine. but I am getting an error when I am trying OCIBindByName to bind a variable to an out variable of a stored procedure. I have checked this code on php4.10 on windows 2k with same database and it works well. I get the value of the out variable in my binded variable of PHP script. .Only PHP on solaris is giving me the error, any ideas why? here is the code and the error $getcardvalidity = begin customer.scratch_check ('$serial','$code1','$code2',:amount);end;; $cardstmt = OCIParse($conn,$getcardvalidity); OCIBindByName ( $cardstmt, :amount, $amount,4); OCIExecute($cardstmt,OCI_DEFAULT); Warning: OCIStmtExecute: Error while trying to retrieve text for error ORA-03113 03113, 0, end-of-file on communication channel // *Cause: // *Action: your db-connection died. please try to connect from your windows box to this db to see if the problem is PHP or oracle related! tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Oracle 9i support
On Sat, Feb 09, 2002 at 01:10:58PM +0100, Jaros?aw Jankowski wrote: Theodore D Boardman wrote: Greetings! As far as I can tell from the documentation, the OCI8 driver supports Oracle 8. However, on the ADODB site, they mention that the OCI8 driver supports Oracle 8/9. Can someone clarify what the status of support for Oracle 9i is in PHP? I need to know if I need to stick with Oracle 8i now or not. Ted Boardman Communications Technology Editor Indiana University Alumni Association [EMAIL PROTECTED] http://www.alumni.indiana.edu Hi, As i know there is no problem with oracle 9i - there where some posts about that in php manual in the OCI functions section. Jarry 9i work fine - we're even going to have scollable cursor support in the oci-driver soon (which requires 9i). tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] OCI8
On Thu, Jan 17, 2002 at 01:20:47PM -0700, Randall Barber wrote: I've been using the OCI8 extension and have a question about the Persistent Connections. While debugging the site, I will run into the following error (paraphrased): BeginSession: too many processes running etc... I have my scripts setup in the following way: ?php OCIPLogon(...); stuff ? I never do call OCILogOff(...) explicitly. I may misunderstand, but I thought when a call to a persistent connection is made, it will first look for an open session and use it. Otherwise, it creates a new one. This correct? yes. What causes this overload of sorts? Is it PHP or Apache? when using persustent connections you will at one point have as many db-connections as you have httpd processes. so to limit the no. of connections to your DB you have to set MaxClients in httpd.conf. i'mn ot to sure about the windows stuff here - does it work when using OCILogin instead of OCIPlogon? tc Win2k Apache 1.3.20 PHP 4.1.0 Thanks in advance for your help RDB -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Unable to Open ORACLE
On Mon, Dec 03, 2001 at 10:16:13PM -0800, John Kolvereid wrote: Hi, Me again, My table has a CLOB in it. Could that be a problem. When I tried the same querry on another table w/o a CLOB it succeeded. Please advise. Thanks. CLOBS were indroduced in oracle8 you need to use the oci*() functions to get them from the database. the ora*() functions do not (and will never) support this datatype as it's technically not possible. your problem will vanish once you use the oci*() functions. tc John Kolvereid wrote: Hi, I tried the following snippet from http://www.php.net/manual/en/ref.oracle.php $query = Select * from patients where clientid = 'DEMO'; ora_parse($curs, $query); ora_exec($curs); ora_fetch($curs); The parse executed successfully, but the exec complained that Ora_Exec failed (ORA-00932: inconsistent datatypes -- while processing OCI function OEXEC/OEXN) Earlier I had taken an example from Thies Arntzen's conf notes and successfully opened, parsed and fetehed, using the same query and the same db, only w/ OCI commands. Is there a problem w/ the ordinary Oracle functions, possibly w/ a mismatch between them and the undelying OCI codes? Please advise. Thank you. -- John Kolvereid http://www.odinfo.com http://www.kolvereid.com [EMAIL PROTECTED] 1.610.296.4485 -- John Kolvereid http://www.odinfo.com http://www.kolvereid.com [EMAIL PROTECTED] 1.610.296.4485 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] no Oracle functions
On Mon, Dec 03, 2001 at 06:58:00AM -0800, John Kolvereid wrote: Hi, I have just downloaded and installed PHP4.0.6. I have configured it --with-mysql and --with-oracle. I am able to easily use Mysql but NOT Oracle. When I try an ora_logon or ora_login I get 'Fatal error: Call to undefined function: ora_log?n' Moreover, I AM able to use Oracle w/ DBI functions, whereas our web server easily makes call to and from Oracle dbs w/ no problems. Is my problem an installation problem, or is there something else I am not aware of? Please advise. Thanks. plz configure using --with-oracle=/path/of/ORACLE_HOME also you should be using the oci*() functions - enable them using: --with-oci8=/path/of/ORACLE_HOME tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] howto craete a stored procedure in DB2?
hi, i'm working on OUT paramter support in the ODBC module when calling stored procedures. to start playing with it i need to create a stored procedure in DB2 (this is the db my customer is using). me -the stupid oracle guy- does not know how to load a stored procedure into DB2. could anybody give me a tiny example how to load such a beast into DB2? re, tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] oci8 and arrays as parameter
On Mon, Sep 10, 2001 at 03:50:08PM +0200, Ez-Berlin, E2boxb wrote: hi list, read my paper from conf.php.net/oci - it should explain all that! tc I'm using PHP 4.0.6 and i want to give an array as parameter from a php script to an oracle pl/sql - procedure... We had an older asp - site, witch used the same stored procedure, so that it's clear, the procedure works... In asp it calls AddTable to bind the parameter as array call without typ: OCIbindbyname($stmt, :P13, $arr,-1); - Warning: Array to string conversion in x on line y call with OCI_B_CURSOR: OCIbindbyname($stmt, :P13, $arr,1,OCI_B_CURSOR); - Warning: Supplied argument is not a valid OCI8-Statement resource in x on line y call with OCI_B_TABLE: OCIbindbyname($stmt, :P13, $arr,1,OCI_B_TABLE); - Warning: Use of undefined constant OCI_B_TABLE - assumed 'OCI_B_TABLE' in x on line y I got the same message with parameters: OCI_B_ARRAY, OCI_B_VARRAY and any other typs Is this not possible with the current version? regards Olaf Taesch mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Stored Procedure
On Tue, Sep 04, 2001 at 07:44:42AM -0800, [EMAIL PROTECTED] wrote: Hello everyboby! this is my first time on this list and I writing to ask for help on SP. I have the following code calling a Procedure: ? $c=OCILogon(SYSTEM,manager); $x =0; $cpf=10001628852; $sth = OCIParse ($c, begin CPF_ORA(:cpf);end; ); OCIBindByName ( $sth, :cpf, $cpf,32); $cpf=12; OCIExecute ($sth ); re, tc ? and I having this error message: Fatal error: Only variables can be passed by reference in c:\program files\apache group\apache\htdocs\testes\procedure5.php on line 10 can aybody help me? thanks Bona __ Visite http://www.trama.com.br -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] RE: bizarre ocilogon problem
On Wed, Sep 05, 2001 at 10:24:28AM -0500, Brian Mauter wrote: Are you running out of logons? You should only need the client libraries on the machine with the PHP pages. You do not need them anywhere else. (That's the beauty of the web!) Make sure you have ocilogoff in your PHP page when you're done. Even better (for performance reasons) create a session. Then ONLY the first time that any of your pages load, run your ocilogon. After that just reuse the logon. From then on, just make a new statement everytime you need to query the database. Lastly, when I used PHP/Apache/Linux to talk to Oracle/NT4, I was getting stray defunct oracle processes hanging around on my Linux box. The effect was that pages would work from one client PC, but not from another. I think everytime I created a connection, it created the process. The only way I could find to get around that was to recompile PHP with --enable-sigchild. This is PHP's own signal handler and it will clean up the stray oracle processes. Good luck, Brian -Original Message- From: Galvin, Max [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 10:07 AM To: '[EMAIL PROTECTED]' Subject: bizarre ocilogon problem Hi, I have a page that retrieves info from an Oracle database and which works fine when I view it. When I switch to another PC with the same OS/browser (NT/IE5) I get an error: call to unsupported or undefined function ocilogon() We have the client libs installed but it's only on one or two machines that this fails. Any ideas why? you donÄt have oracle-oci support in you php! please configure php using --with-oci8. re, tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] PHP4 OCIFetch with Oracle
On 17 Aug 2001 19:41:26 +0200, Konrad BüKo wrote: Hi We've a Problem with PHP4 OCIFetch and varchar2 ! OCHIFetch with number or date Field it work's fine but when i'll fetch a varchar2 Field then i've no output in the browser ! When i dump the array then i see the character is 20 Bytes my field is 10 bytes i suppose so the character is unicode ! Anybody have i idea what i can do for change the characterset ? please set NLS_LANG before you start your webserver. see http://www.php.net/manual/en/ref.oci8.php re, tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Oracle 9i Support
On Thu, Jul 26, 2001 at 01:17:57PM -0500, Lee Whatley (System Admin) wrote: Well I found out that the reason I got the error message was that the --with-oci8 option was looking for libclntsh.so.8.0 I made a symlink of this which pointed to the libclntsh.so.9.0 that comes with oracle 9i. This was enough to fool the configure script and allowed php to compile, but none of the oracle functions worked. I guess we will just have to wait until the developers add support in. Could you please give me some more information as to how you set up the oracle odbc drivers? i haven't managed to install 9i so far - if you could write a patch that detects 9i correctly on your system we'll gladly apply it! but _why_ do you want to use the oracle-odbc stuff? tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Oracle 9i Support
On Thu, Jul 26, 2001 at 01:50:37PM -0500, Lee Whatley (System Admin) wrote: Well, I was able to modify the main configure script and the configure.m4 script in the ext/oci8 directory to detect 9i, and doing so allowed the configure process to complete and php to compile. When I did a phpinfo() command it showed php as having oracle support, but did not list anything under the libraries used section. This is the same thing that would happen if I left the configure scripts unchanged and just made a symlink to libclntsh.so.9.0. phpinfo() would still say that oci8 support was there but would not list any libraries used. Also in both of these cases when I tried to use any oracle functions, (ora_logon, etc) I got an undefined function error. I don't WANT to use odbc, but if thats my only choice I guess I'll have to for awhile. if phpinfo says oci8 is included than it _is_. the libraries used thing might (and probably is) broken. just try calling ocilogon($user,$pw); and see what it does! tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Re: PATCH for 9i support (was Re: [PHP-DB] Re: Oracle 9i Support)
On Thu, Jul 26, 2001 at 04:57:29PM -0500, Lee Whatley (System Admin) wrote: Here is a patch that will allow configure to properly detect oracle 9i If your mail server filters out attachments you can download it from http://www.cba.ua.edu/~spaff/php-4.0.6-oci8-oracle9i.patch The patch should be applied from directly outside of the php source tree. I am not a coder by any means so I hope this doesn't break anything. applied (slightly different, but should do the same thing;-) thanx for submitting! tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] about PHP Warning: failed to rollback outstanding transactions!
On Thu, Jul 05, 2001 at 04:40:09PM +0900, Michael Cheung wrote: Hi; Linux 2.2.18 + oracle 8.1.7i + php 4.0.5 + oci8 I got a warning in log file. PHP Warning: failed to rollback outstanding transactions! I have simplify the script. it will cause the warning. function ShowError($errormsg,$dbh=false) { if($dbh!=false) OCILogOff($dbh); exit(); } $dbh=OCILogon(weboracle,cyber,); ShowError(Login Error,$dbh); THANX - will fix _NOW_! Regards; Michael -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Fwd: Re: [PHP-DB] OCIFetch performance problem with more rows
On Tue, May 22, 2001 at 09:03:45PM +0200, snpe wrote: -- Forwarded Message -- Subject: Re: [PHP-DB] OCIFetch performance problem with more rows Date: Tue, 22 May 2001 21:02:42 +0200 From: snpe [EMAIL PROTECTED] To: Brian S. Dunworth [EMAIL PROTECTED] On Tuesday 22 May 2001 20:59, you wrote: At 08:49 PM 5/22/01 +0200, snpe wrote: Hello, I have performance problem with OCIFetch (and OCIFetchInto, too) when query return more rows.Same query from sqlplus is more fastest (more rows is worse then less rows) Are the columns you're fetching included in an Oracle index? Without an appropriate index, your SQL statement is probably doing a full table scan, which can be *very* time-consuming... Hello, Indexes aren't problem.I use php and sqlplus with same tables. Sqlplus is faster. by what amount? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Fwd: Re: [PHP-DB] OCIFetch performance problem with more rows
On Wed, May 23, 2001 at 12:21:08PM +0200, Remigiusz Sokolowski wrote: Hello, I have performance problem with OCIFetch (and OCIFetchInto, too) when query return more rows.Same query from sqlplus is more fastest (more rows is worse then less rows) Are the columns you're fetching included in an Oracle index? Without an appropriate index, your SQL statement is probably doing a full table scan, which can be *very* time-consuming... Hello, Indexes aren't problem.I use php and sqlplus with same tables. Sqlplus is faster. by what amount? May be You could try to use OCISetPrefetch - it is not documented, but there is short note at www.php.net from somebody about it. I can say, it speeds things up very much (if You wanna more than 1 row) Btw. anybody knows why it is not documented (I mean hidden in some way) nobody has gotten around documenting it. tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] question about OCIBindByName(add some comment)
On Tue, May 22, 2001 at 09:41:25AM +0900, Michael Cheung wrote: On Mon, 21 May 2001 16:39:05 +0200 Thies C. Arntzen [EMAIL PROTECTED] wrote: On Mon, May 21, 2001 at 11:35:36PM +0900, Michael Cheung wrote: Hi; Linux 2.2.18 + oracle 8.1.7i + php-4.0.5 + oci8 interface. I use the following lines to get a result from database; But It give me result 0, it is incorrect; $sql=Select count(*) From member where email=:email; $sth=OCIParse($dbh,$sql); OCIBindByName($sth,email,$email,64); // with or without ':' is same, and use reference or not is also same here. OCIExecute($sth); OCIFetchInto($sth,$data); have you set $email in your script (before OCIExecute)? I have set the $email before OCIParse(). Is there any problem about the varchar2 data type in bind operation? it works for me - could you send me a _short_ but complete testcase that reproduces your problem? tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] question about OCIBindByName(add some comment)
On Mon, May 21, 2001 at 11:35:36PM +0900, Michael Cheung wrote: Hi; Linux 2.2.18 + oracle 8.1.7i + php-4.0.5 + oci8 interface. I use the following lines to get a result from database; But It give me result 0, it is incorrect; $sql=Select count(*) From member where email=:email; $sth=OCIParse($dbh,$sql); OCIBindByName($sth,email,$email,64); // with or without ':' is same, and use reference or not is also same here. OCIExecute($sth); OCIFetchInto($sth,$data); have you set $email in your script (before OCIExecute)? tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Oracle Database Class
On Mon, May 14, 2001 at 02:19:42PM +0200, jarek wrote: Hi, try this: http://php.weblogs.com/ADODB the PEAR db-abstraction also supports oracle as a database! tc Jarek Neil wrote: Hi All I want to build a site using classes and was wondering is there an Oracle Database class that I can use instead of writing one from scratch. I don't want to use abstraction layers. Can aynone direct me to a place where I can dowload such a class definition? Neil Craig QEDI (Pty) Ltd -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Performance of Stored Procedures ?
On Mon, May 14, 2001 at 02:52:01PM +0200, Robert Boehrs wrote: Hi, i've just made some simple test with oracle and stored procedures. I've used a simple select-statement within the stored procedure and the same query for a direct query within php. The direct query was about 50% faster. Is that normal? Will the stored procedures become faster with more complex queries? this pretty much depends on the code you write. could you send me the code you used for your little benchmark - so i could have a loot at it? tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Oracle 8i + PHP4: character set
On Fri, May 04, 2001 at 03:50:34PM +0200, Stefan Fokuhl wrote: Hello, I do have a little tiny problem with the character set. If I try to insert a word containing an german umlaut by a php-script, Oracle strips the seventh bit. I.e. ä becomes a d. In PHP the SQL statement is written correctly. Facts: 1. I use Oracle 8i. The DB is made with the we8iso8859p1 option. 2. The NLS_LANG is set to GERMAN_GERMANY.WE8ISO8859P1 3. SQLPLUS works fine. make sure to set NLS_LANG _before_ apache gets started (eg in the /etc/init.d/httpd script). tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] ocibindbyname: ORA-01008: not all variables bound
On Thu, Apr 05, 2001 at 12:47:37PM -0400, Joe Brown wrote: Don't have a whole lot of practice with the OCIBindByName function, but I seem to be having success within a recursive select statement. I'm not useing the operator in my implementation. Don't know if that's a good or a bad thing (yet), but it seems to be functioning properly. The third parameter you have -1. I think you want to set it to a legitimate max field length value. -1 is used for LOBs, ROWID and FILENAME parameters, not run of the mill number and varchar2 fields. perhaps: OCIBindByName($parsed,":id",$id,32); //may work better? this is a working sample: ?php $data = array("larry","bill","steve"); $db = OCILogon("scott","tiger"); $stmt = OCIParse($db,"insert into names values (myid.nextval,:name) returning id into :id"); OCIBindByName($stmt,":ID",$id,32); OCIBindByName($stmt,":NAME",$name,32); while (list(,$name) = each($data)) { OCIExecute($stmt); echo "$name got id:$id\n"; } ? re, tc ""Paul Fernandez"" [EMAIL PROTECTED] wrote in message 9ai699$n70$[EMAIL PROTECTED]">news:9ai699$n70$[EMAIL PROTECTED]... Hello, The goal here is to insert a single row, then get a numerical value "id" (generated by the insert trigger) to use in another insert statement. I get, "ORA-01008: not all variables bound" when running this script: ? $query = "insert into table (col1, col2) values ($val1,$val2) returning id into :id"; $parsed = OCIParse($connection,$query); OCIBindByName($parsed,":id",$id,-1); // execute first insert $cursor = OCIExecute($parsed); // construct and execute 2nd insert $query2="insert into table2(id,etc) values (:id, $etc)"; $parsed2 = OCIParse($connection,$query2); $cursor2 = OCIExecute($parsed2); ? It seems so simple. What am I doing wrong? Paul Fernandez -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Can PHP for Oracle randomly access rows in a result set?
On Mon, Mar 19, 2001 at 01:19:44PM +1030, Andrew Halliday wrote: Can PHP for Oracle randomly access rows in a result set? I have read documentation for both Oracle functions (ora_*) and Oracle 8 functions (OCI_*) but cant seem to find a way to randomly access rows in a result set like you can with PostgreSQL or MySQL ... whats the story here?! Are we FORCED to access the result set sequentially with an Oracle database? Is that a restriction of the DB or PHP? that's an oracle restriction. tc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] OCI8 error problems
On Thu, Feb 15, 2001 at 10:07:23AM -0500, Brian Lalor wrote: On Thu, 15 Feb 2001, Thies C. Arntzen wrote: how should it? you would have to pass in the correct statement|connection handle - elsewise it simply won't work! Ok, that was a cobbled-up code snippet; replace $this-conn with $conn, and $statement with $s. It still doesn't work... ? $db = ocilogon('tc','tc'); $stmt = ociparse($db,"insert into uni values (1)"); $success = @ociexecute($stmt); if (! $success) { var_dump(ocierror($stmt)); } ? works for me. tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] OCI8: searching for testcase that causes failed to rollback outstanding transactions or SEGFAULTs
resend cause of type in adress - Forwarded message from "Thies C. Arntzen" [EMAIL PROTECTED] - Date: Sun, 18 Feb 2001 17:26:25 +0100 From: "Thies C. Arntzen" [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: OCI8: searching for testcase that causes "failed to rollback outstanding transactions" or SEGFAULTs User-Agent: Mutt/1.3.15i hi, (sorry for cross-posting) i'm currently investigating some reported problems with the PHP 4 OCI8 interface. some people have reported SEGFAULTs and "failed to rollback outstanding transactions" messages in their apache error_log. sadly i cannot reproduce any of those problems on my machine. i would be very happy to hear of anybody who managed to crash PHP4+OCI8 and who could send me a _SHORT_ testscript that allows me to reproduce (and fix) this problem! regards, tc - End forwarded message - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] OCI8 error problems
On Wed, Feb 14, 2001 at 05:40:02PM -0500, Brian Lalor wrote: Good afternoon, all. Sorry if this has been covered before, but a search of the archives doesn't turn up any relevant answers. I'm having a problem with the OCI8 commands. I'm using PHP 4.0.4pl1 with Oracle 8.0.5 (yes, I know that's old, but somebody seems to have lost the CD for 8.1...). Consider the following code where OCIExecute returns false and PHP spits out the wrning message Warning: OCIStmtExecute: ORA-1: unique constraint (CUSTOM.SYS_C007900) violated ORA-06512: at "CUSTOM.MULT_SHIP_ADDRESS_PKG", line 162 ORA-06512: at line 1 in db.php on line 344 $s = OCIParse($conn, $query) $rc = OCIExecute($s, OCI_COMMIT_ON_SUCCESS); if(!$rc) { $err = OCIError($statement); ^^? if(!$err) { $err = OCIError($this-conn); ^^^? if(!$err) { $err = OCIError(); if(!$err) { print("OCIExecute() returned false, but can't find an error\n"); how should it? you would have to pass in the correct statement|connection handle - elsewise it simply won't work! zc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: AW: AW: [PHP-DB] php, OCI and datatypes
On Thu, Feb 14, 2002 at 04:23:23PM +0100, dsi safir wrote: Ok, thanks all for the advices. The problem is linked with the NLS parameters. Here are my database related param: NLS_LANGUAGE=French NLS_TERRITORY=France NLS_DATE_LANGUAGE= french NLS_DATE_FORMAT = dd/mm/ set NLS_LANG=.WE8ISO8859P1 and you should be all set. tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] How to solve Orcale 8 Error: ORA-01036: illegal variable name/number??
On Tue, Jan 23, 2001 at 04:57:02PM +0800, Koala wrote: Here is the code: $arr_var = Array(); $arr_var[] = Array("KEY"='rec_id', "VALUE"='00', "LENGTH"=-1);\ .. $stmt = OCIParse('DECLARE rec_id NUMBER(20); SELECT recNum INTO rec_id FROM table WHERE recNum= 2 '); .. $num_rows = count($arr_var); for ($i=0; $i$num_rows; $i++) { if (is_array($arr_var[$i])) { OCIBindByName($stmt, $arr_var[$i]['KEY'], $arr_var[$i]['VALUE'], $arr_var[$i]['LENGTH']); } } When it is execute, it return: OCIBindByName: ORA-01036: illegal variable name/number DECLARE is implemented in sqlplus and not part of oracle's SQL - you should be find by just saying: $stmt = OCIParse('SELECT recNum INTO rec_id FROM table WHERE recNum= 2 '); ocibindbyname($stmt,"REC_ID",$rec_id,128); tc -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]