[solved]Bad Request message

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

[solved]Bad Request message

Postby twinsrus » 05. June 2012 19:00

The install process is telling me:

After starting of Apache (and MySQL), go to the address http://localhost/ or http://127.0.0.1/ in your browser and examine all of the XAMPP examples and tools.

I do this and I get a message: Bad Request (Invalid Hostname)

Suggestions?

Both Apache and MySQL are starting successfully, but I can't get any further than that.

Thank you.
twinsrus
 
Posts: 7
Joined: 05. June 2012 18:42
Operating System: Windows XP

Re: Bad Request message

Postby JonB » 05. June 2012 21:06

A. - what was the exact URL you used?

B. - Bad Request (Invalid Hostname) <== is an IIS error message. Its normally followed by a 400 error.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Bad Request message

Postby Altrea » 05. June 2012 23:22

JonB wrote:B. - Bad Request (Invalid Hostname) <== is an IIS error message. Its normally followed by a 400 error.

Well, "400 - Bad Request" is a standard HTTP status error code, so this can also be thrown by an Apache, but it is much more common for IIS Servers, you are right :)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Bad Request message

Postby twinsrus » 06. June 2012 14:17

I tried both, same result.

So if it is an IIS message, what do I do to get past it?

I pretty much know nothing about any of this stuff, just following the directions.

Thank you.
twinsrus
 
Posts: 7
Joined: 05. June 2012 18:42
Operating System: Windows XP

Re: Bad Request message

Postby Altrea » 06. June 2012 14:22

If this is an IIS message, your Apache ist not started or does not listen on port 80.
Thats the problem you should focus on.

What is the content of your \xampp\apache\logs\error.log file?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Bad Request message

Postby twinsrus » 07. June 2012 15:52

[Wed Jun 06 15:24:07 2012] [notice] Digest: generating secret for digest authentication ...
[Wed Jun 06 15:24:07 2012] [notice] Digest: done
[Wed Jun 06 15:24:17 2012] [notice] Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Wed Jun 06 15:24:17 2012] [notice] Server built: Sep 10 2011 11:34:11
[Wed Jun 06 15:24:17 2012] [notice] Parent: Created child process 3316
[Wed Jun 06 15:24:18 2012] [notice] Digest: generating secret for digest authentication ...
[Wed Jun 06 15:24:18 2012] [notice] Digest: done
[Wed Jun 06 15:24:19 2012] [notice] Child 3316: Child process is running
[Wed Jun 06 15:24:19 2012] [notice] Child 3316: Acquired the start mutex.
[Wed Jun 06 15:24:19 2012] [notice] Child 3316: Starting 150 worker threads.
[Wed Jun 06 15:24:19 2012] [notice] Child 3316: Starting thread to listen on port 4430.
[Wed Jun 06 15:24:19 2012] [notice] Child 3316: Starting thread to listen on port 8000.

As you can see, I changed the port assignments based on some documentation is saw when the apache service wouldn't start on the control panel. We have IIS running (according to someone in my MIS dept) - I can't see it when I display the processes page/

I appreciate the help very much.
twinsrus
 
Posts: 7
Joined: 05. June 2012 18:42
Operating System: Windows XP

Re: Bad Request message

Postby Altrea » 07. June 2012 18:18

So if you change the default port, you have to add it on every request too:
http://localhost:8000/
http://127.0.0.1:8000/

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Bad Request message

Postby twinsrus » 08. June 2012 15:46

Bingo! Thank you!
twinsrus
 
Posts: 7
Joined: 05. June 2012 18:42
Operating System: Windows XP

Re: [solved]Bad Request message

Postby twinsrus » 08. June 2012 18:45

Where in the XAMPP files can I reset the default to http://localhost:8000 so I don't have to type this in each time? I am looking around for the file but can't find it.

Also, when I try to install WordPress, it cranks for a while but then nothing shows up after it says Done. I am following the instructions by Siobhan McKeown, page 8 of 22. Thanks!
twinsrus
 
Posts: 7
Joined: 05. June 2012 18:42
Operating System: Windows XP

Re: [solved]Bad Request message

Postby Altrea » 08. June 2012 20:16

twinsrus wrote:Where in the XAMPP files can I reset the default to http://localhost:8000 so I don't have to type this in each time?

Simple answer: you can't.
If you just use an URL without a specific port extended, your request will have a default port which is generated from the protocol. For example the protocol http has the default port 80, so http://localhost/ is the same as http://localhost:80/.

But your port 80 is used by your IIS, so any http request without an port extended will be received by your IIS.

twinsrus wrote:Also, when I try to install WordPress, it cranks for a while but then nothing shows up after it says Done. I am following the instructions by Siobhan McKeown, page 8 of 22. Thanks!

In your Wordpress installation you have to use the new port too.
Without knowing the instructions by Siobhan McKeown myself i can't say any more to this.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: [solved]Bad Request message

Postby twinsrus » 11. June 2012 13:33

OK. Here is the short version:

1. Download and unzip WordPress. (unziped to xampp>htdocs and named wp_singlesite)
2. Configure WordPress. (opened up wp-config-sample and update the settings for the name of the database for WordPress (wp_singlesite), database user name (root), database password (''), host name (localhost:8000), and saved as wp-config.php.
3. Install WordPress (opened browser and go to http://localhost:8000/wp_singlesite/)

At this point, it looks like it is loading, and the WordPress installation screen should appear, but all I get is a Done in the lower left corner of the browser and nothing else. The example graphic shows the URL should be http://localhost:8000/wp_singlesite/wp-admin/install.php but I am not seeing that.

Suggestions?

Thank you for your continued patience.
twinsrus
 
Posts: 7
Joined: 05. June 2012 18:42
Operating System: Windows XP

Re: [solved]Bad Request message

Postby Altrea » 11. June 2012 14:13

twinsrus wrote:host name (localhost:8000)

Thats wrong. host name is not your http host name but your databse host name. Your database port is still the same so it can be omitted there.
I've quickly tested to run wordpress on port 8000 on my own and it can be done without any problems.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: [solved]Bad Request message

Postby twinsrus » 11. June 2012 18:30

I may have misled you. Maybe not. I'm not sure what I am doing.

The directions I am following to update the wp-config file are:

/**The name of the database for WordPress */
define('DB_NAME', 'wp_singlesite'); **the name I have chosen for my database

/** MySQL database username */
define('DB_USER','root';

/** MySQL database password */
define('DB_PASSWORD','');

/** MySQL hostname +/
define('DB_HOST)','localhost');

So you are saying I should not use localhost:8000 in the last statement, and I don't need the 8000. What name should I use for the database host name if not localhost? wp_singlesite? Something else?

Sorry for the inane questions, but it still isn't sinking in. Thank you.
twinsrus
 
Posts: 7
Joined: 05. June 2012 18:42
Operating System: Windows XP

Re: [solved]Bad Request message

Postby Altrea » 11. June 2012 18:55

twinsrus wrote:What name should I use for the database host name if not localhost?

localhost is correct there.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests