Re: Segmentation Fault with Oracle / oci8.php
| From: | Thies C. Arntzen | Date: | Sat, 08 Dec 2001 09:40:08 +0000 |
| Subject: | Re: Segmentation Fault with Oracle / oci8.php | ||
| References: | 1 2 | Groups: | php.pear.dev php.pear.general |
| Request: | Send a blank email to pear-dev+get-3423@lists.php.net to get a copy of this message | ||
On Fri, Dec 07, 2001 at 10:41:45AM +0100, Bertrand Mansion wrote:
> <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)...
if you send me a short testcase i'll do a proper fix.
the method shown below will cause troube with persistent
connection when a script gets terminated abnormally. your
open transactions will be committed instead of rolled back -
whcih is _NOT_ what you want!!
tc
> >
> > 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 General Mailing List (http://pear.php.net/)
> To unsubscribe, e-mail: pear-general-unsubscribe@lists.php.net
> For additional commands, e-mail: pear-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>