...

View Full Version : Help Running My Code



AJW06
01-25-2007, 09:18 PM
Hello Fellow Coders,

I am currently learning php, but how do i run the code i wrote. as i use dial up and i don't have a web host i want to run the script on my computer. is there like a virtual work space that i can download.

AJW06

what do you think of my new computer that i am building.

Motherboard:MSI K9N SLI Platinum
CPU (Central Processing Unit):AMD Athlon 64 X2 4200+
HDD (Hard Drive Device):Maxtor DiamondMax 21 - 200GB
Memory:1 GB DDR II SDRAM

Len Whistler
01-25-2007, 09:35 PM
You need Apache (web server) and MySQL (for data bases) running on your computer. The easest way is to download and install the phpdev423 11.5mb package from: http://www.firepages.com.au/

It's not running the latest php and mysql but it's perfect for 95% of any PHP coding you may want to do. What it comes with:

* apache 1.3.27
* php4.2.3
* MySQL4
* phpmyadmin 2.3.2
* Invision Board
* PhpWebsite

Arragon
01-25-2007, 09:42 PM
My approach has been to install the apache web server and php on my desktop computer. Runs under most operating systems and is a good way to emulate a hosting environment while you are developing.

Downloads and instructions are available here:
http://apache.org/
http://www.php.net/
And if you want the database part:
http://mysql.org/

I have friends that complain about running a server in the background because it makes their games lag, but I can't speak to that because I am not much of a gamer.

EDIT:
I'm sorry, I could have given you better links.

http://httpd.apache.org/
http://www.php.net/downloads.php

AJW06
01-25-2007, 09:52 PM
once onto the apache and php website what is it i am downloading, once installed what does it do?

Len Whistler
01-25-2007, 09:58 PM
once onto the apache and php website what is it i am downloading, once installed what does it do?

Click on phpdev bundles , I can't post a direct link, and download the package I mentioned. Then install like any other software package, it will then be ready to use with Win 98 or XP.

Brandoe85
01-25-2007, 10:00 PM
I can only say good things about XAMPP as well:
http://www.apachefriends.org/en/xampp.html

JohnDubya
01-25-2007, 10:11 PM
I couldn't agree more with Brando. I'm currently using XAMPP on my computer to do local tests and development work. It's great for learning PHP and MySQL because immediately when you save your pages, they are available to view, since they are on your computer. It's a bit difficult at times if you are trying to mess with admin features of Apache and MySQL, but as long as you just keep it as it is out of the box, you should be fine.

Be careful if your computer is connected to the Internet...because anyone who knows your IP address can access an unprotected Apache/MySQL server.

Len Whistler
01-26-2007, 07:37 AM
I just installed the php, mysql package that Brandoe85 recommended. It's excellent and has updated versions of php and mysql. :thumbsup:

I'm glad I saw this post or else I would still be using phpdev423. :(

AJW06
01-26-2007, 08:46 AM
i am downloading the top link on the php websites guess thats right, not sure what it means by the sub menu below windows binaries. also downloading lastest apache thats was called win32 tell me if either is not wrong. i am using xp. once dowloaded them what do i do.

AJW06
01-26-2007, 05:03 PM
once i have dowloaded the things on the php and apache website what do i do

Arragon
01-26-2007, 05:19 PM
When I posted my links I was unaware of the XAMPP bundle mentioned above. This looks like a good thing for you to get started with and others here are giving it good reviews. If you want something easy to get started with, go there.

Downloading and configuring each component separately is a good choice if you are intent on learning and growing professional web dev skills. Doing it this way you can find answers to deeper questions such as: How does the internet work? What does PHP do really? How do databases connect to web pages? And other profound mysteries of strong web-fu. But be advised, this is more challenging and you will be required to do much reading and understanding with very little hand holding if you follow this path. Your next step is to follow the links labled 'documentation'.

Brandoe85
01-26-2007, 05:21 PM
If you are going to install them separate, marek_mar (http://www.codingforums.com/member.php?u=8923) has a guide in his sig:
http://a51.neostrada.pl/

AJW06
01-26-2007, 07:00 PM
is there somthing i can download that is what i am downloading from the apache and php website but all configured

AJW06
01-26-2007, 07:24 PM
if i downloaded this Xampp thing does it work in the same way as if i was downloading php and apache

cookieboi
01-26-2007, 08:06 PM
i agree that xampp is the best. I've been using it for while but now i got lucky with a web host and they gave me some free web space. If you're new to all of the coding, it may be a good idea to get a free webhost to experiment with it all rather that worrying with the setting up of the php/apachee server.

Or you could just ignore me and use xampp :thumbsup:

Len Whistler
01-26-2007, 09:37 PM
if i downloaded this Xampp thing does it work in the same way as if i was downloading php and apacheYou are better off downloading Xampp because it will setup php, mysql and apache for you. Configuring them youself can be a pain.

Once you have installed Xampp explore it for awhile and become familiar with it. Check out the CD and telephone database scripts, enter and delete some info to make sure everything is running.


If you're new to all of the coding, it may be a good idea to get a free webhost to experiment with it all rather that worrying with the setting up of the php/apachee server.It is best to use Xampp on your home computer to code php and mysql instead of uploading scripts to a server to see how they are. Some php coding has to be rewriten 20x or more.

AJW06
01-26-2007, 10:27 PM
can you just view your wesbite by typing localhost in the address bar in Xampp

Len Whistler
01-26-2007, 10:33 PM
can you just view your wesbite by typing localhost in the address bar in Xampp

http://localhost/website

I would create folders for each of your websites and php scripts, in the website folder you would have your index.php or .html file.

AJW06
01-26-2007, 11:03 PM
i guess by that you mean ys does that mean say i have a folder called video and inside that folder there is a html doc called index i would type:

http://localhost/video/index.htm

and navigate my site like normal as if it was on the internet

Len Whistler
01-27-2007, 12:26 AM
i guess by that you mean ys does that mean say i have a folder called video and inside that folder there is a html doc called index i would type:

http://localhost/video/index.htm

and navigate my site like normal as if it was on the internet

As long as you have an index file (.php or .htm) file in a folder you do not have to enter the index.htm. And yes you would navigate your site as if on the internet.

What I did you make navigating easier in Xampp is create a folder with a easy name to remember like "websites". In the website folder is a index.htm file with links to all my other php projects, this way I don't have to remember all the folder names. Example of index.htm file:


<html>
<body>
<a href="http://localhost/video">Video</a>
<a href="http://localhost/shopping">Shopping Cart</a>
<a href="http://localhost/gallery">Image Gallery Script</a>
<a href="http://localhost/video_two">Video Two</a>
<a href="http://localhost/blog">PHP Blog </a>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum