UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > Tutorials / How to?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-12-2007, 17:26
MonteJon's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Cheshire/London
Posts: 117
Default Learn PHP/MySQL

Hi All,
I want to start learning how to use the PHP Admin and MySQL options on my CP but am not sure where to start first.
I have a basic understanding of HTML and CSS but appreciate this is a whole new ball-game.
Should I make a new domain for myself to use for practice purposes so that I don't mess up any existing files ?
I'd appreciate any help please ?
Thanks and a Merry Christmas to all !
Jon
__________________
Cowcare Forum
WYSIFA Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-12-2007, 17:27
flesso's Avatar
Premium Member
 
Join Date: Mar 2007
Location: 127.0.0.1
Posts: 1,438
Default

Quote:
Originally Posted by MonteJon View Post
Hi All,
I want to start learning how to use the PHP Admin and MySQL options on my CP but am not sure where to start first.
I have a basic understanding of HTML and CSS but appreciate this is a whole new ball-game.
Should I make a new domain for myself to use for practice purposes so that I don't mess up any existing files ?
I'd appreciate any help please ?
Thanks and a Merry Christmas to all !
Jon
I would start at http://www.w3schools.com, then as you gain good knowledge of it you can start to read the more in depth books which are available from any good book store.
__________________
Regards,
Josh Hold

eUKhost Blog: Over 1000 Computer Related Articles to Sink Your Teeth Into!

LDN GIGS - Gig Listings for London

Super Moderator

I'm only a forum gremlin (moderator), and do not work for eUKhost in any way. Opinions expressed by me are mine only, and do not reflect those of either eUKhost or any company that may be listed above.

I don't bite, honest.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-12-2007, 18:26
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 5,611
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Quote:
Originally Posted by MonteJon View Post
Hi All,
I want to start learning how to use the PHP Admin and MySQL options on my CP but am not sure where to start first.
I have a basic understanding of HTML and CSS but appreciate this is a whole new ball-game.
Should I make a new domain for myself to use for practice purposes so that I don't mess up any existing files ?
I'd appreciate any help please ?
Thanks and a Merry Christmas to all !
Jon
The best way to learn with things is to have a play and see what things do. I would follow your recommendation and set up a test account to do this on.

Hope that helps .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
http://djdavid.dpscomputing.com (My DJ Website) - Updated for Christmas 08!
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website) - Temporarily Unavailable .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-12-2007, 20:36
MonteJon's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Cheshire/London
Posts: 117
Default

Quote:
Originally Posted by DPS Computing View Post
The best way to learn with things is to have a play and see what things do. I would follow your recommendation and set up a test account to do this on.

Hope that helps .
Hi DPS,
You'll do for me, that's more my style !

Whilst I'm sure that Flesso is right [thanks for your reply by the way !] I've just been to several sites [w3schools included] and I could spend the next ten years learning but it would'nt sink in.

I'm more a "hands on" type learner and think I'll be quicker learning from my mistakes.
So, if I set up a domain to play around with hopefully I won't do too much damage.
If anyone has any further suggestions I'd really appreciate them.
Thanks,
Jon
__________________
Cowcare Forum
WYSIFA Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-12-2007, 03:37
DPS Computing's Avatar
Premium Member
 
Join Date: Apr 2007
Location: Manchester, United Kingdom
Posts: 5,611
Send a message via ICQ to DPS Computing Send a message via AIM to DPS Computing Send a message via MSN to DPS Computing Send a message via Yahoo to DPS Computing Send a message via Skype™ to DPS Computing
Default

Quote:
Originally Posted by MonteJon View Post
Hi DPS,
You'll do for me, that's more my style !

Whilst I'm sure that Flesso is right [thanks for your reply by the way !] I've just been to several sites [w3schools included] and I could spend the next ten years learning but it would'nt sink in.

I'm more a "hands on" type learner and think I'll be quicker learning from my mistakes.
So, if I set up a domain to play around with hopefully I won't do too much damage.
If anyone has any further suggestions I'd really appreciate them.
Thanks,
Jon
Your like me in that way - I can learn a books worth of knowledge by playing around with things 10 times faster than I could learn the same from a book although books and reference sources do have an important place for clarification of certain points when your unsure .
__________________
David Smith
DPS Computing
http://www.dpscomputing.com (Computing, Reviews, News) - New site / new polls / new stories! With many more to follow!
http://djdavid.dpscomputing.com (My DJ Website) - Updated for Christmas 08!
NEW LAUNCH! http://davidsmith.dpscomputing.com (My Personal Website) - Temporarily Unavailable .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-12-2007, 05:32
sb123's Avatar
Senior Member
 
Join Date: Dec 2007
Location: Belgaum, India.
Posts: 231
Default

Hi MonteJon
Good morning, and good morning to all my forum friends

Please take a look here:
http://www.smartwebby.com/PHP/default.asp

You will find everything you need on this site, including tutorials and tips on MySQL Database Connection, PHPMyAdmin, etc. One of the best sites for newbies and pros. Hope it helps you master PHP. (DBAdministration is quite simple if you understand the basics of Structured Querry Language - SQL Server - which itself is one of the easiest db tools). Just have a look and absorb what they have on that site. Will be back with more (am working right now!), but I think this web site hosting alone will be sufficient for your purpose. You can also find more tutorials and tips if you Google.

Also, no need to have a separate web site hosting just to learn. If you already have a web site hosting then create a sub-domain (eg, PHPtraining.maindomain.com) with a new database and new DBUser name, and play... Even if you go wrong somewhere, you'll not harm your other data, forms, and pages.

Have a great day!

Keep smiling

p.s.:
Also check the 'Tutorials and Articles' box on:
http://www.phpmyadmin.net/home_page/docs.php

Last edited by sb123; 07-12-2007 at 05:48.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-12-2007, 22:35
MonteJon's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Cheshire/London
Posts: 117
Default How's this ?

Hi David,
I quite agree with you about getting stuck in and using sources of reference for backup, we all learn at different rates and levels, what suits one user will floor another.
This is one of the reasons I don't like modern educational methods, stick 30 kids in a room and teach them all the same way, is it any reason there are some failures ?

