phpScheduleIt
May 23, 2013, 02:43:50 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Install Problems  (Read 8389 times)
carrerasg
Newbie
*

Karma: 0
Posts: 11


« on: May 18, 2006, 01:22:01 PM »

Hi,

First let me just say a big THANKS for developing this software, I love it!
I´ve previously been using version 1.1.3 of the software with no problems, however, this beta adds some features that I could really use so I am trying it out.  I relly don´t know exactly where these problems lie (i.e. php, mysql or phpscheduleit) however, if I am pointed in the right direction I will gladly take the issues to the appropriate forums for those products.  Here is generally what my experience has been so far:

The upgrade script did not function at all for me ( .../install/update/)  I do not remember now the exact error, but I seem to remember it had to do with a closing bracket ")" that was missing.  I then tried to run the sql script itself, and mostly it went well but for some reason it could not create the table anonymous_users.  In fact, I could not even create that table manually.  I decided to try a fresh install vice an upgrade and got the same error with that table.  As a workaround, I manually edited all instances I could find that made a call for that table to read  "anonymous_user" (singular vice plural).  At this point, the table was created, and everything appeared to be working well... with the exception of managing or approving reservations.  Any attempt to use those two functions returns the following error:

There was an error executing your query:
DB Error: no such field

I have no idea what field it is looking for but I attempted to visually validate the database and it appears that everything is present that should be.  So that´s where I am now... would appreciate any insight into what I might do to fix this.

Here is my setup:
phpScheduleIt 1.2 best
MySQL v. 5.0.21
Apache 2.0.58
PHP 5.1.2
Windows XP

Thanks,
Glen
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #1 on: May 19, 2006, 09:39:54 AM »

I'm wondering if MySQL 5.x has an internal conflict with that table name.

If you are ok with trying a fresh install again, try executing this SQL script (this is the 1.2 script with the most recent bugfixes):

Code:

# phpScheduleIt 1.2.0 #
drop database if exists phpScheduleIt;
create database phpScheduleIt;
use phpScheduleIt;

# Create announcements table #
CREATE TABLE announcements (
    announcementid CHAR(16) NOT NULL PRIMARY KEY,
    announcement VARCHAR(255) NOT NULL DEFAULT '',
    number SMALLINT(3) NOT NULL DEFAULT '0',
    start_datetime INTEGER,
    end_datetime INTEGER
);

# Create indexes ON announcements table #
CREATE INDEX announcements_startdatetime ON announcements(start_datetime);
CREATE INDEX announcements_enddatetime ON announcements(end_datetime);

# Create login table #
CREATE TABLE login (
  memberid CHAR(16) NOT NULL PRIMARY KEY,
  email VARCHAR(75) NOT NULL,
  password CHAR(32) NOT NULL,
  fname VARCHAR(30) NOT NULL,
  lname VARCHAR(30) NOT NULL,
  phone VARCHAR(16) NOT NULL,
  institution VARCHAR(255),
  position VARCHAR(100),
  e_add CHAR(1) NOT NULL DEFAULT 'y',
  e_mod CHAR(1) NOT NULL DEFAULT 'y',
  e_del CHAR(1) NOT NULL DEFAULT 'y',
  e_app CHAR(1) NOT NULL DEFAULT 'y',
  e_html CHAR(1) NOT NULL DEFAULT 'y',
  logon_name VARCHAR(30),
  is_admin SMALLINT(1) DEFAULT 0,
  lang VARCHAR(5),
  timezone FLOAT NOT NULL DEFAULT 0
  );

# Create indexes ON login table #
CREATE INDEX login_email ON login (email);
CREATE INDEX login_password ON login (password);
CREATE INDEX login_logonname ON login (logon_name);

