I was getting a DB error message when I tried to create a user.
I then went to include/admin.php and added else return $cal_db->sql_error();
It now says Field 'first_name' doesn't have a default value. I only have boxes for username and password nothing for the first name. I tried the page in both IE and Firefox same issue.
When I add a event it says Unable to complete the update.
In my config I am using the root user and password for the mysql database for testing I have setup a DB called reece and all the tables are in the DB. Also mysql is version 5.0.45.
Config file information
// the sql server host - this is usually "localhost" if the database server is on the same machine
// the sql database user that php will log in with
// the sql database user's password
// this defines the connection is to a mysql database. This is the only one supported at the moment.
// this is the name of the database the calendar tables are stored in.
// this is the prefix of the database tables. If you change the names of the tables, you need to change this.
// this is the user password salt. do not change this unless you know what you are doing!
// the root username for the system
// the default root user password (overwritten later from options table)
// normally this is blank, but if you are loading the calendar from a file in a
// different directory, you will probalby need to this for it to find the files it needs.
// This defines if the calendar is stand alone, or integrated into a website
define("CAL_STAND_ALONE", TRUE); // true or false
// only used if CAL_STAND_ALONE is true. Sets the title tags in the html header to this.
define("CAL_STAND_ALONE_TITLE","Reece PHP Calendar");
// this defines if you want to use a query designed for MySQL 5.0.0 and above or a query deisgned for MySQL 4.1.1 and above.
define("CAL_SQL_MYSQL_5", True); // Change to false if you don't have MySQL 5 yet!
Any suggestions I’m at a loss Thanks
That is a database issue. Your version of MySQL is requiring a value for the first_name column since no default is specified in the database, and my script is not specifying the first_name (havn't put that functionality there yet).
You can either add the default with something like this:
ALTER TABLE cal_users CHANGE first_name first_name VARCHAR( 50 ) NOT NULL DEFAULT ''
OR you can just drop the column since it's not used right now:
alter table cal_users drop column first_name
(ps: I think the user table is named cal_users, but don't have access to my system right now so I can't check, so you might have to verify that for those queries)
I am not having a problem adding users, although I am getting an error message saying "unable to complete the update". I've been looking at everything line by line and I'm going mad because I cant see anything wrong. Any ideas??
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.