Jump to content
[MUST READ] Forum Rules ×

ByetHost HTTP 500 Error


William

Recommended Posts

2 hours ago, William said:

I have a login page on my website. I am hosting on byet.host.  When the login form is submitted to login.php, it returns an HTTP 500 error. Please help!

Can i know the purpose of login page?

Where will a use get logged in using your login page?

Link to comment
Share on other sites

6 hours ago, William said:

I have a login page on my website. I am hosting on byet.host.  When the login form is submitted to login.php, it returns an HTTP 500 error. Please help!

Make sure your code doesn't have any bugs, or errors. Sometimes this kind of error happens when you haven't code something correctly.

Do you have a .htaccess, does the file have the appropriate permissions ?

Link to comment
Share on other sites

13 hours ago, mike said:

Make sure your code doesn't have any bugs, or errors. Sometimes this kind of error happens when you haven't code something correctly.

Do you have a .htaccess, does the file have the appropriate permissions ?

No, I do not have any bugs or errors, have tested it already, working on localhost. And no I do not have a .htaccess file, should I? If I should, can you please send me a link to where I can learn how to make for this, or just make it for me? Thanks for helping!

Edited by William
Link to comment
Share on other sites

16 hours ago, Aqib said:

Can i know the purpose of login page?

Where will a use get logged in using your login page?

The user enters the login information at 'loginpage.html' and sends the information through 'POST' to 'login.php' that checks for the user in the database.

Link to comment
Share on other sites

1 hour ago, William said:

No, I do not have any bugs or errors, have tested it already, working on localhost. And no I do not have a .htaccess file, should I? If I should, can you please send me a link to where I can learn how to make for this, or just make it for me? Thanks for helping!

The error occurred when submitting the data from loginpage.html to login.php ? Or simply by accessing the .html page ?

Link to comment
Share on other sites

1 hour ago, William said:

The user enters the login information at 'loginpage.html' and sends the information through 'POST' to 'login.php' that checks for the user in the database.

May be the field of your login form are not configured properly e.g id, name options of form field are not configured properly due to which a proper or required data is not being send to login.php and required action is not performed.

Link to comment
Share on other sites

2 hours ago, Aqib said:

May be the field of your login form are not configured properly e.g id, name options of form field are not configured properly due to which a proper or required data is not being send to login.php and required action is not performed.

I am sure everything should be working, but I got it to work on localhost, so it might be different on the host server?

Link to comment
Share on other sites

2 hours ago, mike said:

The error occurred when submitting the data from loginpage.html to login.php ? Or simply by accessing the .html page ?

I have now tried this in edge, since I usually use chrome, and it says: «HTTP 500 Microsoft Edge could not find file» even though I know it is there. Maybe the server is producing the wrong error?

Link to comment
Share on other sites

5 hours ago, William said:

I have now tried this in edge, since I usually use chrome, and it says: «HTTP 500 Microsoft Edge could not find file» even though I know it is there. Maybe the server is producing the wrong error?

If it works fine on local host than you might entering wrong database credentials as said by planet cloud. 

Are you using localhost as your database hostname?

If yes, then replace it with the correct database hostname which can be found in the control panel of your website.

Note: Free Hosting Account doesn't use localhost as database hostname

Link to comment
Share on other sites

Ok, so I have been messing around with my script, and  aint getting the error anymore. Now, the script just stops when looping through the database. And no matter what happens, it should echo out someting else than 'Starting operation' and then exit the file. That never happens!

I have attached the script:

cpanel.login.php

Edited by William
Link to comment
Share on other sites

On 14.5.2018 at 2:37 PM, PlanetCloud said:

A 50X Error's is mostly caused by the script.
Try debugging your script by showing error message's and see what the problem is.

Server is almost no diffrence.

Try Checking :

  • Have you created a database on the server?
  • Is the database credentials correct?
  • Have you debugged your script?

Yes, you were right. The database connection scripts got mixed so the real online db connection were the same as the localhost connection. Thats why the localhost worked, since that had its credentials, and the real one had localhosts. I still doesnt know the cause of the HTTP 500 error

Edited by William
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...