DeepOne Posted March 4, 2007 Share Posted March 4, 2007 Hi, is there any way of creating a kind of persistent user session to Oracle? I mean, pconnect/plogon has obviously nothing to do with real sessions: when my script finishes, all not commited changes are lost immediately (while that persistent connection using my username/password still stays open) - why?! Can one switch this auto-rollback off? I guess not. Unlike most other databases, Oracle is best-suited for making lots of changes/executing lots of statements and commiting them all at the end - and if I understand it right, it's impossible with PHP. And I just don't understand why: If it's possible to reuse an existing connection, why is there still no way to create a real dedicated persistent connection that could be reused by every call of a script using the same username/password? (I'd like to e.g. issue an INSERT in the first call and COMMIT in the second...) I tried to google for it, but everyone seems to be interested in commiting every single statement as soon as possible - like I said, it's just fine for most other DBs (MySQL, Postgre), but not for Oracle - so I didn't find anything useful. Sorry for my poor english. Quote Link to comment https://forums.phpfreaks.com/topic/41159-persistent-session-phporacle/ Share on other sites More sharing options...
gluck Posted April 5, 2007 Share Posted April 5, 2007 I don't understand you issue but if you have auto commit on you would not need to commit any transactions. Normally that is the case and at time the Database abstraction layer takes care of that. Quote Link to comment https://forums.phpfreaks.com/topic/41159-persistent-session-phporacle/#findComment-222547 Share on other sites More sharing options...
Feenix566 Posted July 3, 2007 Share Posted July 3, 2007 Run oci_commit() at the end of your PHP script. Keeping a persistent connection alive from within a web server is not an ideal solution, given the request/response nature of HTTP. Quote Link to comment https://forums.phpfreaks.com/topic/41159-persistent-session-phporacle/#findComment-288892 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.