login community faq

I have web321 server. I want to use mysql_pconnect connection string for my mysql database. If increasing number of connections is not possible it's okey for me but i need persistent mysql conection. Can i do so?

Thanks in advance.

asked Oct 17 '12 at 07:17

Vish's gravatar image

Vish
1


Hi,

Yes, persistent connections are allowed.

answered Oct 17 '12 at 07:54

todork's gravatar image

todork
10964

First of all thanks a lot for your reply. I am not able to use persistent connection. The table that i am using is a temporary table and table type is MEMORY. When the page loads i create a table using statement CREATE TEMPORARY TABLE

[columns]) ENGINE = MEMORY or MYISAM. It works fine first time when the page loads but when i try to query same table through ajax on button click i get mysql error 'table<xyz> dosen't exist'. I believe it is related to mysql connection because it breaks?? or it is something related to PHP?

Your help will be greatly appreciated.

Regards.

(Oct 17 '12 at 10:05) Vish Vish's gravatar image

If you're using PHP with the shared Apache instance, this probably won't work since PHP is working as CGI. With CGI, every new request is launched in its own process, so the information from the previous request (process) is destroyed.

In other words, using persistent connections over CGI is pointless, as those connections don't actually persist. If you want to use PHP with persistent connections, you would have to install your own web server (for example, Apache with mod_php) and use that instead of the shared Apache.

(Oct 17 '12 at 10:12) todork todork's gravatar image

That make sense. So should i ask webfaction if they can have apache module enabled for my account? Is it possible to do it per connection basis? Thanks for your help.

(Oct 18 '12 at 03:51) Vish Vish's gravatar image

Sorry, we don't have PHP as an Apache module running on the shared Apache instance. You'd have to build your own Apache for this.

(Oct 18 '12 at 04:34) todork todork's gravatar image

Okey i got it. Please tell me if it will be a long and hard process to build apache from the source on webfaction server? will i have to build php5 and mysql from the source and connect them to apache again with all the configuration options for each libraries? What other libraries will i have to install with apache? Currently I have two websites on webfaction server, will this change affact all of them? i just want apache with mode_php for only one website & not for other. Can you please provide me any doc how to do this or any help?

It seems to be long process!!!

(Oct 18 '12 at 05:27) Vish Vish's gravatar image

Hi again,

Actually, you might be able to use the Apache server that is already installed, and just build mod_php in your account. You can then start the server using "/usr/sbin/httpd -f ~/httpd.conf" to specify your own config file for the Apache server. It is not a very straightforward process, so if you run into any troubles, feel free to open a ticket at our support site.

(Oct 18 '12 at 05:31) todork todork's gravatar image
showing 5 of 6 show all
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×116
×6
×1
×1

Asked: Oct 17 '12 at 07:17

Seen: 359 times

Last updated: Oct 18 '12 at 05:31

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited