View previous topic :: View next topic |
Author |
Message |
roofdog
Joined: 25 Jul 2002 Posts: 25
|
Posted: Thu Jul 25, 2002 12:14 am Post subject: making a comment ------> 404... |
|
|
hi there,
i've just got b2 and i've managed to integrate it on my page with no other problems, but when anyone tries to post a comment on a blog entry, upon clicking the 'go' button, they end up with a 404 message. i'm pretty sure that b2comments.post.php is in my directory, so i'm wondering if there is a line of code within b2comments.post.php that i need to change, to perhaps send the browser back to the correct page after a comment has been made.
apart from this, b2 is working brilliantly. but has anyone got some idea of what could be going wrong?
thanks
roofdog |
|
Back to top |
|
 |
nessahead
Joined: 12 Mar 2002 Posts: 312 Location: Los Angeles, CA
|
Posted: Thu Jul 25, 2002 12:15 am Post subject: |
|
|
Did you put b2 in a seperate directory? _________________ raar! |
|
Back to top |
|
 |
roofdog
Joined: 25 Jul 2002 Posts: 25
|
Posted: Thu Jul 25, 2002 12:25 am Post subject: |
|
|
well,
i originally had b2 in its own /b2 directory, but that caused a couple of problems so i started again, with all of the files in the same directory as my webpage.
i get correct "please enter a comment" and "please state your name and email address" type 'error' messages for when people dont enter comments correctly - its just that the 404 appears when a comment is entered, rather than the browser being sent back to the original page. i cant work out where exactly it's going wrong...
|
|
Back to top |
|
 |
VlaD
Joined: 25 Sep 2002 Posts: 3
|
Posted: Wed Sep 25, 2002 1:28 pm Post subject: |
|
|
I Have the same problem ! When I post a comment, I have a 404 error Can someone help me please ?  |
|
Back to top |
|
 |
VlaD
Joined: 25 Sep 2002 Posts: 3
|
Posted: Wed Sep 25, 2002 1:37 pm Post subject: |
|
|
Ok ! I found the little bug !
The original code (b2comments.php):
Code: | <form action="<?php echo $siteurl; ?>/b2comments.post.php" method="post">
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($HTTP_SERVER_VARS["REQUEST_URI"]); ?>" /> |
At the last line, you have tu change the ["REQUEST_URI"] by ["REQUEST_URL"] |
|
Back to top |
|
 |
michel v Site Admin
Joined: 25 Jan 2002 Posts: 799 Location: Corsica
|
Posted: Wed Sep 25, 2002 5:02 pm Post subject: |
|
|
Vlad, are you by any chance running a server that is not Apache ?
Because REQUEST_URI works correctly on Apache, and that's the only server I could try b2 on. If you're using another kind of server (or Apache 2 maybe ?), please tell me so I can make a per-server correction in the form.  |
|
Back to top |
|
 |
Mellissa
Joined: 17 Nov 2002 Posts: 29 Location: Malaysia
|
Posted: Tue Nov 19, 2002 5:38 pm Post subject: |
|
|
Sorry to bump up this topic but this happened to me too (I have b2 in a seperate directory) and what I did was open b2comments.php and looked at this line
Quote: | <form action="<?php echo $siteurl; ?>b2comments.post.php" method="post"> |
I changed the URL so it goes to b2/b2comments.post.php instead and it works fine for me now. Will it affect anything else? |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Tue Nov 19, 2002 10:29 pm Post subject: |
|
|
Hi Mellissa,
Your change should be fine. As you might have guessed by now, b2 is designed to reside in a single directory, but you can do as you have to make it work across directories. There may be other instances where you are going to need similar changes.
michael e |
|
Back to top |
|
 |
Mellissa
Joined: 17 Nov 2002 Posts: 29 Location: Malaysia
|
Posted: Thu Nov 21, 2002 5:53 am Post subject: |
|
|
macshack wrote: | Hi Mellissa,
Your change should be fine. As you might have guessed by now, b2 is designed to reside in a single directory, but you can do as you have to make it work across directories. There may be other instances where you are going to need similar changes.
michael e |
Alright, thank you! |
|
Back to top |
|
 |
|