# Create reservations table #  
CREATE TABLE reservations (
  resid CHAR(16) NOT NULL PRIMARY KEY,
  machid CHAR(16) NOT NULL,
  scheduleid CHAR(16) NOT NULL,
  start_date INT NOT NULL DEFAULT 0,
  end_date INT NOT NULL DEFAULT 0,
  starttime INTEGER NOT NULL,
  endtime INTEGER NOT NULL,
  created INTEGER NOT NULL,
  modified INTEGER,
  parentid CHAR(16),
  is_blackout SMALLINT(1) NOT NULL DEFAULT 0,
  is_pending SMALLINT(1) NOT NULL DEFAULT 0,
  summary TEXT,
  allow_participation SMALLINT(1) NOT NULL DEFAULT 0,
  allow_anon_participation SMALLINT(1) NOT NULL DEFAULT 0
  );

# Create indexes ON reservations table #
CREATE INDEX res_machid ON reservations (machid);
CREATE INDEX res_scheduleid ON reservations (scheduleid);
CREATE INDEX reservations_startdate ON reservations (start_date);
CREATE INDEX reservations_enddate ON reservations (end_date);
CREATE INDEX res_startTime ON reservations (starttime);
CREATE INDEX res_endTime ON reservations (endtime);
CREATE INDEX res_created ON reservations (created);
CREATE INDEX res_modified ON reservations (modified);
CREATE INDEX res_parentid ON reservations (parentid);
CREATE INDEX res_isblackout ON reservations (is_blackout);
CREATE INDEX reservations_pending ON reservations (is_pending);

# Create resources table #
CREATE TABLE resources (
  machid CHAR(16) NOT NULL PRIMARY KEY,
  scheduleid CHAR(16) NOT NULL,
  name VARCHAR(75) NOT NULL,
  location VARCHAR(250),
  rphone VARCHAR(16),
  notes TEXT,
  status CHAR(1) NOT NULL DEFAULT 'a',
  minres INTEGER NOT NULL,
  maxres INTEGER NOT NULL,
  autoassign SMALLINT(1),
  approval SMALLINT(1),
  allow_multi SMALLINT(1),
  max_participants INTEGER,
  min_notice_time INTEGER,
  max_notice_time INTEGER
  );

# Create indexes ON resources table #
CREATE INDEX rs_scheduleid ON resources (scheduleid);
CREATE INDEX rs_name ON resources (name);
CREATE INDEX rs_status ON resources (status);

# Create permission table #
CREATE TABLE permission (
  memberid CHAR(16) NOT NULL,
  machid CHAR(16) NOT NULL,
  PRIMARY KEY(memberid, machid)
  );
 
# Create indexes ON permission table #
CREATE INDEX per_memberid ON permission (memberid);
CREATE INDEX per_machid ON permission (machid);

# Create schedules table #
CREATE TABLE schedules (
  scheduleid CHAR(16) NOT NULL PRIMARY KEY,
  scheduletitle CHAR(75),
  daystart INTEGER NOT NULL,
  dayend INTEGER NOT NULL,
  timespan INTEGER NOT NULL,
  timeformat INTEGER NOT NULL,
  weekdaystart INTEGER NOT NULL,
  viewdays INTEGER NOT NULL,
  usepermissions SMALLINT(1),
  ishidden SMALLINT(1),
  showsummary SMALLINT(1),
  adminemail VARCHAR(75),
  isdefault SMALLINT(1)
  );
 
# Create DEFAULT schedule #
INSERT INTO schedules VALUES ('sc1423642970aa9f','default',480,1200,30,12,0,7,0,0,1,'admin@email.com',1,0);

# Create indexes ON schedules table #
CREATE INDEX sh_hidden ON schedules (ishidden);
CREATE INDEX sh_perms ON schedules (usepermissions);

# Create schedule permission tables
CREATE TABLE schedule_permission (
  scheduleid CHAR(16) NOT NULL,
  memberid CHAR(16) NOT NULL,
  PRIMARY KEY(scheduleid, memberid)
  );

# Create schedule permission indexes #
CREATE INDEX sp_scheduleid ON schedule_permission (scheduleid);
CREATE INDEX sp_memberid ON schedule_permission (memberid);
 
# Create reservation/user association table #
CREATE TABLE reservation_users (
  resid CHAR(16) NOT NULL,
  memberid CHAR(16) NOT NULL,
  owner SMALLINT(1),
  invited SMALLINT(1),
  perm_modify SMALLINT(1),
  perm_delete SMALLINT(1),
  accept_code CHAR(16),
  PRIMARY KEY(resid, memberid)
  );

