Re: [PHP-DB] Re: PHP crashing with using Oracle (SOLVED... well, sorta)

2003-07-07 Thread Reuben D. Budiardja
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.

Thanks for everyone who's helped.

RDB


On Monday 07 July 2003 09:44 am, Reuben D. Budiardja wrote:
> [Cross posting to PHP-DEV, sorry if this is inappropriate, but this maybe a
> bug]
>
> On Saturday 05 July 2003 05:28 pm, Reuben D. Budiardja wrote:
> > Hello,
> > I installed PHP-4.3.2 with oci8 and oracle support (using --with-oci8
> > --with-oracle).
> > I recompile apache-1.3.27 to use the libpthread as mentioned here:
> > http://ww.php.net/oci8
> >
> > Now, I got crashes when using oracle with php. In my apache error logs, I
> > get:
> >
> > [Sat Jul  5 17:24:28 2003] [notice] child pid 17496 exit signal
> > Segmentation fault (11)
> > [Sat Jul  5 17:24:29 2003] [notice] child pid 17558 exit signal
> > Segmentation fault (11)
> >
> > and the application would just do nothing (I tried reload, submit, etc).
> >
> > if this happens, the only way I can fix it is by restarting apache. Could
> > anyone give me pointer what's going on here  and how to fix it?
> >
> > In case this matters, the Oracle 9i DB server is also in the same box.
> > Somehow it has it's own Apache, but I don't use that.
> >
> > Thanks for any help.
> > RDB
>
> Replying to mysef:
>
> Seems that I narrow this problem down to the OCI8 extension. Using the same
> database and configuration and all, I recompile PHP with the extension
> --with-oracle, and instead using OCI8 functions, I use the oracle functions
> analogous to the oci8.
>
> And so far it has not crashed yet. Is there a known problem with OCI8 with
> the most recent PHP distribution ?
>
> Next, I think I am going to try using older PHP versions. I have used PHP
> with OCI8 before with older release (although I was not the one who
> compiled it), so this is really puzzling and frustrating to me.
>
> Thanks for any suggestions
>
> Reuben D. Budiardja

-- 
Reuben D. Budiardja
Department of Physics and Astronomy
The University of Tennessee, Knoxville, TN
-
/"\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format  
 X   attachments.
/ \
-
Have you been used by Microsoft today? 
Choose your life. Choose freedom. 
Choose LINUX.
-


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



[PHP-DB] Re: PHP crashing with using Oracle

2003-07-07 Thread Reuben D. Budiardja
[Cross posting to PHP-DEV, sorry if this is inappropriate, but this maybe a 
bug]

On Saturday 05 July 2003 05:28 pm, Reuben D. Budiardja wrote:
> Hello,
> I installed PHP-4.3.2 with oci8 and oracle support (using --with-oci8
> --with-oracle).
> I recompile apache-1.3.27 to use the libpthread as mentioned here:
> http://ww.php.net/oci8
>
> Now, I got crashes when using oracle with php. In my apache error logs, I
> get:
>
> [Sat Jul  5 17:24:28 2003] [notice] child pid 17496 exit signal
> Segmentation fault (11)
> [Sat Jul  5 17:24:29 2003] [notice] child pid 17558 exit signal
> Segmentation fault (11)
>
> and the application would just do nothing (I tried reload, submit, etc).
>
> if this happens, the only way I can fix it is by restarting apache. Could
> anyone give me pointer what's going on here  and how to fix it?
>
> In case this matters, the Oracle 9i DB server is also in the same box.
> Somehow it has it's own Apache, but I don't use that.
>
> Thanks for any help.
> RDB

Replying to mysef:

Seems that I narrow this problem down to the OCI8 extension. Using the same 
database and configuration and all, I recompile PHP with the extension 
--with-oracle, and instead using OCI8 functions, I use the oracle functions 
analogous to the oci8.

And so far it has not crashed yet. Is there a known problem with OCI8 with the 
most recent PHP distribution ?

Next, I think I am going to try using older PHP versions. I have used PHP with 
OCI8 before with older release (although I was not the one who compiled it), 
so this is really puzzling and frustrating to me.

Thanks for any suggestions

Reuben D. Budiardja




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



Re: [PHP-DB] Re: PHP crashing with using Oracle

2003-07-07 Thread Reuben D. Budiardja
On Monday 07 July 2003 08:47 am, you wrote:
> HI,
> how many memory is on your server?
>
> I had the same problem...
> when I incrased memory in the computer, it was working well...
>

I have 1 GB RAM and 2 GB Swap. I thought that should be enough for development 
box. Here is the output of free:

