AW: [PEAR-DEV] Re: [PEAR] Segmentation Fault with Oracle / oci8.php
| From: | Karsten Kraus | Date: | Fri, 07 Dec 2001 16:35:37 +0000 |
| Subject: | AW: [PEAR-DEV] Re: [PEAR] Segmentation Fault with Oracle / oci8.php | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-580@lists.php.net to get a copy of this message | ||
Hi Betrand,
yippie!!
It worked!
All segmentation faults are gone for good! and the scripts seem to run way
faster...
(but that may be the relief, that everything runs like excepted right now)
Another question: what impact do includes/requires have on execution speed?
This was the other thing i changend besides altering oci8.c - removing
/changing
many requires/includes.
Thanks for the tip! (if the segfaults start again, i'll tell you *g*)
Karsten
-----Ursprüngliche Nachricht-----
Von: Bertrand Mansion [mailto:bmansion@mamasam.com]
Gesendet: Freitag, 7. Dezember 2001 10:42
An: Karsten Kraus; pear-general@lists.php.net; pear-dev@lists.php.net
Betreff: [PEAR-DEV] Re: [PEAR] Segmentation Fault with Oracle / oci8.php
<Karsten.Kraus@web.de> wrote :
> Hi list,
>
> perhaps on of you can help me to solve this:
>
> i'm using php 4.0.6 with apache 1.3.19 on linux (kernel 2.2.1x).
> When I turn off autocommit, and try doing an insert statement
> (which could have an error, but that shouldn't be the problem)
> with simple_query, php hangs when it tries to do OCIExecute($sql,
> OCI_DEFAULT)...
>
> Now I'm not sure what EXACTLY i am doing wrong, 'cause without it seems to
> work (more) properly.
> I still get seg faults quite often, but at least the script runs and shows
> output and segfaults
> only on exit, it seems.
>
> Anyone any idea?
> (I did google about that segfault thingie and found some posts to this
list
> from betrand on nov, 6.
> but couldn't find any answers to them yet)
Here was my solution :
I changed the code of oci8.c '_oci_conn_list_dtor' function in the php
extensions directory.
if (connection->pServiceContext) {
/* connection->error =
OCITransRollback(connection->pServiceContext,
connection->pError,
(ub4)0);
if (connection->error) {
oci_error(connection->pError, "failed to rollback outstanding
transactions!", connection->error);
}
*/
OCIHandleFree((dvoid *) connection->pServiceContext, (ub4)
OCI_HTYPE_SVCCTX);
I commented the code which was trying to rollback transactions when there
was none. Pretty strange logic... Maybe there is something I did not get as
I did not study all the code, but it seems to work better now. Does not make
apache process crash anymore.
As I said before, that was what was happening when I used exit function in
my scripts. No matter which version of Oracle, on Suse 7.2 and RedHat 6.
If it works for you, give us some feedback. Thanks.
Bertrand Mansion
Mamasam
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, e-mail: pear-dev-unsubscribe@lists.php.net
For additional commands, e-mail: pear-dev-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net