473,387 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Keep DB Connection Alive

Hello, I have a connection to a mysql server on my website that I would like
to keep "alive" from when a user first goes to a page that requires the
connection until they close the website

How is it possible to set this up? I do not wish to keep creating the
connection everytime I wish to execute a query.

Thank you
Angus
Jul 17 '05 #1
4 3055

Angus SC2 <a@b.com> wrote in message news:31*************@individual.net...
Hello, I have a connection to a mysql server on my website that I would like to keep "alive" from when a user first goes to a page that requires the
connection until they close the website

How is it possible to set this up? I do not wish to keep creating the
connection everytime I wish to execute a query.

Thank you
Angus


Check out mysql_pconnect()

Anthony
Jul 17 '05 #2

"Anthony Papillion II" <ad*****@gmail.com> wrote in message
news:1102393469.8b7d360322c5d16ff32395c49501943e@t eranews...

Check out mysql_pconnect()

Anthony


Ok, thanks, but I did something pretty stupid in the last post and just said
it was a mysql connection so that more people could associate with it, in
fact I am using the Php/java stuff (http://uk.php.net/java) and wish to keep
the JVM alive throughout the session, any ideas?

Thanks
Angus
Jul 17 '05 #3
In article <31*************@individual.net>, "Angus SC2" <a@b.com>
wrote:
"Anthony Papillion II" <ad*****@gmail.com> wrote in message
news:1102393469.8b7d360322c5d16ff32395c49501943e@t eranews...

Check out mysql_pconnect()

Anthony


Ok, thanks, but I did something pretty stupid in the last post and just said
it was a mysql connection so that more people could associate with it, in
fact I am using the Php/java stuff (http://uk.php.net/java) and wish to keep
the JVM alive throughout the session, any ideas?

Thanks
Angus


I think you're mixing technologies here. Java is meant to connect with
a running server that stays up and maintains state information. php
doesn't work that way. Typically, Apache runs a thread that interpets
the php code, produces the output, then exits. No state information is
kept from invocation to invocation. They're completely different in how
they work.

Reading the page you posted describes several ways of working with Java
and php. Have you contacted the development teams for them and asked
your question? What you're trying to do doesn't seem to be on their
radar.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #4
"Angus SC2" <a@b.com> wrote in message
news:31*************@individual.net...
Hello, I have a connection to a mysql server on my website that I would like to keep "alive" from when a user first goes to a page that requires the
connection until they close the website

How is it possible to set this up?
It's not possible. I do not wish to keep creating the
connection everytime I wish to execute a query.


Your problem is not I suspect creating a connection as latency on LAMP
systems tends to be very low but data persistance.

Try reading up on sessions.
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John | last post by:
Hi I am using the Internet Transfer Control as follows; strData = "Some data" strHeaders = "Content-Type: application/x-www-form-urlencoded" & vbCrLf objInet.Execute strURL, "POST",...
0
by: John | last post by:
Hi I am trying to use the internet transfer control to send some data to a site. I want my MS ISA proxy server to keep the connection alive. What syntax should I use to send the 'keep alive'...
15
by: nephish | last post by:
hey there, i have a script that waits for message packets from a data server over a socket. it goes a little like this: while 1: x+=1 databack = sockobj.recv(158) if databack:
7
by: mail747097 | last post by:
I would like to keep IIS alive on my web site and prevent Application_End from occuring in global.asax. Any ideas?
6
by: TheSteph | last post by:
Hi, (using C#, VS2005, .NET 2.0.) I sometimes need to access my database (SQL Server) in SINGLE_USER mode.
0
by: Ramchandar | last post by:
In my aspx page i want the lot of informations to be filled by the user. But wen the user takes some break to fill the form n resumes after some time the page gets expired. So to keep the session...
5
by: vieraci | last post by:
Hi, I'm wanting to start a database connection at the start of an app and keep it open for all methods and classes that I'm #including in my project. First I went about it by creating the...
0
by: kalla ss | last post by:
I have craete a vb.net window application using soap web services. There is a module in my app. which runs every 2.5 sec (on timer tick event). On each tick event of timer this module call a web...
0
by: Colin Rodrigues | last post by:
string strURL = (Request.IsSecureConnection ? "https://website.com/Transaction.asmx" : "http://website.com/wTransaction.asmx"); string strCommand = clsMisc.strGetDataFromPage(this, "c", "",...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.