CREATE INDEX resusers_resid ON reservation_users (resid);
CREATE INDEX resusers_memberid ON reservation_users (memberid);
CREATE INDEX resusers_owner ON reservation_users (owner);

# Create anonymous user table #
CREATE TABLE anonymous_users (
  memberid CHAR(16) NOT NULL PRIMARY KEY,
  email VARCHAR(75) NOT NULL,
  fname VARCHAR(30) NOT NULL,
  lname VARCHAR(30) NOT NULL
  );

# Create additional_resources table #
CREATE TABLE additional_resources (
  resourceid CHAR(16) NOT NULL PRIMARY KEY,
  name VARCHAR(75) NOT NULL,
  status CHAR(1) NOT NULL DEFAULT 'a',
  number_available INTEGER NOT NULL DEFAULT -1
  );

# Create indexes ON additional_resources table #
CREATE INDEX ar_name ON additional_resources (name);
CREATE INDEX ar_status ON additional_resources (status);

# Create reservation_resources table #
CREATE TABLE reservation_resources (
  resid CHAR(16) NOT NULL,
  resourceid CHAR(16) NOT NULL,
  owner SMALLINT(1),
  PRIMARY KEY(resid, resourceid)
  );

CREATE INDEX resresources_resid ON reservation_resources (resid);
CREATE INDEX resresources_resourceid ON reservation_resources (resourceid);
CREATE INDEX resresources_owner ON reservation_resources (owner);

# Create mutex table (circumvents MySQL limitations) #
CREATE TABLE mutex (
  i INTEGER NOT NULL PRIMARY KEY
  );

INSERT INTO mutex VALUES (0);
INSERT INTO mutex VALUES (1);

# Create groups table #
CREATE TABLE groups (
  groupid CHAR(16) NOT NULL PRIMARY KEY,
  group_name VARCHAR(50) NOT NULL
  );


# Create user/group relationship table #
CREATE TABLE user_groups (
  groupid CHAR(16) NOT NULL,
  memberid CHAR(50) NOT NULL,
  is_admin SMALLINT(1) NOT NULL DEFAULT 0,
  PRIMARY KEY(groupid, memberid)
  );

CREATE INDEX usergroups_groupid ON user_groups (groupid);
CREATE INDEX usergroups_memberid ON user_groups (memberid);
CREATE INDEX usergroups_is_admin ON user_groups (is_admin);

# Create reminders table #
CREATE TABLE reminders (
  reminderid CHAR(16) NOT NULL PRIMARY KEY,
  memberid CHAR(16) NOT NULL,
  resid CHAR(16) NOT NULL,
  reminder_time BIGINT NOT NULL
  );

CREATE INDEX reminders_time ON reminders (reminder_time);
CREATE INDEX reminders_memberid ON reminders (memberid);
CREATE INDEX reminders_resid ON reminders (resid);

grant select, insert, update, delete
ON phpScheduleIt.*
to schedule_user@localhost identified by 'password';

#SET PASSWORD FOR schedule_user@localhost = OLD_PASSWORD('password');
Logged
carrerasg
Newbie
*

Karma: 0
Posts: 11


« Reply #2 on: May 19, 2006, 09:19:39 PM »

Thanks Nick,

I will try the script you posted.  Unfortunately it will be Monday before I have time to work with it.  I´ll post back and let you know how it goes.

Thanks again,
Glen
Logged
Bistro79
Newbie
*

Karma: 0
Posts: 29


WWW
« Reply #3 on: May 20, 2006, 05:49:15 AM »

At my installation it only works with this modified line:

# Create DEFAULT schedule #
INSERT INTO schedules VALUES ('sc1423642970aa9f','default',480,1200,30,12,0,7,0,0,1,'admin@email.com',1);
 
INSERT INTO schedules VALUES ('sc1423642970aa9f','default',480,1200,30,12,0,7,0,0,1,'admin@email.com',1,0);
Logged

quot;Sir, we are surrounded!" - "Excellent, we can attack in every direction!"
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #4 on: May 20, 2006, 10:36:16 AM »

