Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-26 16:41:54

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

XAMPP on external drive: mapping trouble?

This issue has been resolved. See post 7 below.

<hr />

I have an older version of XAMPP on a local drive. I haven’t had much luck trying to update it where it’s at, so I’ve decided to install a new version on an external drive and export my databases from one to the other, remove the former works, and move the new works back (eventually). I’ve also completely mimicked the directory stucture from the local drive to the external drive. The new server and database work fine. So far so good.

However, when I try and actually go to a site, either front or backend, I’m getting an <code>Access Forbidden — Error 403: You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected.</code>

The index file is definitely there, and directory access (permission) shouldn’t be the problem.

In the XAMPP <code><httpd-conf</code> file I’ve edited the paths in the Virtual Host Containers (VHCs) accordingly to reflect the new drive letter, and in the Windows <code>hosts</code> file I didn’t change anything because the directory structures never changed from one server to the other.

I’m guessing it might have to do with communication between the the Windows <code>hosts</code> file on the local machine and the new server on the external drive.

Question: Am I mapping it wrong? Should something change in the hosts file? Basically how do you map to an external drive?

Last edited by Destry (2006-08-07 10:39:52)

Offline

#2 2006-07-26 17:05:17

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: XAMPP on external drive: mapping trouble?

So I thought I would try turning on the local xampp package to quickly check if I could access the old stuff. At first I couldn’t, but when I turned the old stuff off again, suddently the pages showed up. I logged in and check which drive was being looked at and it was the local machine drive (c:\), but it was working via the external drive’s xampp control. Very strange.

At any rate, it looks to indeed be a problem of pointing the Windows <code>hosts</code> file to the VHCs on the external drive…anyone know how that’s supposed to look in the <code>hosts</code> file?

For what it’s worth, here’s a representative VHC in the <code>htppd-conf</code> file (external drive W:\)…

NameVirtualHost local.domain.tld:80
<VirtualHost 127.0.0.1:80>
ServerAdmin admin@local.domain.tld
DocumentRoot W:/_txp/domain
ServerName local.domain.tld
<Directory W:/_txp/domain>
Options Indexes FollowSymLinks 
AllowOverride FileInfo
</Directory>
</VirtualHost>

And here’s a typical entry in the <code>hosts</code> file: <code>127.0.0.1 local.domain.tld</code>, which is where I think the real problem must be (probably the local IP, but how to point outward?)

Last edited by Destry (2006-07-26 17:15:23)

Offline

#3 2006-07-26 17:31:59

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: XAMPP on external drive: mapping trouble?

@Destry ,did you check, weather your new XAMPP package gives you a default php.info page ?

However, because I will be out of town for a couple of days (no internet access there), personally,
I have experienced two things when working with multiple XAMPP packages.

1) On some of the older packages, require to have the XAMPP folder on the root Level of your Drive, others not.
2) Sometimes apache and mysql keep still running , without you knowing about it. This can cause the other install not to work.
You can check against this (on win2000 I do ctrl alt del to bring up the Task Manager, and then selecting the processes tab)
Don’t be afraid, you wan’t do any harm to your System Files, even MS says so.Now scroll down the list and look for
processes, that look like apache or mysql select these and click end processes.
3)The Xampp package is installed as a service (To be avoided under my opinion) and therefore looks for some ini files on your System volume instead
4)Clear your brother cache, or and try a different browser .
5)The hosts file has nothing to do with this, so you can just leave everything as is.
6)Those special USB minimal httpd.conf files will not work with virtual host containers,
since there is no absolute directory root.(Carry the drive around, USB stick and so on)

I hope that you can resolve your Issue.

I am switching right now to MAC and I have set up a couple of virtual hosts with MAMP,
so I noticed that article in the TextBook is really old and doesn’t help much.
A new one for TextBook would be nice, wouldn’t it ?

regards, marios

Last edited by marios (2006-07-26 17:32:23)


⌃ ⇧ < ⌃ ⇧ >

