Map localhost to network drive

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Map localhost to network drive

Postby herschen » 30. July 2008 13:17

I use godaddy.com for my web hosting and there are a couple of problems that I have with hosting that limit my ability to edit files remotely. First--a godaddy specific problem--I cannot call another PHP "connection" file. Whenever I have tried to put my connection information (database name, login and password) in a separate file, godaddy chokes. This problem in not my main concern, but if anyone has any insight, please let me know. Secondly--a web hosting problem in general--I don't want to put my files up on my web hosting site until they are complete. I'd rather edit them elsewhere.

My problem recently is that I moved to a home about 20 miles from my office and therefore want all my files to be saved online, so I can edit them from home or work and not have to worry about whether or not I'm working on the latest version. I've already done this with my conventional documents, but I end up having to copy thousands of versions of the same web site, exporting MySQL databases, and making sure not to erase the wrong version. Are there instructions online how to get an FTP server without a web domain (or web hosting) to be "XAMPP online?" Or to just take that FTP server and map it as a network drive in Windows and then just change the localhost directory to Z:\XAMPP\htdocs where Z is the FTP server? Any help would be appreciated!
herschen
 
Posts: 3
Joined: 30. July 2008 13:02

Postby Nobbie » 30. July 2008 15:53

>I cannot call another PHP "connection" file

What is a "connection" file and what do you mean by "call"?

>Whenever I have tried to put my connection information (database name, login and password) in a separate file, godaddy chokes

What do you mean by "chokes"? You *urgently* should learn how to describe problems. The very first rule: supply FULL ERROR messages instead of "free (useless) text".

> This problem in not my main concern, but if anyone has any insight, please let me know.

No code, no error message - no insight.


>Are there instructions online how to get an FTP server without a web domain (or web hosting) to be "XAMPP online?"

???? This is quite not understable ????

A FTP Server software runs on a server. Due to TCPIP this server must have a "public" IP. If a FTP Server Software is running on that server, you may supply this public IP as server name. If there is a domain name for that public IP, you may specify the domain name as server name. Both has NOTHING(!) to do with a web domain.

Even more: there is no "web" domain, a domain is a domain and nothing more. You may run specific programs (called "server programs") on a server, which has a domain name. For example Apache (this is a Web Server Software) and/or FTP (this is a File Transfer Server) and so on.

What the hell means "Xampp online"???

>Or to just take that FTP server and map it as a network drive in Windows

You cannot map FTP servers as a network drive in windows, therefore you need a so called SMB protocoll (totally different to FTP). There are some Windows FTP clients which "emulates" the mapping of a network drive to a FTP server, but this is not a basic Windows feature.
Nobbie
 
Posts: 6579
Joined: 09. March 2008 13:04

Postby herschen » 31. July 2008 03:26

The reason I didn't give much information in the first paragraph is that I was not that concerned with the problem. Here's the information that you requested:

I mean at the top of the php file, I write:
Code: Select all
<?php require_once('../Connections/connDatabase.php'); ?>


The file connDatabase.php file contains this code:
Code: Select all
<?php
$hostname_connDatabase = "localhost";
$database_connDatabase = "database";
$username_connDatabase = "database";
$password_connDatabase = "database";
$connProperties = mysql_pconnect($hostname_connDatabase, $username_connDatabase, $password_connDatabase) or trigger_error(mysql_error(),E_USER_ERROR);
?>


This works fine if I have the above code inserted instead of the php require_once.

Right now I have my database on the localhost. It is in no way connected to the web. I was wondering how I could set up my localhost to access files from an online drive mapped as a local disk, so all of my files--and databases--are online, but they are only accessible on computers where localhost points to an htdocs directory on the mapped drive. Does that make sense?
herschen
 
Posts: 3
Joined: 30. July 2008 13:02

NetDrive + XAMPP

Postby herschen » 02. August 2008 11:47

I downloaded NetDrive and mounted my godaddy FTP server to the E: drive. I changed the mysql data directory to "e:\xampp\mysql\data" in My.ini and copied all the data fromc:\xampp\mysql\data. For Apache, I changed the DocumentRoot to E:\Xampp\htdocs and copied the htdocs directory over as well. Everytime I tried to access http://localhost/ I got a "Forbidden' page. Is there anything else I should know about changing the path of the DocumentRoot?
herschen
 
Posts: 3
Joined: 30. July 2008 13:02


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 28 guests