[EMAIL PROTECTED] reubendb]$ free
 total   used   free sharedbuffers cached
Mem:   1023152 388628 634524  0  24912 274596
-/+ buffers/cache:  89120 934032
Swap:  20971366202096516


Thanks.
RDB


>
> -Original Message-
> From: Reuben D. Budiardja [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 07, 2003 2:18 PM
> To: Lang Sharpe; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Re: PHP crashing with using Oracle
>
> On Sunday 06 July 2003 07:40 pm, Lang Sharpe wrote:
> > I had to change ext/oci8/config.m4
> > Remove the line highlighted in red on this page.
>
> http://cvs.php.net/diff.php/php-src/ext/oci8/config.m4?login=2&r1=1.37.2.6&;
>
> >r2=1.37.2.7&ty=h
> >
> > The line is
> > AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ])
> >
> > Then do configure/make/make install again. That will get the oci8 support
> > to work. I haven't tried the oracle functions.
>
> Thanks for the reply.
> I tried what you suggested, but it still does not work. It will work
> initially, but after that, it will keep crashing again after about 4-5
> reload.
>
> I am really frustrated here and don't know what to try next. This is so
> strange.
>
> RDB
>
> > Lang
> >
> > Reuben D. Budiardja wrote:
> > > Hello,
> > > I installed PHP-4.3.2 with oci8 and oracle support (using --with-oci8
> > > --with-oracle).
> > > I recompile apache-1.3.27 to use the libpthread as mentioned here:
> > > http://ww.php.net/oci8
> > >
> > > Now, I got crashes when using oracle with php. In my apache error logs,
>
> I
>
> > > get:
> > >
> > > [Sat Jul  5 17:24:28 2003] [notice] child pid 17496 exit signal
> > > [Segmentation
> > > fault (11)
> > > [Sat Jul  5 17:24:29 2003] [notice] child pid 17558 exit signal
> > > [Segmentation
> > > fault (11)
> > >
> > > and the application would just do nothing (I tried reload, submit,
> > > etc).
> > >
> > > if this happens, the only way I can fix it is by restarting apache.
>
> Could
>
> > > anyone give me pointer what's going on here  and how to fix it?
> > >
> > > In case this matters, the Oracle 9i DB server is also in the same box.
> > > Somehow it has it's own Apache, but I don't use that.
> > >
> > > Thanks for any help.
> > > RDB

-- 
Reuben D. Budiardja
Department of Physics and Astronomy
The University of Tennessee, Knoxville, TN
-
/"\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format  
 X   attachments.
/ \
-
Have you been used by Microsoft today? 
Choose your life. Choose freedom. 
Choose LINUX.
-


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



Re: [PHP-DB] Re: PHP crashing with using Oracle

2003-07-07 Thread Reuben D. Budiardja
On Sunday 06 July 2003 07:40 pm, Lang Sharpe wrote:
> I had to change ext/oci8/config.m4
> Remove the line highlighted in red on this page.
>
> http://cvs.php.net/diff.php/php-src/ext/oci8/config.m4?login=2&r1=1.37.2.6&;
>r2=1.37.2.7&ty=h
>
> The line is
> AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ])
>
> Then do configure/make/make install again. That will get the oci8 support
> to work. I haven't tried the oracle functions.

Thanks for the reply.
I tried what you suggested, but it still does not work. It will work 
initially, but after that, it will keep crashing again after about 4-5 
reload.

I am really frustrated here and don't know what to try next. This is so 
strange.

RDB




