Page 1 of 11 123 ... LastLast
Results 1 to 10 of 105

Thread: The very first steps in learning PHP? Installation.

  1. #1
    Regular
    Join Date
    Nov 2004
    Location
    Salt Lake City, UT
    Posts
    126

    The very first steps in learning PHP? Installation.

    Ok, I've been working on learning ColdFusion. Unfortunately my job has a server which doesn't support it. So for me to continue with the development of the site I have to switch gears and start with PHP (which I know NOTHING about)

    I tried to do search on some basic PHP on this forum and got nothing.

    The sticky post in this section is great, but most of those sites specialize in tutorials for people who at least know the absolute basics.

    I thought that maybe starting this post would be a great way to learn myself and to leave some kind of "light" on for others who are like me and know next to nothing about it.

    I remember seeing Colin's post about PHP and how many people around here knew it and wanted to share the info. Well How about it?

    I guess my first question is:
    1. Do you have to have any kind of special program to code and compile PHP like with ColdFusion server? If you do, where do you get it?

    2. Where in HTML code do the PHP statements go? Do they have to be stacked up top or can it be inline?

    3. I understand that a PHP file can be linked to the page. Do you do it like CSS with the <link> tag or some other way?

    4. Do you write functions in PHP and imbed SQL commands in it for DB communication or does PHP include SQL commands in its syntax?

    5. CF is a tag based language. How about PHP. I did a little programming in C and MatLab while in Colledge, but that's about it.

    I guess this is it for now. Kind of hard to figure the right questions to ask since I don't really know if any CF rules and concepts can be applied with PHP.

    [Edited on 2/4/2005 by mechelaar]

  2. #2
    Regular
    Join Date
    Nov 2004
    Location
    Salt Lake City, UT
    Posts
    126
    Alright.

    I figured a couple of things out.

    First of all, I found a full manual on PHP -->HERE<--. Then, I got to download PHP 5 from --->HERE<---.
    After I got that, I went to the Apache site and downloaded their 1.3.33 version Since that is what our server is (---->HERE<----)

    Now, however, I need to know which one to install first and is there anything I should watch out for. I run XP pro SP2 and want to install testing server on this computer so I don't have to mess around with FTP until I'm done developing a page.

    Thanks

  3. #3
    Programming Ninja mkeefe's Avatar
    Join Date
    Feb 2003
    Location
    Boston
    Posts
    7,794
    Ok i will anwser each question, one at a time.

    *NOTE
    ------------------------------------------------------------------
    I have not used PHP 5 as many others have not as well. I would strongly suggest to use a stable build of 4, I run 4.3.10
    ------------------------------------------------------------------


    1. PHP runs on the server in files with .php extensions, unless you "hack" Apache to use others. You can use a txt editor to write PHP, my preference is Editplus+.

    2. PHP can be anywhere in a file as long as the file has a .php extension (see anwser 1 for exception) Here is an example .php page
    Code:
    <html>
    <head>
    <title>Example PHP Page</title>
    </head>
    <body>
    <h1>Print out the specified message!</h1>
    <h2><?php echo 'Cool PHP Message!'; ?></h2>
    </body>
    </html>
    3. Usually php pages are linked or 'included' inside a php page
    Code:
    include '/path/to/php/file/file.php';
    4. PHP has SQL commands and you can also write your own. The below example is not for beginner's but shows a way to use the sql functions included in PHP
    5. Not sure what you mean by tags, but i guess you mean this?
    [code]
    <? ?>(shorthand PHP tags)
    <php ?> (normal PHP tags)

    Good luck and post any projects or questions on the forum. I am sure you will pick up PHP in no time. How did you like CF? I haven't used it before. Is it worth the learning?

    [Edited on 2/3/2005 by mkeefe]

  4. #4
    Regular
    Join Date
    Nov 2004
    Location
    Salt Lake City, UT
    Posts
    126
    I like CF. It is very much like HTML (Based on tags)

    e.g.: <cfquery></cfquery>
    <cfmail></cfmail>

    then inside of those tag you can write SQL statements or pretty much any desired application. You can create your own custom tags and so on.

    You can install ColdFusion on your own computer as a testing server and it will run all the pages through the http://www.localhost.com:8500/....

    You can test as you go.

    Right now I'm reading the PHP manual and it tells me to download and oben MVC++ Do I have to do it? I already downloaded it but if I don't have to go and install it, it would be nice. Also, I am in the process of manually installing PHP. I don't really feel comfortable doing it but if I have to I have to. I'm going really slow according to the manual, but I don't seem to have much of a feel for it (as it's not very intuitive since I am afraid to screw something up)


    I got the "bindlib_w32", "win32build" and "php-4.3.10-Win32" extracted into c:\work directory and that's where I am.

    I haven't even started on Apache yet.

    Thanks mkeefe

    [EDIT] Oh, yeah I got PHP4.3 extracted now instead of 5

    [Edited on 2/3/2005 by mechelaar]

  5. #5
    Programming Ninja mkeefe's Avatar
    Join Date
    Feb 2003
    Location
    Boston
    Posts
    7,794
    I believe php.net has an exe version that just runs and installs, or if you install Apache first it will help you install php as an Apache module otherwise you need to use CGI.

    -matt

  6. #6
    Programming Ninja mkeefe's Avatar
    Join Date
    Feb 2003
    Location
    Boston
    Posts
    7,794
    This is a direct download link to the Apache exe

    http://ftp.wayne.edu/apache/httpd/bi...x86-no_src.exe

  7. #7
    Regular
    Join Date
    Nov 2004
    Location
    Salt Lake City, UT
    Posts
    126
    Yeah, that is where I got the Apache.

    Do I have to do any creative installation with it to get it setup as a testing server on my system?

    Ok, I got it started up, and it tels me to put in the network domain, server name and admin e-mail. If it is a local test server should I put in localhost? or something else?

    Thanks

    [Edited on 2/3/2005 by mechelaar]

  8. #8
    Programming Ninja mkeefe's Avatar
    Join Date
    Feb 2003
    Location
    Boston
    Posts
    7,794
    I don't think so, you just need to follow the steps.

    -matt

  9. #9
    Regular
    Join Date
    Nov 2004
    Location
    Salt Lake City, UT
    Posts
    126
    damn you are fast, see the update in a previous post.

    Thanks

    Also, do I run it as a service or just manual start up?

    I was thinking manual

    [Edited on 2/3/2005 by mechelaar]

  10. #10
    Programming Ninja mkeefe's Avatar
    Join Date
    Feb 2003
    Location
    Boston
    Posts
    7,794
    Apache and PHP run as a service, but you can turn them off.

    -matt

Page 1 of 11 123 ... LastLast

Posting Permissions

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