Offline

#4 2006-07-27 10:13:53

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: XAMPP on external drive: mapping trouble?

marios wrote: 6)Those special USB minimal httpd.conf files will not work with virtual host containers,
since there is no absolute directory root.(Carry the drive around, USB stick and so on)

I think that’s the key right there, but this dual XAMPP business is already starting to irritate me. I think what I’m going to do is dump my databases from the older working package, zip up the older package, remove the older package files, move the new one into its place, and reload the DB dumps.

The only reason I didn’t do that to begin with is because I wanted to confirm the database would upload and function without problems from the older version to the newer one. A couple of trial uploads shows that the databases do in fact upload (after many time-outs) but since I can’t actually see the site yet I’m not 100% sure everything is O.K. Nevertheless, I’m going to go for the blind switcharound and hope for the best.

I am switching right now to MAC and I have set up a couple of virtual hosts with MAMP, so I noticed that article in the TextBook is really old and doesn’t help much. A new one for TextBook would be nice, wouldn’t it ?

I wouldn’t know about the MAMP doc as I don’t use it, but I can see that the XAMPP for Windows is certainly outdated; both with the screenshots and how certain XAMPP files are described. I’ve discovered from this recent chain of events (and from the XAMPP docs) that you cannot move a XAMPP package from one directory to another if you have the “installer” version, but you can with the 7-zip package. Since I think such portability is more flexible, I’ll rewrite the XAMPP for Win docs based on the 7-zip package and leave it as just that one doc, rather than the two that are there now (zip and installer versions). Easier to maintain too.

I trust you’ll update the MAMP docs if they need it. Contact Andreas or Neutrino if you want help with the images, they’ve volunteered to help with image creation in the wiki.

Offline

#5 2006-07-28 18:52:30

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: XAMPP on external drive: mapping trouble?

marios wrote: Sometimes apache and mysql keep still running , without you knowing about it. This can cause the other install not to work … Now scroll down the list and look for processes, that look like apache or mysql select these and click end processes.

Do you know what names I should be looking for in particular? I don’t see anything recognizable but I think there may be a culprit in there somewhere. However, if I uninstall XAMPP, then any process files should go with it, right?

Offline

#6 2006-07-30 11:35:18

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: XAMPP on external drive: mapping trouble?

OK, this problem prevails, but in a form different than what I initially posted about. The good folks over at Apache Friends are helping (but are equally stumped so far). I recommend if you use XAMPP with WindowsXP, you check this thread for some eye openers.

Last edited by Destry (2006-07-30 11:35:51)

Offline

#7 2006-08-07 10:35:31

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: XAMPP on external drive: mapping trouble?

This issue has been resolved. Idiot (and not so idiot) things I’ve learned:

  • You can not run two instances of XAMPP on the same machine, even if one is turned off. It screws up Windows XP, in particular, it’s ability to set and default to daemon paths properly.
  • Even though Windows XP looks and behaves like you can remove the “Read only” property on a folder, you can’t (don’t believe me, try it; remove it from properties, save, and then go back and check it again). It doesn’t matter, even if you get a warning/error when using XAMPP about a folder being Read-only, ignore it, it’s not the problem and you should never try and use any workarounds you might find in the Microsoft KB about changing folder permissions in uncharacteristic ways.
  • Even though you can use a XAMPP Control Panel, you shouldn’t. If there are problems, the Control Panel will never give you clues as to what the problems are, it will simply not work, useless. Always use a command shell to run XAMPP <em>.bat</em> and <em>.exe</em> files. This will ensure XAMPP is always running as it’s supposed to be, and if not you’ll get very helpful error messages to track problems down.
  • NEVER double-click any XAMPP file in Windows File Manager to open it, including the XAMPP Control Panel. This begins to send you down the road to hell (screws up the path communication between Windows and XAMPP). ALWAYS use the command shell to run any XAMPP <em>.bat</em> or <em>.exe</em> file, including the XAMPP Control Panel if you decide to use it.
  • If you make the mistake and take the road to hell, and you later run a file in the shell and see “Cannot find the php cli!”. Well, there’s ways to fix things that are mentioned in one place or another there, but I’ll not get into it here.
  • VirtualHosts are handled a little differently in newer versions of XAMPP: they are now imported into the httpd-conf file from another file, the defaults are set more strict, and you need to counter the strict defaults to get your VirtualHosts to work. (This was probably my original problem, and I’ve been chasing ghosts making things worse all along.) The examples I’ve used in TextBook (link below) work correctly!

