|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here! |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Not to long ago i had a login script created for one of my sites. All it does is allow the user to view extra content that i have on the site. It asks them for a username, password, their first name and their email address. I just found out that it no longer allowing people to register and i don't know why. I do know that the script connects to the database with no problems and their is also plenty of disk space. I only have about 100 registered users and doesn't seem to allow anymore. Is there something that i shuould look for in the script? or is their something i should do to the database itself?
__________________
It's better to do business with me than against me! |
|
|||
|
More info is needed to really help you disect this problem.
What was the script programmed in? Did it set any limits in the code? Do you have any ID numbers assigned that may be limited to 2 digits in the database? Is it exactly 100? That could be an indicator. Has the script or the database changed at all? This is sort of like talking to a mechanic and saying your car won't run. He's going to need more information. It could be out of gas, the battery could be dead, or it could be something serious. Those questions above should get us started in the right direction. Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies |
|
||||
|
Ok I can answer those...
Quote:
Quote:
Quote:
Quote:
Thanks brian.mark
__________________
It's better to do business with me than against me! |
|
|||
|
Ok, now that we have some basic answers, next questions.
Can you manually add someone to your database? Have you recently switched hosting, or has your version of PHP recently been upgraded by your web host? I think we're starting to narrow things down a bit here. Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies |
|
|||
|
i can answer those 2
Quote:
Quote:
__________________
It's better to do business with me than against me! |
|
|||
|
Quote:
Is the new site on the same server? Just curious. Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies |
|
|||
|
Quote:
__________________
It's better to do business with me than against me! |
|
|||
|
Quote:
Quote:
I deleted some users as you suggested and i tried to create new ones, but that didn't work. I wont let me add any new users
__________________
It's better to do business with me than against me! |
|
||||
|
email addresses?
I use PERL with SQL and with PERL you need a backslash before the @ symbol. For example email@email.com would fail (Syntax error) email\@email.com would be OK With SQL Blank inputs may fail Of cause you can't ask users to input this, so the code has to add it. Typical SQL line, note single quote even for blanks, except with numbers:- INSERT INTO `compare_data1` VALUES ('Bookplace Ltd', 'Books', 'Books', 'HOUSE TO LET, A', 'Books', 'HOUSE TO LET, A', 10.99, 0, 'ukpounds', '', '', 'http://www.awin1.com/awclick.php?gid=21734&mid=321&awinaffid=25014&p=ht tp://www.thebookplace.co.uk/bookplace/display.asp?cid=awin&isbn=1404366571', 200, 200); '', above is a single quote then a null then a single quote. |
|
|||
|
Quote:
The script worked just fine up until a few days ago.
__________________
It's better to do business with me than against me! |
|
||||
|
Quote:
But I recently had a simular problem (I think with SQL temp files, going up to a limit then stopping). I found out the following:- #1030 - Got error 28 from table handler It means that your hard disk is full (probably in your MySQL database but it could be elsewhere and interfering with the free running of your database). Try clearing up some files, optimising or repairing your database. This problem can be serious as your MySQL is usually stored in a partition on your hard disk and this error usually means it is full - if it is you need to free up space or your data could become corrupt. Error 28 it says "No space left on device". Is the temp directory that MySQL is using have sufficient space? If not you can restart the server pointing the temp directory to a location where space is more abundant. Later after Drop-ing and Deleteing Tables the and the Database making sure data was clean, waiting a day. Creating a new Database then INSERT INTO data again it seemed to work OK again. |
|
|||
|
Code:
<?
if (isset($_COOKIE['Admin']))
{
require_once("conn.php");
if (isset($_POST['Add']))
{
$cUsername = $_POST['username'];
$cPassword = $_POST['password'];
$cFullname = $_POST['fullname'];
$cEmail = $_POST['email'];
//Check for existing user
$sq = "SELECT * FROM users WHERE username = '$cUsername'";
$sr = mysql_query($sq) or die(mysql_error());
if (mysql_fetch_array($sr)) die("User already exist");
//Add if not exist
$aq = "INSERT INTO users (username, password, fullname, email)
VALUES ('$cUsername', '$cPassword', '$cFullname', '$cEmail')";
$ar = mysql_query($aq);
//Preare personal message record for this user
$suq = "SELECT * FROM users WHERE username = '$cUsername'";
$sur = mysql_query($suq) or die(mysql_error());
$sua = mysql_fetch_array($sur);
header("location:users.php");
}
require_once("templates/toptempl.php");
require_once("templates/toppanel.php");
require_once("templates/addusertempl.php");
require_once("templates/bottomtempl.php");
}
else
header("location:adminlogin.php");
?>
__________________
It's better to do business with me than against me! |
|
|||
|
TrafficProducer....I understand what your talking about but tha data base is only 0.03 MB in size.
Here's a peice of my code where should i put a echo so i can debug? Code:
<?
if (isset($_POST['Add']))
{
require_once("conn.php");
$cUsername = $_POST['username'];
$cPassword = $_POST['password'];
$cFullname = $_POST['fullname'];
$cEmail = $_POST['email'];
//Check for existing user
$sq = "SELECT * FROM users WHERE username = '$cUsername'";
$sr = mysql_query($sq) or die(mysql_error());
if (mysql_fetch_array($sr)) die("Sorry. That user name already exists. Use your browsers back button and select a different username.");
//Add if not exist
$aq = "INSERT INTO users (username, password, fullname, email)
VALUES ('$cUsername', '$cPassword', '$cFullname', '$cEmail')";
$ar = mysql_query($aq);
//Preare personal message record for this user
$suq = "SELECT * FROM users WHERE username = '$cUsername'";
$sur = mysql_query($suq) or die(mysql_error());
$sua = mysql_fetch_array($sur);
header("location:welcome.php");
}
require_once("templates/toptempl.php");
require_once("templates/registertempl.php");
require_once("templates/bottomtempl.php");
?>
__________________
It's better to do business with me than against me! |
|
||||
|
I see you are using :-
Quote:
In which I use a $dbh->errstr Example:- $sth->execute or &sql_error_message("Can't open Could not execute SQL statement it maybe invalid. errstr==>" . $dbh->errstr); # dienice ("Can't open Could not execute SQL statement it maybe invalid"); The sub-routine emails me with any error. I bet PHP has similar |
|
||||
|
Hi
By putting the echo for Username in 3 different places and if the code is executed properly then you will see 3 times the username. If not then investigate why it does not show the 3 echoes. Quote:
|
|
||||
|
Hi
By putting the echo for Username in 3 different places and if the code is executed properly then you will see 3 times the username. If not then investigate why it does not show the 3 echoes. Quote:
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |