+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35
Web Development Thread, Web Development Basics in Coding and Web Development; I have just downloaded Virtual Appliances LAMP 1.0.180 , and all I have is a VHD and a VMC file. ...
  1. #16

    Join Date
    Jan 2010
    Posts
    10
    Thank Post
    17
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I have just downloaded Virtual Appliances LAMP 1.0.180 , and all I have is a VHD and a VMC file.
    How am I supposed to install it from there? Shouldn't there be a setup.exe?

  2. #17
    pwds's Avatar
    Join Date
    Dec 2008
    Location
    Derby
    Posts
    279
    Thank Post
    73
    Thanked 48 Times in 38 Posts
    Rep Power
    21
    This is actually a virtual machine, you will need to install the a virtual machine host and add the LAMP client as a separate operating system- this isn't just a matter of running a setup.exe and it's there.

    If you are looking to do that then I strongly recommend Apache Friends XAMPP as a "one click" setup that should require minimal intervention from you and has significant support available via forums.

    If you want to proceed with Virtual Applicances you will need some form of virtual host software- the brief look I've had at their webpage suggests that it is VMWare compatible so VMWare Server should be suitable for you.

    Otherwise Microsoft Virtual PC may work, although it will not be supported for any non Microsoft client operating system.

    Given the complexities running Virtual Machines I strongly urge you to consider running XAMPP as this seems better suited to your needs.

    This will also have less of an impact on your computer as you won't have to allocate memory to a separate operating system, and make developing easier for you as you'll be running from a single host and not having to transfer files.

  3. Thanks to pwds from:

    mike008 (8th January 2010)

  4. #18

    Join Date
    Nov 2009
    Posts
    3
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Also highly recommend xampp. This will install a web server, mysql database ability and interface (phpmyadmin I think) and a few other things you will find yourself needing. It gives you a nice admin panel from which you can boot up arious elements. By far the best way to experiment on your local machine

  5. Thanks to natparnell from:

    mike008 (9th January 2010)

  6. #19
    Devontechie's Avatar
    Join Date
    Nov 2007
    Location
    UK
    Posts
    912
    Thank Post
    184
    Thanked 205 Times in 167 Posts
    Rep Power
    73
    Quote Originally Posted by natparnell View Post
    Also highly recommend xampp. This will install a web server, mysql database ability and interface (phpmyadmin I think) and a few other things you will find yourself needing. It gives you a nice admin panel from which you can boot up arious elements. By far the best way to experiment on your local machine

    I would recommend XAMPP as well. I've got it runninf on my machine. I use it for testing things in Joomla & Moodle.
    Yes XAMPP includes phpmyadmin.

    Steve

  7. Thanks to Devontechie from:

    mike008 (9th January 2010)

  8. #20

    Join Date
    Jan 2010
    Posts
    10
    Thank Post
    17
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    When I have the XAMPP Control Panel Application running and go to http://localhost, why does it comes up with IIS7 Information Services and not the Welcome to XAMPP page?

  9. #21
    Devontechie's Avatar
    Join Date
    Nov 2007
    Location
    UK
    Posts
    912
    Thank Post
    184
    Thanked 205 Times in 167 Posts
    Rep Power
    73
    Quote Originally Posted by mike008 View Post
    When I have the XAMPP Control Panel Application running and go to http://localhost, why does it comes up with IIS7 Information Services and not the Welcome to XAMPP page?
    Because you have IIS running. You need to stop that and then XAMPP should display when you go to http://localhost

    Steve

  10. #22
    Flakes's Avatar
    Join Date
    Nov 2009
    Location
    Newcastle
    Posts
    476
    Thank Post
    38
    Thanked 74 Times in 48 Posts
    Rep Power
    28
    im going to make things a bit more simple, looking at this thread its gone a bit all over....

    install XAMPP on your machine, link: apache friends - xampp

    run the control center and start the Apache and mysql servers.

    now create a folder in C:\xampp\htdocs with your website name. so example C:\xampp\htdocs\mywebsite

    now create an index.html with some simple code..

    Code:
    <html>
      <head>
       <title>test</title>
      </head>
      <body>
        <p>My first site</p>
      </body>
    </html>
    now in your browser goto, 127.0.0.1/mywebsite if your page loads everything has installed correctly.

    now you need a mysql database to create one goto: 127.0.0.1/phpmyadmin and create a new user when you create the user be sure to tick the box "create database with same name".

    now you need to connect to the database create a php file in your mywebsite folder and use this code:

    Code:
    <?php
        //connect to the database
        $connect = mysql_connect('127.0.0.1', 'yourusername', 'yourpassword')or die('Cannot connect to the SQL Server');
    
        $conn = mysql_select_db('databasename', $connect)or die('Cannot connect to the Database');
    
    ?>
    replace 'yourusername' and 'yourpassword' with the ones you set in phpmyadmin.

    my last bit of advice is that if you truly want to learn webprogramming is to drop programs like dreamweaver and use a text editor such as Scite link: http://www.scintilla.org/SciTE.html then trawl the tutorial sites such as:

    http://www.tizag.com/
    http://www.w3schools.com/
    http://www.dynamicdrive.com/
    Last edited by Flakes; 15th January 2010 at 12:33 PM.

  11. Thanks to Flakes from:

    mike008 (15th January 2010)

  12. #23

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    242
    Why not enrol on a part-time college course. Night courses around here cost about £600 per year, and after two years you could have a HNC, a HND after 3 years and a degree in the subject within 5 years.

    £600 a year is nothing for an education, and it's a first class experience. Plus, if money is tight see the financial offices of your local college/uni as you can get a grant. Last year I had my college fee's paid for (£600) from the LEA, and I also received a cash grant of £250 to go towards learning materials (so I bought a netbook naturally!). Because it's a grant you don't have to pay it back either.

  13. Thanks to Hightower from:

    mike008 (15th January 2010)

  14. #24
    ajb
    ajb is offline
    ajb's Avatar
    Join Date
    Jan 2010
    Location
    East Midlands
    Posts
    6
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    0
    I'm all with Hightower's suggestion. Acquiring formal training in software engineering or similar is definitely a good idea.

    As roles within the IT industry continue diversify, I'd also urge you to consider whether you would like to work as a Web designer or Web developer.

    To be a Web designer, it doesn't hurt to have knowledge of Web development and vice versa; and depending on the size of the organisations you might end up working for, you could find yourself performing both roles at the same time.

    To clarify: a Web designer typically 'designs' a Web site or application, with an eye firmly on the look and feel, user experience, workflow, etc. Skills required include CSS, HTML, XHTML, JavaScript, Web site design tools like Dreamweaver, templating libraries like Smarty, and anything else typically associated with presentation (like Flash). A Web developer will be responsible for the innards of a Web site or application and is most likely to have knowledge of ASP.NET, C#, PHP, JSON, SQL, XML Web services, etc.

    Andy.

  15. Thanks to ajb from:

    mike008 (15th January 2010)

  16. #25
    pwds's Avatar
    Join Date
    Dec 2008
    Location
    Derby
    Posts
    279
    Thank Post
    73
    Thanked 48 Times in 38 Posts
    Rep Power
    21
    Quote Originally Posted by Flakes View Post
    my last bit of advice is that if you truly want to learn webprogramming is to drop programs like dreamweaver and use a text editor such as Scite link: Scintilla and SciTE
    Second- If you want to use a WYSIWYG editor for day to day stuff then that's fine, but before you do that you should understand the structure and syntax of a web page at the very least, otherwise you're stuck the moment you try to troubleshoot.

    I hand code every HTML and PHP page I produce, and this experience is invaluable when I'm modifying Content Management Systems to our requirements or trying to sort out a PHP parse error or layout issue on a page.

    I use Notepad++ which I cannot praise highly enough.

  17. Thanks to pwds from:

    mike008 (15th January 2010)

  18. #26

    Join Date
    Jan 2010
    Posts
    10
    Thank Post
    17
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thanks for all of your help so far..........I am plugging away with mixed results.

    At the moment I am following a tutorial at PHP MySQL Introduction

    It works ok, but on this page: PHP MySQL Select it shows a PHP script which "displays results in a HTML table".

    The tutorial does not tell me what to name this or where I should put the code or how I link to it. So far it tells me to create a persons.php file and an insert.php file which I have done.

    Any suggestions would be welcome.

    Cheers, Mike.

  19. #27

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    10,052
    Thank Post
    3,583
    Thanked 1,123 Times in 1,025 Posts
    Rep Power
    377
    Quote Originally Posted by mike008 View Post
    Thanks for all of your help so far..........I am plugging away with mixed results.

    At the moment I am following a tutorial at PHP MySQL Introduction

    It works ok, but on this page: PHP MySQL Select it shows a PHP script which "displays results in a HTML table".

    The tutorial does not tell me what to name this or where I should put the code or how I link to it. So far it tells me to create a persons.php file and an insert.php file which I have done.

    Any suggestions would be welcome.

    Cheers, Mike.
    If you are using xampp or apache or something along those lines I think all your web documents ie html, php, etc all go into the htdocs folder which should be where you installed either apache or xampp - when you know where you are putting your website documents you basically take the below php code

    Code:
    <?php
    $con = mysql_connect("localhost","peter","abc123");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    mysql_select_db("my_db", $con);
    
    $result = mysql_query("SELECT * FROM Persons");
    
    echo "<table border='1'>
    <tr>
    <th>Firstname</th>
    <th>Lastname</th>
    </tr>";
    
    while($row = mysql_fetch_array($result))
      {
      echo "<tr>";
      echo "<td>" . $row['FirstName'] . "</td>";
      echo "<td>" . $row['LastName'] . "</td>";
      echo "</tr>";
      }
    echo "</table>";
    
    mysql_close($con);
    ?>
    localhost assuming it is setup on your pc can be localhost, 127.0.0.1 or if this is on a web server you can use the actual ip address assuming its a static ip address or the hostname of the server - if you want to work on a relevant port that you may have to configure it as such and when connecting to the database you would have either

    hostname : port or I.P_Address : port

    excluding spaces ie localhost:3260

    peter - this is the username from the account you setup to access the database

    abc123 - this is the password from the account you setup in this example it relates to the account peter

    my_db - This is the name of your database so you will need to ammend this in the above code

    Persons - This is the name of the table you are trying to access - again highlighted in bold in code snippet

    FirstName - The first name field from your database, normally I don't include spaces in field names and type them exactly as is in the database

    LastName -
    as per the first name field but obviously this is the last name field

    You can have more fields and change the code where needed

    Insert it into a notepad document or as per above suggestions notepad++ and save it as a dot php ie .php file extension and you put the saved php file into the htdocs folder - when it is inside of the htdocs folder you should be able to access it from your web browser ie

    http://localhost/persons.php

    The above assumes you named the php file persons.php

    When executed assuming you have ammended the login credentials ( highlighted in bold in the above code snippet ) and everything else is setup correctly ie the database with the relevant table name, field names etc then it should work fine.

    Apparently you should be able to include ( either using the include command if you have your php in seperate php files ) inside of a html document or literally putting the php inside of the html document using the php tags
    Code:
    <?php
    // PHP Code goes in here
    ?>
    I have never managed to get it to work inside of a html document so if you figure that out let me know.
    Last edited by mac_shinobi; 18th January 2010 at 09:00 AM.

  20. Thanks to mac_shinobi from:

    mike008 (18th January 2010)

  21. #28
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    897
    Thank Post
    84
    Thanked 235 Times in 194 Posts
    Rep Power
    83
    Apparently you should be able to include ( either using the include command if you have your php in seperate php files ) inside of a html document or literally putting the php inside of the html document using the php tags
    This is incorrect... you can't include php script and have it work in a .htm or .html file.
    You can include a .php file, or .htm or .html file in a .php file.

    The closest you'll get to 'including' a php file in an html file is by using an iframe, but that's nasty... avoid.

  22. Thanks to Marci from:

    mike008 (18th January 2010)

  23. #29

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,867
    Thank Post
    412
    Thanked 778 Times in 651 Posts
    Rep Power
    182
    Quote Originally Posted by Marci View Post
    This is incorrect... you can't include php script and have it work in a .htm or .html file.
    You can include a .php file, or .htm or .html file in a .php file.

    The closest you'll get to 'including' a php file in an html file is by using an iframe, but that's nasty... avoid.
    Not true. If your web server is configure to parse files with the .html extension using PHP, then so be it. And in fact, any other arbitrary extension, which I do on a legacy site with some PHP but where it is essential the page names are preserved.

    However, the overhead of passing every file through PHP just in case is high, which is why most hosts only parse .php/.php4/.php5/.phtml/.phps files.

  24. Thanks to powdarrmonkey from:

    mike008 (18th January 2010)

  25. #30
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    897
    Thank Post
    84
    Thanked 235 Times in 194 Posts
    Rep Power
    83
    Yes... I should have worded that better... but in these guys cases we can safely assume that PHP is configured purely to parse the regular extensions...

  26. Thanks to Marci from:

    mike008 (18th January 2010)



SHARE:
+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Network basics animation
    By TechMonkey in forum General Chat
    Replies: 1
    Last Post: 12th May 2009, 05:30 PM
  2. Web Development
    By dannyjay in forum Web Development
    Replies: 9
    Last Post: 9th February 2009, 02:17 PM
  3. Back To VLE Basics
    By moggy in forum Virtual Learning Platforms
    Replies: 1
    Last Post: 27th November 2008, 02:38 PM
  4. The best direction for web development?
    By FN-GM in forum Web Development
    Replies: 12
    Last Post: 29th March 2008, 06:50 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •