XAMPP Installed, Apache/MySQL Started, Still Accesses I-net

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

XAMPP Installed, Apache/MySQL Started, Still Accesses I-net

Postby skeezix » 27. October 2007 18:41

As the Subject line says, I installed XAMPP, started the Apache and MySQL servers, no errors, installed WordPress, and began playing with it when what to my surprise - I was accessing my blog on the internet rather than the one installed under XAMPP.

To prove it, I turned off my modem, tried to run the WP Admin (Dashboard) and got a "Page not found" for my efforts.

myPhpAdmin runs fine under XAMPP with the modem off.

To populate my wordpress database, I imported a backup of my remote host wordpress database. I suspect it is full of links back to the internet but I thought "localhost" would rerout all those links back to my local wordpress installation.

My hosts file contains a
Code: Select all
127.0.0.1   localhost
entry.

What should I be looking for in resolving my problem??
skeezix
 
Posts: 16
Joined: 20. October 2007 04:20
Location: Colorado

Postby Wiedmann » 27. October 2007 19:24

I suspect it is full of links back to the internet but I thought "localhost" would rerout all those links back to my local wordpress installation.

If WordPress is using absolute URI in building the HTML, and the hostname in the WordPress setup is the name of your internet server, it's clear that your browser want's connect to to the internet. Because there is no hostname "localhost" in the HTML links.

My hosts file contains a

For testing you can add the hostname of your internet server to this file.

(Or don't use a script which uses absolute URIs.)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby skeezix » 27. October 2007 19:43

If WordPress is using absolute URI in building the HTML, and the hostname in the WordPress setup is the name of your internet server, it's clear that your browser want's connect to to the internet. Because there is no hostname "localhost" in the HTML links.


Makes sense. Except my wp-config.php looks like this:

Code: Select all
// ** MySQL settings ** //
define('DB_NAME', 'wordpress');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_HOST', 'localhost');


Is this the hostname in the WordPress setup you are refering to?

For testing you can add the hostname of your internet server to this file.


Ah, but that brings me back to where I started. If I modify the HOSTS file as you suggest (something I tried in the past), then won't I have to modify it again when I want to connect to the remost host? That's the reason I installed XAMPP - so I wouldn't have to keep modifying my HOSTS file. Maybe I misunderstand the concept of XAMPP or am using it in the wrong context...

So...

(Or don't use a script which uses absolute URIs.)


This is a new concept to me. I have no idea which script I should use/modify. Is it possible this is going down the wrong road anyway? The reason I ask is because as I mentioned in my initial post, I populated my Wordpress database with a backup of my online database. And that contains beaucoup links to http://mywebsite.com.

What am I missing here?
skeezix
 
Posts: 16
Joined: 20. October 2007 04:20
Location: Colorado

Postby Izzy » 27. October 2007 23:38

Edit
This is clearly not an Apache (XAMPP) issue as Apache is performing just as WordPress is telling it to do and therefore is a WP issue and really needs to be addressed by WP.

Some good but time consuming reading in the Docs and at:
http://codex.wordpress.org/Main_Page


After reading some of the docs and visiting the WordPress forums and doing a search, it may not be possible to mess with absolute to relative paths as I indicated before this edit. :(
http://wordpress.org/search/relative+ab ... s?forums=1

http://comox.textdrive.com/pipermail/wp ... 08955.html

So in effect you may have to do a separate install for your local WP.

Someone may have written a plugin that may help with this path issue as it will not be unique to you or any XAMPP/WP user's situation by sharing a local installation with a hosted installation.
IMHO not many scripts of this ilk are shareable in this way and usually need to be manually edited to reflect edited changes on both installs.
http://wordpress.org/support/forum/10
http://wordpress.org/support/topic/97820

Perhaps search the above forum for a suitable plugin perhaps.
http://wordpress.org/search/absolute+re ... s?forums=1

http://wordpress.org/support/topic/92523
http://codex.wordpress.org/Template_Tags/wp_list_pages

Also this post might be of interest and contacting the author for more details about how to implement it in WP might be worth a try:
http://community.apachefriends.org/f/viewtopi ... 665#109665
/Edit


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby skeezix » 28. October 2007 04:05

I read all the links you suggested.

Whew!

Truth be told, I've spent an enormous amount of time getting XAMPP and Wordpress working together. Couldn't have done it w/o your help, either. But each hurdle I overcome only reveals another one. It's just not worth the effort, having a zillion usernames, passwords, databases, and trying to remember which uid/pw combo goes with what, then boogering up a live blog and having to restore, etc. etc.

And it cuts seriously into my burger-eatin' time!!

I think I'll just install another instance of WP at my remote host, set up a test blog and fiddle with that.

Thanks again for all your help. I just wasn't cut out to be a programmer.

One last request - how do you get all those links into your posts? Drag and drop from other windows??
skeezix
 
Posts: 16
Joined: 20. October 2007 04:20
Location: Colorado


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 107 guests