Board index   FAQ   Search  
Register  Login
Board index php forum :: php and mysql Web Hosting Hosting - Shared and Dedicated server Solutions

What is the procedure??

Where may I host my php/mysql web site ?

Moderators: macek, egami, gesf

What is the procedure??

Postby Vince1907 » Wed Jun 30, 2004 12:53 am

I have been working locally with PHP-MySQL since 3 months and there is no problem while working locally this is great..But i wonder about how procedure will be when i pay to a hosting company and publish my site on the net..They will just give a database and PHP-MySQL installation will be on their machine so I will not have the option to choose my own programming preferences??

And i wonder where I can store session information if i dont want to store it on the mysql database.İsn't that something set from php.ini file??

While working locally i use the path C:/windows/temp for the session data for example but i cannot imagine a solution for the other side(when publishing my site on the net)?

Any comments will help thanks for your consideration..
Vince1907
New php-forum User
New php-forum User
 
Posts: 10
Joined: Wed Mar 17, 2004 3:20 am

Postby swirlee » Wed Jun 30, 2004 8:08 am

This depends largely on the host. There are many different hosts with many different options, so chances are very good you'll find something that fits you. Some hosts even offer you the option of Linux (or BSD) / PHP / MySQL versus Windows / ASP.NET / MSSQL.

With PHP, you have the choice to keep your database wherever you want, since you can connect to any database with an IP address. But you'd be crazy not to go with a database hosted by your hosting provider, because of latency (you want your MySQL machine on the same LAN as your Apache machine).

Concerning session data, this is a very good concern, since in a shared hosting environment it may be possible for another client on the same machine to access your data. You should discuss this with your hosting provider. If it's financially feasable, you should get a dedicated machine, but this isn't always possible and the setup fees are usually quite large.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby Vince1907 » Thu Jul 01, 2004 1:42 am

May they be assigning a directory to everyone in their own account(web space) to hold their session data?So my sessions will be saved on a directory in my web space?I mean could including something like below to the webserver configuration for each user be possible?

<Directory "/vince1907/">
php_value session.save_handler file
php_value session.save_path /vince1907/temp/
php_value session.name PHPSESSID
</Directory>

Another point,you say you can keep your database aynwhere so I can have it on my webspace?But then am I also supposed to setup mysql or is it something provided by the hosting provider and I am just supposed to put the files related to my database to my web space?

How mysql_connect(“localhost”,”username”,”password”) will change in that case?I am a bit confused.
Vince1907
New php-forum User
New php-forum User
 
Posts: 10
Joined: Wed Mar 17, 2004 3:20 am

Postby swirlee » Thu Jul 01, 2004 8:40 am

Vince1907 wrote:May they be assigning a directory to everyone in their own account(web space) to hold their session data?


This depends on your host. You'll have to contact them about it.

Another point,you say you can keep your database aynwhere so I can have it on my webspace?But then am I also supposed to setup mysql or is it something provided by the hosting provider and I am just supposed to put the files related to my database to my web space?

How mysql_connect(“localhost”,”username”,”password”) will change in that case?I am a bit confused.


MySQL is a server, just like any other server. When you say "localhost" you're saying "connect to the MySQL server on this machine". Most good hosting packages provide you with a MySQL database, but it may be running on a different machine on the hosting provider's network. Your hosting provider will tell you what address the MySQL server resides at, and you put that address in your code.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby Vince1907 » Thu Jul 01, 2004 11:28 pm

MySQL is a server, just like any other server. When you say "localhost" you're saying "connect to the MySQL server on this machine". Most good hosting packages provide you with a MySQL database, but it may be running on a different machine on the hosting provider's network. Your hosting provider will tell you what address the MySQL server resides at, and you put that address in your code.


What if I want to use my own database?Is it possible to connect to MySQL server from the address they will tell to me but use a MySQL database from my web space?
Vince1907
New php-forum User
New php-forum User
 
Posts: 10
Joined: Wed Mar 17, 2004 3:20 am

Postby swirlee » Fri Jul 02, 2004 6:50 am

Vince1907 wrote:What if I want to use my own database?Is it possible to connect to MySQL server from the address they will tell to me but use a MySQL database from my web space?


Yes, but it's a very bad idea. If your web server is not on the same LAN as your MySQL server, you're going to have serious latency problems. Use the database that your host provides you with. It will be faster and more reliable, and there aren't any advantages to hosting it yourself over letting them host it.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby Vince1907 » Fri Jul 02, 2004 11:47 pm

swirlee wrote:
Yes, but it's a very bad idea. If your web server is not on the same LAN as your MySQL server, you're going to have serious latency problems. Use the database that your host provides you with. It will be faster and more reliable, and there aren't any advantages to hosting it yourself over letting them host it.


Hmm, Ok thanks..As a last question(I hope so :-? ) I want to ask php myadmin?Can I setup it on my own or should I ask to the hosting provider to setup it for me?
Vince1907
New php-forum User
New php-forum User
 
Posts: 10
Joined: Wed Mar 17, 2004 3:20 am

Postby swirlee » Sat Jul 03, 2004 8:52 am

You should be able to set it up on your own, but many hosts have it pre-installed.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back


Return to Hosting - Shared and Dedicated server Solutions

Who is online

Users browsing this forum: No registered users and 0 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.