surveys
December 12, 2023, 3:14pm
1
http://www.free-paid-surveys.info/newsletter_signup.php
The page above is a form used by customers to sign up. The form is backed by a PHP script that stores customer’s data to a MySQL database created in my account at infinityfree.com . The script filters customer’s data then connect and stores it to db.
Script runs well until connection command when a white page shows up without any error mesage, and data get not stored in db.
Please help me!
Oxy
December 12, 2023, 4:56pm
2
Hi and welcome to the forum
I had entered everything necessary on your form and when I clicked the button I saw error 500 in the browser console
So here are instructions on how to enable error reporting
When trying to access your website, you may see a page which returns the status code “500”. In Google Chrome, you’ll see a page with the error code HTTP ERROR 500.
There are typically two reasons which can cause this error:
The PHP code has crashed.
The .htaccess file contains invalid rules.
Here are some things you can try to debug and fix this.
Fixing crashing PHP code
A HTTP ERROR 500 simply tells you that the PHP code has crashed, but gives no information as to why it has crashed.
Gett…
9 Likes
surveys
December 12, 2023, 7:08pm
3
Thank you for your peply! I will try your suggestions and will report the results.
2 Likes
surveys
December 14, 2023, 3:40pm
4
I am back as I promised!
After all as a user of infinityfree.com hosting service I have no permissions to php.ini and server configuration files that may help. But there is a rule of hosting service that states:
“… please note that it’s NOT possible to connect to the free hosting databases from outside the hosting platform. This means you cannot access the database from desktop or mobile applications directly, or use them in applications hosted elsewhere.”
Now I am asking can it be the cause ?
If you are trying to connect to the database from outside of your domain name, then yes, that would be the cause.
6 Likes
Oxy
December 14, 2023, 9:19pm
6
By the way, review the code you have on this file
because I don’t see closed </body> </html>
anywhere
5 Likes
surveys
December 15, 2023, 1:32pm
7
Thank your for your prompt and deep analyzing reply!
Code elements you was lookingfor are in place, I tried to attache a screenshot but the system denies me.
So the question remain, the database connection via the link above, is in or out of my domain? This can make an explanation ! Please help decide
Oxy
December 15, 2023, 2:31pm
8
I can’t tell you which DB your PHP code is trying to connect to
and it probably doesn’t succeed, that’s why you have error 500
in one of the posts above I gave you instructions for error 500
Did you do that ? and what did you see as an error after you enabled error reporting?
Both the popular PDO and MySQLi libraries are available on all accounts and PHP versions, which are the libraries all (modern) scripts use to connect to a MySQL database. However, to use a database, you need to configure a few things first.
Before you can use a database, you need to create the database first. You can create a database through your control panel in the section called MySQL Databases. Simply enter a desired name in the text box and click Create Database.
To use the database with…
Many websites use MySQL databases to store information and settings. However, there are some reasons why the connection to the database may fail. This article describes some commonly seen error messages when connecting to a database, as well as some general tips to keep in mind when setting up a database connection.
Common Error Messages
Using MySQL is great, but the error message returned if there is an issue logging in to your database can be quite confusing. Here are some commonly seen error…
Sometimes, you may want to connect to your MySQL database on your free hosting account using external software, like a desktop database manager (like MySQL Workbench) or an external program you wrote yourself (like an Android or iOS app).
You cannot connect to a free hosting MySQL database from outside your hosting account.
You can only interact with your free hosting database through PHP scripts uploaded to your free hosting account, or through our phpMyAdmin installation.
The ability to con…
Many scripts require a MySQL database to work, and you will need to create a new database to use with your script. This article describes how to create a database and get the necessary settings for your script.
Create a new database
Before you can use a database, you need to create it first.
Login to your client area and go to the Accounts list.
Find your hosting account in the list and click Manage.
Click the Control Panel button in the account overview page.
Go to MySQL Databases.
In the fi…
7 Likes
system
Closed
December 22, 2023, 2:31pm
9
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.