I'm currently using killerphp.com [video tutorials]
They suggest using XAMPP [for Windows or Linux ?] or Wamp5 but I'm not sure which one I should use.
[I'm on a Linux Hosting plan using XP on my home computer]
Any suggestions most appreciated !

Hi sb123,
That's a new web site hosting to me so I've bookmarked it and will look at it later.
Thanks also for your suggestions and I think I'll do as you advise about a sub-domain, seems a logical step.

Thanks again you two !
Jon
__________________
Cowcare Forum
WYSIFA Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-12-2007, 22:53
developmentxl's Avatar
Member
 
Join Date: Nov 2007
Location: Edinburgh
Posts: 64
Default

Hey,

If you're a hands-on kind of learner I'd head over to http://www.php.net/manual/ and start messing about with the various PHP language constructs/functions - probably the best way to learn as you see immediate results that'll give you that little warm feeling inside
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 09-12-2007, 11:42
MonteJon's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Cheshire/London
Posts: 117
Default

Hi All,
Thanks developmentxl, I've got that web site hosting bookmarked but hav'nt ever seen the link you've given so thanks for that, looks like something even I can manage.

However, I'm now completely confused . . .

Do I stick with Notepad++, download PHPAdmin, XAMPP, Wamp 5 or any of the other software suggested.
What do I really need to start, what do you all use ?
Many thanks,
Jon
__________________
Cowcare Forum
WYSIFA Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 09-12-2007, 12:59
developmentxl's Avatar
Member
 
Join Date: Nov 2007
Location: Edinburgh
Posts: 64
Default

Hey Jon,

There are many distributions of WAMP out there to get started easily, but I'd suggest spending a little time going through the process of installing Apache, PHP and MySQL manually (I'm assuming you're using Windows).

Basically you will need to set up your development platform first (Apache, PHP, MySQL) then get yourself some development tools that you're comfortable with (Notepad++, phpMyAdmin).

First off I'll explain how to download and install each component, then I'll move on to configuring each one so that they can talk to each other.

(This post got rather long, will split it into two, Development Environment and Development Tools)

Installing the Development Environment

Apache HTTPD Server

First off I'd head over to Apache and download the latest binary:

http://mirrors.dedipower.com/ftp.apa...x86-no_ssl.msi

Installing this is simply a matter of following the on-screen wizard, you will probably want to keep default settings at this stage.

PHP

You will then need to head over to PHP.net and get the latest version of php. You can either download this as a simple ZIP file or as a Windows Installer. I'd highly recommend that you get the ZIP file as it seems to be a more complete package, again, avoiding the easy route here will pay off in the long term.

http://www.php.net/get/php-5.2.5-Win.../from/a/mirror

Once it's downloaded you will have to unzip the entire directory somewhere, I'd suggest c:\php\ as this will make configuring Apache (which I'll explain in a minute) a bit simpler.

MySQL

Next off is your MySQL server. In this case I'd suggest using the installer as creating your own MySQL instance is perhaps a bit out of the scope of this post, let me know if you'd like to know how though and I'll put something together.

Nip over to the MySQL Server web site hosting and get yourself a copy of the MySQL Community Server (this is the free version)

http://dev.mysql.com/get/Downloads/M...ftp.mysql.com/

Just follow the on-screen instructions for this one, I'd suggest installing to c:\mysql\ as this will make stuff easier further on!

Configuring the Development Environment

Enviroment Variables

Before we start I'd suggest adding some directories to your Windows Path variable, this will help the components find each other, and help you use them at the command line later.
  1. Right click on My Computer and select Properties
  2. Click on the Advanced tab.
  3. Click on the Environment Variable button
  4. On the System Variables list find Path and double click it
  5. Now you will add the MySQL and PHP paths by adding the following to the end of the line (subsitute the installation paths you chose here)

    Code:
    ;C:\php;C:\mysql\bin

PHP

Navigate to your PHP directory and you should find a file called php.ini.recommended, rename this to php.ini. This will now act as your main PHP configuration file. You can leave it as is for now, but feel free to open it up and have a play with the settings.

There are only really two things you'll need to change here to get up and running.

Make sure PHP can find all it's required extensions, find the line:

Code:
extension_dir =
And update this so it reads:

Code:
extension_dir = C:/php/ext/
To load the MySQL extension find the line:

Code:
;extension=php_mysql.dll
And remove the semi-colon from the start so it reads:

Code:
extension=php_mysql.dll
Apache

Like PHP, Apache has a core configuration file, you will find this in the conf folder within your Apache installation directory. It's called httpd.conf.

There are many many setting here you can play with, but for now we only need to let Apache know that you will be wanting to use PHP, so scroll down to the bottom of httpd.conf and add these lines (making sure the paths are correct for your php installation).

Code:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"
One last thing you'll need to change in your httpd.conf is a line to let Apache know to use any file called index.php as a directory index (so it will load any file called index.php as default when you visit a directory through your browser)

Find the section below:

Code:
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>
And change it to:

Code:
<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>
MySQL

You shouldn't need to touch the configuration for this, but incase you do you should find a file in your c:\mysql\ dir called my.ini - again you can have a mess around with this later on.

And we're done ...

Ok, give your computer a reboot and cross your fingers. When you're back up and running you'll want to do a quick test to make sure everything's installed.

Navigate to your Apache installation folder and open up the htdocs directory. Create a new file in Notepad and call it index.php, place the following code in this file:

PHP Code:
<?php phpinfo(); ?>
Save the file and go to http://127.0.0.1 in your browser. With any luck you'll see a page appear with all of your PHP configuration settings. Somewhere here you should find a section titled MySQL - if you don't, something's gone wrong!

If all went well you've now set up your Development Environment - the next step is to decide which development tools you'd like to use (coming in the next post).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 09-12-2007, 13:16
developmentxl's Avatar
Member
 
Join Date: Nov 2007
Location: Edinburgh
Posts: 64
Default

Hope you've recovered from Part 1, now onto Part 2 - Development Tools!

Which tools you use is a very personal choice, but I'll let you know what I use here. Hopefully others will have some insight into this too. I find many people get stuck in their ways and refuse to switch away from the tools they started with, so I think it's best to hear what other's use now and then to make sure you've got the best tools for the job.

PHP

Here you have the choice of a complex IDE or a simple text editor. I like to know exactly what's going on with my code, so I prefer to use a text editor for my PHP.

I notice you've mentioned NotePad++, if you're comfortable with this, stick with it. Personally I use Programmer's Notepad (http://www.pnotepad.org/)

If you decide to go down the IDE route I'd suggest trying to Zend Studio, however this isn't free (or cheap!) and is only really useful when you get into more advanced online applications.

MySQL

Nothing really comes close to phpMyAdmin for a WAMP setup (http://www.phpmyadmin.net/home_page/downloads.php).

It's easy to use and very powerful. I'd suggest trying to get to grips with MySQL Server at the command line at some point too, but most of your MySQL work will probably take place in phpMyAdmin.

It's rather straight forward to install;
  1. Download and UnZIP into your Apache htdocs directory
  2. Navigate to this directory through your web browser
  3. A page will be shown with a link to the configuration editor
  4. Go to this and put pop a server into the config (localhost, port 3306, username will be root while your password will be whatever you set up during the MySQL setup - or blank if you did not specify a password)
  5. Save the configuration file and copy it from phpmyadmin/config/ to /phpmyadmin/

More help can be found at (http://www.phpmyadmin.net/documentation/#setup)

You're done...

Good luck, you should be all set, start making .php files and popping them into your htdocs folder!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 09-12-2007, 17:03
MonteJon's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Cheshire/London
Posts: 117
Default

Hi developmentxl,
Wow, you sure know your stuff, thankyou for going to so much trouble to help, it's appreciated !
Before I get stuck in could you help me with a few questions first please ?

1. Is there any way I can utilise my eUKHost account in all this ?

2. Is there a possibility that I could do any harm to my exisiting computer settings, if so what should I do apart from a back-up to protect it ?

Many thanks again, you have restored my faith in human nature !
Regards,
Jon
__________________
Cowcare Forum
WYSIFA Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 09-12-2007, 18:04
developmentxl's Avatar
Member
 
Join Date: Nov 2007
Location: Edinburgh
Posts: 64
Default

Hi Jon,

Not a problem! Just to clarify; the above guide is to set up a development environment on your own Windows machine - this is the preferred way to develop website hostings as you can test everything locally without having to upload your files every time you want to try something out!

Of course, you can simply upload all of your files directly to your eukhost FTP and test from there as it's all set up for you ready to go, even phpMyAdmin (which you can access through cPanel).

One problem with testing live is that it can be troublesome to error check. I don't use eUKHost shared hosting but I suspect they (as most live servers) have PHP error reporting turned off. This means that you will get a blank screen if you have an error in your PHP - which doesn't help you track down the root of the problem!

Although you may be able to turn error reporting on at runtime by using the code below at the top of your PHP scripts (you'll need to confirm this with a eUKHost admin, however, as I'm not sure how the shared servers are set up).

PHP Code:
error_reporting(E_ALL E_NOTICE); 
You can't really do any harm to your computer by setting up a WAMP environment; the only thing that could go wrong is if you delete your entire PATH variable in Windows. So if you do carry out this step, make sure you take a backup of this variable (just copy it into a notepad document or something, it won't stop you computer booting).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 18-12-2007, 16:55
MonteJon's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Cheshire/London
Posts: 117
Default

Hi developmentxl,
Sorry so late to reply, especially when you have gone to so much trouble and detail.
I've taken a copy of all you've posted and will start in the New Year when I'm not so rushed.
I'm sure your input will help many others, your'e a gent !
Have a Merry Christmas !
Jon
__________________
Cowcare Forum
WYSIFA Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 18-12-2007, 17:09
developmentxl's Avatar
Member
 
Join Date: Nov 2007
Location: Edinburgh
Posts: 64
Default

My pleasure, have a good holiday and good luck!

:santafamily:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 18-12-2007, 20:55
MonteJon's Avatar
Senior Member
 
Join Date: Jul 2007
Location: Cheshire/London
Posts: 117
Default Easy php ?

Hi developmentxl,
Thanks for the christmas cheer, very kind of you sir !
As I mentioned in my previous post I will give your excellent tutorial a go in the new year, meanwhile I thought I'd better learn the basics.
I came upon a web site hosting that advocates a programme called "Easyphp" and has a set of step by step tutorials that might be just the introduction I need to prepare me for your guide.
I wondered if you knew of it and what your sentiments were about it ? [I'd value your opinion]
Easyphp

It seems simple enough for even me to work through . . . [famous last words . . .]

Thanks again,
Jon
__________________
Cowcare Forum
WYSIFA Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 14-01-2008, 14:50
new member
 
Join Date: Jan 2008
Posts: 5
Default

i really want to learn also ..but its hard 4 me