turning php code into a beta website

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

everything is running now in the xampp control panel. After watching the video I am really confused. I am not the programmer type but am pretty smart and good at following directions. I have a really big site and am interested to see what this code looks like before showing it to my team. I saved the download to my desk top. Do I need to move it like in the video and if so HELP PLEASE! Not sure what to do next.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: turning php code into a beta website

Post by Kieran Huggins »

the files definitely need to be in your document root
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: turning php code into a beta website

Post by JAB Creations »

1.) Open your browser and navigate to http://localhost, if no web server is running then...
Firefox 3 will display: Failed to Connect
IE7: The page cannot be displayed
Opera 9.5: Could not connect to remote server

2.) If you still can't get Apache to run via the XAMPP control panel then download TCPView.

2-A.) Once you're running TCPView click the "A" button or press CTRL+R. This will disable TCPView from resolving addresses. For example TCPView will originally display most of the addresses in the column called "Local Address" for me as "johns_computer" but we want to see numbers.

2-B.) Once you have numbers in the "Local Address" column organize then by click on the column header at the top. You'll want to quickly find anything listed under "0.0.0.0:80". Do you have anything using that *EXACT* number? If so what is the name of the process? If nothing is using "0.0.0.0:80" then there is another problem with Apache if it won't start at this point. If there is something using 0.0.0.0:80 then you need to prevent it from loading everything you load your computer if you're going to be using Apache on a frequent basis. For the short-term however I recommend right clicking on that process and then clicking on "End process..." to close it for now.

2-C.) Attempt to restart Apache from the XAMPP control panel.

3-A.) If you have Apache running by following the directions in steps 2A-2C then you're going to need to determine the path of your *htdocs* folder.

3-B.) In the XAMPP control panel click on the explore button which will open the XAMPP installation folder.

3-C.) Open the Apache folder, the conf folder, and then open the file called httpd.conf in a plain text editor.

3-D.) You want to determine your "htdocs" folder, so search for this name in the Apache configuration file httpd.conf.

3-E.) If you want to use a different folder/directory/path you can change it however I recommend making a copy of this file. You'll also have to restart Apache (simply press Stop and then Start). If you've saved the changes then restart Apache. Once restarted your htdocs folder will have changed.

4.) Move the files to the Apache htdocs folder.

5.) Open http://localhost in your browser. The site should load if you have followed these directions correctly. If not you'll need to list what exact step didn't seem to match what I explained.

Good luck!
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: turning php code into a beta website

Post by califdon »

Kieran Huggins wrote:Skype uses port 80 as a "get around the firewall" port - turn off skype first, then start it after your web server is running.
Hey, that's good to know! I use Skype but never knew that.
hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

Thanks, Got all down to 3-d searched for htdocs and was found in 2 folders 1) C:\xampp and 2) C:\xammp\security
Would not allow me to search in httpd.conf. said it is not a valid folder. Sorry man, Im tring
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: turning php code into a beta website

Post by JAB Creations »

Alternatively search the file for...
DocumentRoot
and...
<Directory

They should both have the same directory/folder/path set. When/if you change the path you need to do so for both.

Also go to the folder you want to change the directory/folder/path to and CUT the address from the address bar and paste it in to the file. All you have to do after that is change the back-slashes \ to forward-slashes / which I'm not sure what happens if you don't.
hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

I think I am beginning to understand. I need to change something in the text document. Can I post the part that may need to be changed to the forum?
hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

my doc root and directory both say <Directory "C:/xampp/htdocs"> and DocumentRoot "C:/xampp/htdocs" is this what you are talking about. also when I go to localhost it brings up the xampp page and says I should test the status and when I do all is well exept ftp service is deactivated???
hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

fixed the ftp deactivated issue by turning on the service. Saved the folder with the code to C:\xampp\htdocs restarted apache and nothing different at localhost. Im just missing a step I think. Probably laughing at my ignorance but....me too
hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

man Im getting in deep here. opened the conf file and when I saved it I saved as a word doc. What should I have saved it as?
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: turning php code into a beta website

Post by JAB Creations »

The Apache configuration file is plain text, just use notepad.

Do you or do you not have Apache running? Yes/No?

If you have Apache running then if you go to http://localhost/ you'll see a XAMPP website.

You don't have to change the location of the htdocs folder. I only mentioned it in case you had personal preferences though that seems to be a null point for you at this time.

Just delete the items in C:/xampp/htdocs/ and then move the files you're trying to use in place. Then load http://localhost/ in your browser.

I'm not sure if you're making the connection here...
C:/xampp/htdocs/ == http://localhost/

Or you could go to the folder, delete all the files, and then right-click and create a new "Text Document" and rename it to index.php. Then use the code below (turn OFF the line numbers so you don't actually copy the line numbers below).

index.php

Code: Select all

<?php echo "If you see this in your browser then you're on your way!";?>
So to test this out...
C:/xampp/htdocs/index.php == http://localhost/
or the same thing just with the unnecessarily long path....
C:/xampp/htdocs/index.php == http://localhost/index.php
hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

I must be getting close.finally. here is what i see when I load local host

Index of /
Name Last modified Size Description-------------------------------------------------------------------------------- PHPGeocache/ 19-Jun-2008 15:20 -
Thumbs.db 19-Jun-2008 15:12 13K
--------------------------------------------------------------------------------
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5 Server at localhost Port 80
hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

I did copy a folder with the files in it to the htdocs instead of each file individually....will thant make a difference?
hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

Also now first let me start by saying thank you for your patience. What do I do with it from here?
hvnlydaze
Forum Newbie
Posts: 20
Joined: Wed Jun 18, 2008 4:53 pm

Re: turning php code into a beta website

Post by hvnlydaze »

within the folder i put into htdocs there are 2 other folders and 5 files one of the folders says demo and has 1 file (xml)

in the other says sql and has 2 files 1 for waypoints and one for caches not sure if that matters
Post Reply