1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP database website without server?

Discussion in 'HTML, Graphics & Programming' started by rudeboymcc, 16 Feb 2006.

  1. rudeboymcc

    Wise Guy

    Joined: 21 May 2003

    Posts: 1,008

    Hi. I'm plannign on building a php website using a database which will ahve to be constantly updated. i was hoping i could upload everything to the domain but every tutorial i have read about php says to use a webserver on your computer.

    is this the only option? or can i later move everything to the domain (i haven't bought it yet).just i don't trust my computer. firstly it doesn't have a static ip address. the internet is provided by talktalk and so is on and off. and it's quite old and maybe prone to failure.
     
  2. Al Vallario

    Mobster

    Joined: 3 Aug 2005

    Posts: 4,534

    Location: UK

    Install some web server software such as XAMPP for testing on your local machine. When you have everything how you want it, you will have to upload the files to some web space (with PHP/database support, but 99.9% of hosts fit that criteria), create the database on the server and add whatever information you require to the database.

    A domain name alone cannot host a website; it just points to the IP address of your web server. You will need some web space to point the domain to :)
     
  3. Dj_Jestar

    Caporegime

    Joined: 18 Oct 2002

    Posts: 29,065

    Location: Back in East London

    The 3rd factor is that most home ISP's no longer allow their users to run servers on home lines.
     
  4. rudeboymcc

    Wise Guy

    Joined: 21 May 2003

    Posts: 1,008

    well the tutorial told me to install apache with mysql and php. is apache jsut a different company to xampp but do they so the same thing?

    so after i've finished the website, i just upload all the files in the apache htdocs directory (this is where the files i can see at http://localhost/ are) to some webspace which i have to buy later, and then i buy a domain name which simply points to the webspace.

    that right?
     
  5. Dj_Jestar

    Caporegime

    Joined: 18 Oct 2002

    Posts: 29,065

    Location: Back in East London

    XAMPP is a pre-made package that contains all 3 of Apache, MySQL and PHP (amongst other things AFAIK)

    I prefer to install seperately myself, because I am a control freak when it comes to my machine(s).
     
  6. rudeboymcc

    Wise Guy

    Joined: 21 May 2003

    Posts: 1,008

    JESUS you serious? i've just spent the past hour trying to set those three up and it still doesn't work.
     
  7. robjf

    Mobster

    Joined: 31 Oct 2003

    Posts: 4,564

    Location: Derby, UK

    XAMPP is great, the package installs, and everything just works.
     
  8. Beansprout

    Man of Honour

    Joined: 31 Jan 2004

    Posts: 16,316

    Location: Plymouth

    You can run a PHP/MySQL setup wherever you like, and move it to wherever you like.

    But if you run it locally then that saves needing to re-upload files every time you edit them :)
     
  9. Thrash

    Hitman

    Joined: 2 Aug 2004

    Posts: 564

    Location: Adelaide

    Another vote for XAMPP here, extremely easy to set up, has everything you will need to develop your own php/mysql site and increases productivity as you are not constantly FTP'ing to a remote site.
     
  10. tolien

    Caporegime

    Joined: 16 May 2003

    Posts: 25,368

    Location: ::1

    Not totally true.
    Only a handful block it, virtually none will kick you for it, and it's irrelevant if it's only being used for dev work (ie not intended for masses of outside folks to look at).
     
  11. Diskbox

    Wise Guy

    Joined: 18 Oct 2002

    Posts: 1,413

    Location: Brisbane, Australia

    if i`m using sessions right i need to create a temp folder on local apache server dont i, i tried that once before, but they didnt wokr all the time, so i stick with webserver for most testing, cos it just works on there.
     
  12. Dj_Jestar

    Caporegime

    Joined: 18 Oct 2002

    Posts: 29,065

    Location: Back in East London

    No, you don't. The temp directory for session data is defined in php.ini, along with the other session data directives such as method of storage (session data can be stored on DB tables if you wish)