Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PHP]Help a beginner get started

Experienced Elementalist
Joined
Jun 28, 2007
Messages
206
Reaction score
4
I recently got a PHP book, called PHP 5 Unleashed in hope that I could pick it up for future classes and get a head start for high school classes but I'm absolutely clueless on getting started to be honest. So I was wondering if I could get pushed in the right direction?

I have a script that is pretty easy but no idea how to put it in so it show results it is.

Code:
<HTML>
<HEAD><TITLE>My First PHP Script</TITLE></HEAD>
<BODY>
<?php

                 echo "Hello, world";
?>
</BODY>
</HTML>

Now this is really simple but I have no clue how to get the results to show up, do I have to make a test site for it? Do I have to download a program?

I got XAMPP and use the PHP program from that but no such luck at all.
 
Last edited:
ex visor
Loyal Member
Joined
May 17, 2007
Messages
2,741
Reaction score
937
You need a webserver with Apache. If you want to use the MySQL aspect as well, then you need MySQL installed (while all being enabled).

I use wamp, but I guess it's just preference. Is Apache installed, and started? If you look at the page source do you see that? Including the PHP? If so, there must have been an error while installing PHP, or something down the line.

Aaron
 
Last edited:
Experienced Elementalist
Joined
Jun 28, 2007
Messages
206
Reaction score
4
You need a webserver with Apache. If you want to use the MySQL aspect as well, then you need MySQL installed (while all being enabled).

I use wamp, but I guess it's just preference. Is Apache installed, and started? If you look at the page source do you see that? Including the PHP? If so, there must have been an error while installing PHP, or something down the line.

Aaron
I'm going to try wamp as I've heard it a bit more user friendly, MySQL doesn't come in till later in the actual book so I'll pick that up later so thank you :)

As for the program, it has a option to start apache but everytime you clicked start it wouldn't respond, maybe it was just me.

Thank you for the info :) Hopefully this will work.

@Wizcoder

I'll also try yours out to see which I prefer. How have you liked the book? Good for someone who never dabbled in this field before?
 
Last edited:
butt > Tits
Loyal Member
Joined
Feb 16, 2009
Messages
658
Reaction score
96
Type localhost in your address bar of your browser..?
 
Custom Title Activated
Loyal Member
Joined
Sep 9, 2008
Messages
1,949
Reaction score
390
Be sure to check in your services window via Admin services in Control Panel that Apache is running. Sometimes you have to restart it to get it going.

Also by typing localhost (just that) in the browser you should see a test page or sometimes an apache welcome page depending on the type of package you are using. Many are different.

It is also crucial that you make sure you define the folder to point the PHP parser to that I believe is in the Apache settings file or the php.ini. It's been a while since I've set up Apache & PHP from scratch. Please do correct me if I'm wrong on any of that.
 
Junior Spellweaver
Joined
Nov 30, 2010
Messages
141
Reaction score
16
I suggest starting off with a simple free host and sub-domain to start off with. It's not the best for developing large PHP scripts, but its a lot easier than starting off hosting your own server (XAMPP or WAMP). I suggest Freehostia, or x10hosting.

Simply register, choose a sub-domain name, and get your FTP details. Connect to the FTP using a client such as FileZilla, and upload your file to it. When you go to your sub-domain, you should see "Hello, World".

After trying out your first few scripts, try setting up XAMPP, as it is the easiest development package I have found to use.

How To Install XAMPP
1.) Download XAMPP from apachefriends.org.
2.) Install it.
3.) Open XAMPP Control Panel, and click the SVC box beside Apache, and MYSQL. Then click the Start button beside both.
4.) go to and pick a password for the root MySQL user.
5.) go to c:/xampp/htdocs/ and delete everything in that folder. IMPORTANT NOTE: Make sure you do step 4 before step five, as you could end up having to set a password through SQL.
6.) Start developing PHP in the htdocs folder. View the finished prodict via

If I helped, please click like :)
 
Back
Top