Simple Newbie Questions! Please answer if you can...

Discussion in 'PHP' started by Ashkan, Jul 5, 2007.

  1. #1
    The only programming knowledge I have is Matlab and I'm trying to learn PHP but I'm stuck already. I have found a good tutorial but it doesn't explain what and how to install things, it just explains coding etc, but I don't know where to write the code and how to make it run.

    I have Windows XP. Here's what I have done so far:

    I've installed PHP 5.2.3 from http://www.php.net/downloads.php

    I've installed MySQL Database 5.0.41-win32 from http://www.mysql.com/downloads/index.html

    I've installed Apache Server 2.2.4 from http://httpd.apache.org/download.cgi (I just pressed next on the prompts and when I was asked for a domain and server name I just entered a random domain name, is this ok?)


    Now that everything is installed, what do I do? Do I open notepad or wordpad and start practicing the coding? How do I run it once I have done that?

    Thanks!
     
    Ashkan, Jul 5, 2007 IP
  2. pfek

    pfek Member

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #2
    Hi,

    you have to find the root web folder of apache, which should be defined in the configs files. Try putting a simple index.php and phpinfo(); inside to see if everything's working fine.

    Go to http://localhost or http://127.0.0.1 and you should see the informations coming from phpinfo. Everything should work fine with that. You could also install easyPhp, or wamp server, which are starting packages for doing php development. They are quite easy to setup too, but if you are alright with what you have it's not necessary.

    PM if you need more infos!
     
    pfek, Jul 5, 2007 IP
    Ashkan likes this.
  3. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #3
    your next step should be to visit http://notepad-plus.sourceforge.net/uk/site.htm and download that. then open it up and type this.

    
    <?php
        phpinfo();
    ?>
    
    PHP:
    and make sure that everything works.
    you'll know if it doesn't/ you'll see the code.
    as for accessing the website, save the code in your htdocs folder that is probably in your apache installation directory unless you specified otherwise.
    and then hit http://localhost/ and find the file that you saved.
     
    ansi, Jul 5, 2007 IP