Anyway, I’ve seemingly remedied all my problems and I’ve rewritten the XAMPP with Windows doc in TextBook. This will be the only XAMPP doc that TextBook will support from hereon (we used to have the zip version and the installer version, but we’re only going to maintain the zip versions). If anyone would like to look it over and comment, or make changes directly. Feel free.

Last edited by Destry (2006-08-07 15:10:33)

Offline

#8 2006-08-07 10:40:39

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: XAMPP on external drive: mapping trouble?

Uniform Server took only a few minutes to install on my jump drive. It figures out the drive letter and takes care of everything else. I’d say from download to setting up Textpattern, it’s about 5 minutes. htaccess works properly too.

Offline

#9 2006-08-07 11:18:05

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: XAMPP on external drive: mapping trouble?

Hey, thanks for the link, deldin. Next time I do a complete system upgrade, maybe I’ll give that a go.

In fairness to XAMPP and honesty to myself, most of my problems were my own doing and lack of understanding to begin with (I’m wiser now), but I will say this about XAMPP…their documentation is terrible; it’s neither clearly written nor is the architecture of that information intuitive and usable. I would think there’s enough native English-speaking users of XAMPP now that they would provide better information for that language category, or take on a native English speaker to rewrite what docs they have. Either way, it’s needed. The key, though, is to not fall off the beaten path to begin with, like I did. ;)

Offline

#10 2006-08-07 12:27:18

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: XAMPP on external drive: mapping trouble?

Destry wrote:

Next time I do a complete system upgrade, maybe I’ll give that a go.

I seem to be doing that every two days :D (It’s been awhile since I’ve partitioned, so I killed my Windows access a few times).

Also, if you switch between computers or move your jump drive around a bit, SyncToy is extremely valuable. I keep a syncronized server on my thumb drive and PC drive.

Offline

#11 2006-08-07 13:42:37

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: XAMPP on external drive: mapping trouble?

Over the last couple of years, I’ve tried all different install and go AMP solutions for Windows. XAMPP being one of the few still hanging around, many have bit the dust, sad to say.

Today, I find it easier to do the following:
a) Use the Apache 2.0.x msi installer
b) Use the MySQL 5.0.x msi installer
c) Use the PHP 5.1.x zip file and follow the instructions

Though at first it may seem harder, the next time you have to upgrade, it’s just as fast as an unzip and go solution and it teaches you a bit more about what’s going on under the hood.

Apache and MySQL start up as daemons, cough services, on bootup.

Offline

#12 2006-08-07 15:17:57

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: XAMPP on external drive: mapping trouble?

I’ll admit I have not split my hard drive and tried that keeping two installs that way. What I was trying to do was temporarily keep another install on an external storage drive. Normally I wouldn’t want to run two installs of XAMPP anyway, but it had been a while since an upgrade (missing one or two versions), and I wanted to make sure my databases would transfer before just pulling the plugin on the first one. Thankfully, in the end, they did.

hcgtv wrote:

Apache and MySQL start up as daemons, cough services, on bootup.

yeah, I had considered installing individual components when it looked like nothing else was working… that or reinstalling my OS, which was truly a last resort. I still would like to do that sometime in the future, but I’ll wait until I have another machine to do that on. Right now I need to be productive (and catch up) on some things. XAMPP is fresh and working and that’s where it sit’s for a while. Good call though.

Offline

Board footer

Powered by FluxBB