Boards.ie uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Click here to find out more x
Post Reply  
 
Thread Tools Search this Thread
12-09-2011, 19:49   #1
py2006
Registered User
 
py2006's Avatar
 
Join Date: Apr 2005
Location: I don't know where I am! :(
Posts: 4,751
PHP - where to start?

Hi all,

I want to learn some of the basics of php with mysql. However, I am slightly confused about the installation process.

According to w3schools I need to install php, mysql and apache. But if I am working off my home pc to learn do I not need a separate computer to act as the server?

I know there is software out there that automatically installs all 3 onto your pc and acts as a virtual server (is that right). However, I did attempt that a year or so ago and it was most confusing.

I would like to be able to teach myself some of the basics with some simple interaction with a mysql database both hand coding and using Dreamweaver.

Any advice would be much appreciated.
py2006 is offline  
Advertisement
12-09-2011, 20:21   #2
Neodymium
Registered User
 
Neodymium's Avatar
 
Join Date: Apr 2011
Location: 60
Posts: 176
If your using windows you can download xampp here

When xampp is installed you will have a folder somewhere on your computer called xampp. Inside xampp there is a folder called 'htdocs' this is where you will keep your php files.

When you want to run a file in your browser open up xampp and turn on apache and what ever else you need.

In your browser go to 'localhost/file_name.php' file_name.php is whatever your php file is called, it must be located in the htdocs folder and apache must be running in xampp.
Neodymium is offline  
Thanks from:
12-09-2011, 22:04   #3
py2006
Registered User
 
py2006's Avatar
 
Join Date: Apr 2005
Location: I don't know where I am! :(
Posts: 4,751
Quote:
Originally Posted by Neodymium View Post
If your using windows you can download xampp here

When xampp is installed you will have a folder somewhere on your computer called xampp. Inside xampp there is a folder called 'htdocs' this is where you will keep your php files.

When you want to run a file in your browser open up xampp and turn on apache and what ever else you need.

In your browser go to 'localhost/file_name.php' file_name.php is whatever your php file is called, it must be located in the htdocs folder and apache must be running in xampp.
Thanks for that. I think I tried this before with a similar program but I ended up getting lost. I might try it again and see how I go.

I presume it will work in conjunction with Dreamweaver as well? I have never used dreamweaver for dynamic sites before.
py2006 is offline  
13-09-2011, 02:10   #4
justryan
Registered User
 
justryan's Avatar
 
Join Date: Jun 2009
Location: Dublin
Posts: 2,383
Xampp is great because you get mercury mail server included, handy if you won't to play around with sending mails locally.
justryan is offline  
13-09-2011, 11:20   #5
Neodymium
Registered User
 
Neodymium's Avatar
 
Join Date: Apr 2011
Location: 60
Posts: 176
Quote:
Originally Posted by py2006 View Post
Thanks for that. I think I tried this before with a similar program but I ended up getting lost. I might try it again and see how I go.

I presume it will work in conjunction with Dreamweaver as well? I have never used dreamweaver for dynamic sites before.
I've never used dreamweaver before but it should work once you save your php file in the htdocs folder
Neodymium is offline  
Advertisement
13-09-2011, 13:33   #6
Webmonkey
Registered User
 
Webmonkey's Avatar
 
Join Date: Mar 2003
Location: Dublin
Posts: 9,695
From what I remember I think you can connect dreamweaver to the web server so when you preview it will go via the web server and not just open the PHP file in a browser.
Webmonkey is offline  
13-09-2011, 19:58   #7
Malice
Registered User
 
Malice's Avatar
 
Join Date: Aug 2004
Location: Galway
Posts: 14,371
Send a message via Skype™ to Malice
I realise I may end up confusing things but I might as well chip in. Feel free to dismiss what I write because I haven't worked with PHP directly in a few years.
Quote:
Originally Posted by py2006 View Post
According to w3schools I need to install php, mysql and apache.
Strictly speaking you don't need Apache, you can run PHP and MySQL on IIS which might be easier if you're used to that. Having said that, most tutorials and documentation will assume you're running Apache and some stuff, like mod_rewrite, doesn't have a direct equivalent in IIS. Basically stick to one stop shops like the aforementioned XAMP or the one I used, WAMP unless you've got a good reason to use IIS .

Quote:
Originally Posted by py2006
But if I am working off my home pc to learn do I not need a separate computer to act as the server?
Nope, your home PC can function as both at the same time.

Quote:
Originally Posted by py2006
I know there is software out there that automatically installs all 3 onto your pc and acts as a virtual server (is that right). However, I did attempt that a year or so ago and it was most confusing.
Installing XAMP or WAMP or even all three packages manually can be quite daunting but it's a useful learning exercise. Once you get stuff working make notes so that if/when you repeat the process you will know what to do.

Quote:
Originally Posted by py2006 View Post
I presume it will work in conjunction with Dreamweaver as well? I have never used dreamweaver for dynamic sites before.
If there's no specific reason for you to use Dreamweaver, I'd start out with a simple text editor otherwise you're going to be learning Dreamweaver on top of the stuff you're actually trying to learn which could complicate things.
Malice is offline  
Thanks from:
14-09-2011, 13:23   #8
py2006
Registered User
 
py2006's Avatar
 
Join Date: Apr 2005
Location: I don't know where I am! :(
Posts: 4,751
Thanks for that. I am already fairly offay with Dreamweaver so it shouldn't be too much of a problem.
py2006 is offline  
Post Reply

Quick Reply
Message:
Remove Text Formatting
Bold
Italic
Underline

Insert Image
Wrap [QUOTE] tags around selected text
 
Decrease Size
Increase Size
Please sign up or log in to join the discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search