> Lang
>
> Reuben D. Budiardja wrote:
> > Hello,
> > I installed PHP-4.3.2 with oci8 and oracle support (using --with-oci8
> > --with-oracle).
> > I recompile apache-1.3.27 to use the libpthread as mentioned here:
> > http://ww.php.net/oci8
> >
> > Now, I got crashes when using oracle with php. In my apache error logs, I
> > get:
> >
> > [Sat Jul  5 17:24:28 2003] [notice] child pid 17496 exit signal
> > [Segmentation
> > fault (11)
> > [Sat Jul  5 17:24:29 2003] [notice] child pid 17558 exit signal
> > [Segmentation
> > fault (11)
> >
> > and the application would just do nothing (I tried reload, submit, etc).
> >
> > if this happens, the only way I can fix it is by restarting apache. Could
> > anyone give me pointer what's going on here  and how to fix it?
> >
> > In case this matters, the Oracle 9i DB server is also in the same box.
> > Somehow it has it's own Apache, but I don't use that.
> >
> > Thanks for any help.
> > RDB

-- 
Reuben D. Budiardja
Department of Physics and Astronomy
The University of Tennessee, Knoxville, TN
-
/"\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format  
 X   attachments.
/ \
-
Have you been used by Microsoft today? 
Choose your life. Choose freedom. 
Choose LINUX.
-


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



[PHP-DB] PHP crashing with using Oracle

2003-07-05 Thread Reuben D. Budiardja

Hello,
I installed PHP-4.3.2 with oci8 and oracle support (using --with-oci8 
--with-oracle).
I recompile apache-1.3.27 to use the libpthread as mentioned here:
http://ww.php.net/oci8

Now, I got crashes when using oracle with php. In my apache error logs, I get:

[Sat Jul  5 17:24:28 2003] [notice] child pid 17496 exit signal Segmentation 
fault (11)
[Sat Jul  5 17:24:29 2003] [notice] child pid 17558 exit signal Segmentation 
fault (11)

and the application would just do nothing (I tried reload, submit, etc). 

if this happens, the only way I can fix it is by restarting apache. Could 
anyone give me pointer what's going on here  and how to fix it?

In case this matters, the Oracle 9i DB server is also in the same box. Somehow 
it has it's own Apache, but I don't use that.

Thanks for any help.
RDB

-- 
Reuben D. Budiardja


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



Re: [PHP-DB] Re: OCI_ASSOC returns key with upper case string

2003-07-05 Thread Reuben D. Budiardja
On Friday 04 July 2003 10:23 pm, Manuel Lemos wrote:
> Hello,
>
> On 07/04/2003 08:38 PM, Reuben D. Budiardja wrote:
> > First let me say that I am not sure if this is PHP problem or Oracle. I
> > posted this earlier in php-general, but after looking at the available
> > mailing lists again, I thought this forum would be more appropriate.
> > Sorry if someone get double post.
 >
> > Now, pg_fetch_assoc and mysql_fetch_assoc return the associate array with
> > the key in lower case. But ocifetchinto returns the key in UPPER case. So
> > this discrepancy makes my code not as portable as I would like it.
> > Is this PHP problem or Oracle config problem?
>
> No, that is just the way Oracle returns column names. 

Thanks for your reply.

Do you or anyone know if there is something in the configuration of Oracle 
that can be changed for it to return lower case column?

I read in the book Oracle 9i Complete Reference that oracle can use mixed case 
column and table name, but haven't found the "how to do it" yet.

I'd rather do that than converting all my apps. The problem is we're supposed 
to write for mysql, but then client change their mind and use Oracle.

Sorry if this is a bit OT. Thanks for any help.
RDB 


> It is not possible
> to provide a portable solution to return row in associative arrays
> because not only the column names case may be mapped, removed the table
> names or even have the column names truncated.
>
> That is the reason why Metabase never provided a function to return rows
> as associative arrays, as Metabase is focused on real database
> application portability.
>
> http://www.phpclasses.org/metabase

-- 
Reuben D. Budiardja
Department of Physics and Astronomy
The University of Tennessee, Knoxville, TN
-
/"\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format  
 X   attachments.
/ \
-
Have you been used by Microsoft today? 
Choose your life. Choose freedom. 
Choose LINUX.
-


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



[PHP-DB] OCI_ASSOC returns key with upper case string

2003-07-04 Thread Reuben D. Budiardja

Hello,
First let me say that I am not sure if this is PHP problem or Oracle. I posted 
this earlier in php-general, but after looking at the available mailing lists 
again, I thought this forum would be more appropriate. Sorry if someone get 
double post. 

I have a class that contains API for using postgresql, mysql, or oracle 
database so switching database should be "in theory" just changing an 
argument for me. 
To make this sort, let just say that the return of a SELECT statement is 
always in associative array, using either :
"pg_fetch_assoc" for pgsql
"mysql_fetch_assoc" for mysql
"ocifetchinto" with OCI_ASSOC flag for Oracle 9

Now, pg_fetch_assoc and mysql_fetch_assoc return the associate array with the 
key in lower case. But ocifetchinto returns the key in UPPER case. So this 
discrepancy makes my code not as portable as I would like it. 
Furthermore, the example here:
http://us2.php.net/manual/en/function.ocifetchinto.php

doesn't even work, because it uses lower case as the associative array key.

Why is this the case? Is this PHP problem or Oracle config problem? Either 
way, can anyone suggest a solutions? Of course I can do all kind of array 
manipulation in my API to make the key lower case, but that wouldn't be very 
elegant and efficient

Thanks in advance for any help.
RDB
-- 
Reuben D. Budiardja
-
/"\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format  
 X   attachments.
/ \
-
Have you been used by Microsoft today? 
Choose your life. Choose freedom. 
Choose LINUX.
-


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