Page 1 of 1

[solved]Bad Request message

PostPosted: 05. June 2012 19:00
by twinsrus
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.

Re: Bad Request message

PostPosted: 05. June 2012 21:06
by JonB
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)

Re: Bad Request message

PostPosted: 05. June 2012 23:22
by Altrea
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 :)

Re: Bad Request message

PostPosted: 06. June 2012 14:17
by twinsrus
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.

Re: Bad Request message

PostPosted: 06. June 2012 14:22
by Altrea
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?

Re: Bad Request message

PostPosted: 07. June 2012 15:52
by twinsrus
[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.

Re: Bad Request message

PostPosted: 07. June 2012 18:18
by Altrea
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

Re: Bad Request message

PostPosted: 08. June 2012 15:46
by twinsrus
Bingo! Thank you!

Re: [solved]Bad Request message

PostPosted: 08. June 2012 18:45
by twinsrus
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!

Re: [solved]Bad Request message

PostPosted: 08. June 2012 20:16
by Altrea
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

Re: [solved]Bad Request message

PostPosted: 11. June 2012 13:33
by twinsrus
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.

Re: [solved]Bad Request message

PostPosted: 11. June 2012 14:13
by Altrea
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.

Re: [solved]Bad Request message

PostPosted: 11. June 2012 18:30
by twinsrus
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.

Re: [solved]Bad Request message

PostPosted: 11. June 2012 18:55
by Altrea
twinsrus wrote:What name should I use for the database host name if not localhost?

localhost is correct there.