error 404

Status
Not open for further replies.

davide78

New Member
Messages
6
Reaction score
0
Points
0
Hi,

I have uploaded a php file into the file Manager and I made it my index (index.php).

It is a very simple reservation form for my hotel, and it is connected to my reservation software which run on my pc.

Everything seems to run beautifully till I click the "book now" button, when pop up a page which say:
404 Error page: The page you requested is not available, please try again in a few minutes.

You can check by yourself at my web page: http://www.casanostrabooking.x10hosting.com/booking.php.

Can you please tell me what I did wrong???

Thank you very much for yours support

Davide Gisabella
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Are you sure that there is a booking.php in your public_html folder on x10hosting?
 

ichwar

Community Advocate
Community Support
Messages
1,454
Reaction score
7
Points
0
It seems like your booking.php is not where it should be. Could you make sure that it is really there in the exact same folder as your index.php
 

davide78

New Member
Messages
6
Reaction score
0
Points
0
Hi,

Thanks for your support....

I had deleted, by mistake, the booking.hph file, that is why I received that 404 error...

Now, I put the booking.php file back to the pulic_html folder and the booking online service is working very good; but, I receive the following messages, along with the " thank you for your booking" message, after I click the "book now":

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/daviden1/public_html/booking.php:69) in /home/daviden1/public_html/booking.php on line 412

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/daviden1/public_html/booking.php:69) in /home/daviden1/public_html/booking.php on line 412

Do you know why?

Thank you guys for your help

Davide
 
Last edited:

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
Ok, first of all it seems you have a "booking.php" and "index.php" that appear to be the same. A simple solution to that would be edit the line in the "index.php" that starts the form.

was :
HTML:
<form method="POST" name="enquiry" action="booking.php" onsubmit="return checkBooking();">

should be :
HTML:
<form method="POST" name="enquiry" action="" onsubmit="return checkBooking();">
or
HTML:
<form method="POST" name="enquiry" action="index.php" onsubmit="return checkBooking();">

That means you could now delete the "booking.php" file.

The 2nd problem you have with the session_start() failing is explained pretty well in the error reason. "...headers already sent..." , this means you have closed the <head> tag and php is trying to place cookies in it, but because its closed it can't. The solution would be to make sure that NOTHING is echoed or printed to the browser before the session has been started.
 
Status
Not open for further replies.
Top