dvd420 Posted December 24, 2008 Share Posted December 24, 2008 Hi Friends, I am developing a web app in PHP/Apache/Win. My prob is, after the database(oracle) transaction is complete, there is either a COMMIT or ROLLBACK as the script ends, depending upon the MODE. Now I don't want this. I am using a persistent connection and I want to prevent this behaviour at the script terminnation. Looking fwd for help. Quote Link to comment https://forums.phpfreaks.com/topic/138300-transition-of-resourcesdatabase-connection-across-pages/ Share on other sites More sharing options...
RussellReal Posted December 24, 2008 Share Posted December 24, 2008 hello, I don't quite understand what you mean.. but, as you may know as php exits, it destroys any resources and variables that has been created so once php exits, you can't share the previous resource with another page.. you just need to re-connect to the database on the next page.. unless you mean share the resource with other pages rthat you are including.. which you shouldn't have a problem with.. Quote Link to comment https://forums.phpfreaks.com/topic/138300-transition-of-resourcesdatabase-connection-across-pages/#findComment-723115 Share on other sites More sharing options...
dvd420 Posted December 24, 2008 Author Share Posted December 24, 2008 Hi Russel, Thanks a lot for the response. I just need to pass the resource variable to the next page. I tried using sessions etc..but no luck. Is there any method, so that I can store it for future use. Or Is there any option by which I can prevent PHP by destroying that resource. Quote Link to comment https://forums.phpfreaks.com/topic/138300-transition-of-resourcesdatabase-connection-across-pages/#findComment-723191 Share on other sites More sharing options...
revraz Posted December 24, 2008 Share Posted December 24, 2008 Have you tried declaring your connection variable as global? Not really sure if it will work or not, I don't use Oracle with PHP. Quote Link to comment https://forums.phpfreaks.com/topic/138300-transition-of-resourcesdatabase-connection-across-pages/#findComment-723194 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.