That sounds like a bug to me.  Thanks for posting the fix.
Logged
carrerasg
Newbie
*

Karma: 0
Posts: 11


« Reply #5 on: May 22, 2006, 05:02:59 PM »

Nick,

I installed fresh today (with Bistro79´s edits) and the install went fine this time.  Amazingly enough, the table "anonymous_users" was created properly this time.  I have no idea why it wouldn´t work on Friday. But I´m happy that wasn´t an issue this time.  However, I´m still having the following issues.

1.  Clicking on "Manage Reservations" or "Approve Reservations" returns the following error:

There was an error executing your query: DB Error: no such field

Using MySQL Query Editor, I reran the query that I had previously logged and, it appears to have problems with this portion:

SELECT res.resid, res.start_date, res.end_date,
         res.starttime, res.endtime,
         res.created, res.modified,
         rs.name,
         l.fname, l.lname, l.memberid
         FROM reservations as res INNER JOIN login as l ON ru.memberid=l.memberid INNER JOIN resources as rs ON res.machid=rs.machid INNER JOIN reservation_users as ru ON res.resid = ru.resid WHERE ru.owner = 1 AND res.is_blackout <> 1 AND res.is_pending = 1 ORDER BY start_date DESC, res.starttime, res.endtime, l.lname, l.fname LIMIT 0, 25

Which returns this error: Unknown column 'ru.memberid' in 'on clause'

Which does exist in reservation_users.

Thanks,
Glen
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #6 on: May 23, 2006, 09:39:17 AM »

I'm going to try and update to that version of MySQL and see if I can reproduce this.  I don't understand this issue, though.
Logged
carrerasg
Newbie
*

Karma: 0
Posts: 11


« Reply #7 on: May 23, 2006, 02:21:18 PM »

Thanks, If I can find a different version of MySQL to try I will do that or maybe try on another machine here.  I can´t deny that things appear a little quirky on this machine.
Logged
carrerasg
Newbie
*

Karma: 0
Posts: 11


« Reply #8 on: May 23, 2006, 03:39:40 PM »

I was able to try this on another machine and receive the same results.  This machine is configured like this:

Apache 2.0.55
PHP 5.1.2
MySQL 5.0.19
Windows 2003 Server

I´m stumped... I was kinda hoping it was the fault of my quirky machine   Sad
Logged
Bistro79
Newbie
*

Karma: 0
Posts: 29


WWW
« Reply #9 on: May 26, 2006, 03:20:51 AM »

Hello Nick,

the formerly posted modification on the setup file is not in RC1.
Logged

quot;Sir, we are surrounded!" - "Excellent, we can attack in every direction!"
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #10 on: May 26, 2006, 12:23:46 PM »

Good to know.  Thank you very much!
Logged
carrerasg
Newbie
*

Karma: 0
Posts: 11


« Reply #11 on: May 31, 2006, 04:14:04 PM »

Nick,
I´m not sure if you had a chance to try an upgraded MySQL yet or not, but I happened to find that there were some changes made to versions as of 5.0.12.  I´m not schooled enough in SQL to tell if this is actually the problem or not, but perhaps it bears looking at?  The relevant section I believe starts with "Further changes in join processing were made in 5.0.12 to make MySQL more compliant with standard SQL..."

http://dev.mysql.com/doc/refman/5.0/en/join.html

I found that at least a few persons who were receiving the same error as a result of these changes.  I hope this helps.
Logged
carrerasg
Newbie
*

Karma: 0
Posts: 11


« Reply #12 on: June 01, 2006, 06:24:39 PM »

Just a quick follow-up... it appears that everything is working fine using MySQL v.5.0.11 (beta).  Hope this helps some.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #13 on: June 02, 2006, 12:34:39 AM »

I'll grab the latest version of MySQL and see what's happening.  Thanks.
Logged
carrerasg
Newbie
*

Karma: 0
Posts: 11


« Reply #14 on: June 16, 2006, 03:03:08 PM »

Nick, just to let you know that the release version is working fine.  Thanks for fixing this.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!