A couple of things I've found while updating

Hi Nabeel many thanks for the update - looking at the changelog this will be an excellent release!

Just a couple of things to run past you: when the site had finished updating, it gave me errors saying access denied on the js folder.  The internet guest account had read and execute permissions on the folder, but to remove the error I had to give it write permissions.  Is that correct?

Also, I notice my version number is still 1.1.458 and saying there is the 1.2 update available, although my admin centre has the new layout.

When I try to add a category to the downloads section, I type the name and click Add Category, but nothing happens.  I refreshed the page to check if it had included it but no.

Thanks

Did you run the install/update.php?

Double check the permissions on the js folder

Hi Nabeel

I did run the update.php and it didn’t give any errors, and finished with Updated successfully.  I’ll do another update now to force and let you know.

Yes just did 2 forced updates and both said updated ok, and the version still showing 1.1.458.

Can you copy/paste what’s in the update.sql and see if it gives you any errors? Just paste them here. Then I’ll give you the query to just manually bump that version number.

When pasting the sql code directly into MySQL I get:

Table ‘vaairswv2.phpvms_pireps’ doesn’t exist

which would be correct.  However I’ve checked to make sure that the tables it creates are all correct which they are (like the downloads and expenses tables).

Then you need to create that table (copy it from the install.sql), then re-run the update.sql to make sure the rest of the changes are there.

Then run the update.php again, I’m puzzled as to why it’s not updating that version number.

What I meant above is that while I don’t have ‘vaairswv2.phpvms_pireps’ I do have ‘vaairswv2.vaaswv2_pireps’.  Alongside this I also have _downloads and _expenses under the same database and table prefix name.  I can force the version number if necessary.  I’ve also tried readding download categories with no luck.

Oh, your table prefixes are different. Then you run the update.php it’ll change the phpvms_tablename to the right prefix+tablename.

Are the table changes ok? Try:

CREATE TABLE `vaaswv2_downloads` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `pid` INT,
  `name` VARCHAR(50),
  `link` TEXT ASCII,
  `image` TEXT ASCII,
  `hits` INT,
  PRIMARY KEY (`id`)
) ENGINE = MyISAM;

CREATE TABLE `vaaswv2_expenses` (
`id` INT NOT NULL AUTO_INCREMENT ,
`name` VARCHAR( 25 ) NOT NULL ,
`cost` FLOAT NOT NULL ,
`fixed` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = MYISAM;

CREATE TABLE IF NOT EXISTS `vaaswv2_financedata` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`month` int(11) NOT NULL,
`year` int(11) NOT NULL,
`data` text NOT NULL,
`total` float NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;

ALTER TABLE `vaaswv2_aircraft` ADD `maxpax` FLOAT NOT NULL AFTER `cruise`;
ALTER TABLE `vaaswv2_aircraft` ADD `maxcargo` FLOAT NOT NULL AFTER `maxpax`;
ALTER TABLE `vaaswv2_aircraft` ADD `enabled` INT NOT NULL DEFAULT 1;

ALTER TABLE `vaaswv2_airports` ADD `fuelprice` FLOAT NOT NULL ;

ALTER TABLE `vaaswv2_pilots` ADD `bgimage` VARCHAR( 30 ) NOT NULL DEFAULT 'background.png' AFTER `salt`;
ALTER TABLE `vaaswv2_pilots` ADD `joindate` datetime NOT NULL default '0000-00-00 00:00:00';
ALTER TABLE `vaaswv2_pilots` ADD `lastpirep` datetime NOT NULL default '0000-00-00 00:00:00';

ALTER TABLE `vaaswv2_expenses` ADD `type` VARCHAR ( 1 ) NOT NULL DEFAULT 'M';

ALTER TABLE `vaaswv2_schedules` ADD `maxload` INT NOT NULL AFTER `flighttime`;
ALTER TABLE `vaaswv2_schedules` ADD `price` FLOAT NOT NULL AFTER `maxload`;
ALTER TABLE `vaaswv2_schedules` ADD `flighttype` VARCHAR( 1 ) NOT NULL DEFAULT 'P' AFTER `price`;

ALTER TABLE `vaaswv2_pireps` ADD `load` INT NOT NULL;
ALTER TABLE `vaaswv2_pireps` ADD `fuelused` FLOAT NOT NULL DEFAULT 5.10 AFTER `load`;
ALTER TABLE `vaaswv2_pireps` ADD `fuelprice` FLOAT NOT NULL DEFAULT 5.10 AFTER `fuelused`;
ALTER TABLE `vaaswv2_pireps` ADD `price` FLOAT NOT NULL;
ALTER TABLE `vaaswv2_pireps` ADD `flighttype` VARCHAR( 1 ) NOT NULL DEFAULT 'P';
ALTER TABLE `vaaswv2_pireps` ADD `pilotpay` FLOAT NOT NULL;
ALTER TABLE `vaaswv2_pireps` ADD `expenses` FLOAT NOT NULL DEFAULT 0;
ALTER TABLE `vaaswv2_pireps` ADD `expenselist` BLOB NOT NULL;
ALTER TABLE `vaaswv2_pireps` ADD `source` VARCHAR ( 25 ) NOT NULL;
ALTER TABLE `vaaswv2_pireps` CHANGE `fuelused` `fuelused` FLOAT NOT NULL;

And I found a bug with my version number update, just do:

UPDATE `vaaswv2_settings` SET value='1.2.600' WHERE name='PHPVMS_VERSION'

I updated the installer.class.php and update.php in the binaries that are uploaded (both the full and update), try just uploading those two files and running again.

Hi Nabeel

I think I’ve got wires crossed now   Do you still want me to run the code above, and do you then want me to upload the update zip to the site and run it, or just upload the 2 new files from the updated download on their own and run update.php?

Just the 2 new files from the updated download should do it, and run the update.php, that should do it (I hope! ).

I’ve noticed some people are uploading, but the files don’t fully upload (Filezilla seems to be the main culprit), so make sure of that, that’s why I usually tell people to reupload first.

Sorry about that man!

Not a problem - good to be challenged every now and again!  By the way I extract the zip directly to the server (no FTP uploading), so technically any files that are corrupted is either due to 7-Zip or Windows Explorer.  I’ll let you know how the 2 files get on.

Ahh gotcha. I’m a command-line monkey so I usually do it that way. WinSCP also I’ve found is the best for ftp’in

Ok just tried running update.php with the other file in the install folder with no other files, and it reported I’ve already updated.  Tried with ?force, and a shed load of errors popped up with file missing etc.  Do you want me to upload the entire update.zip again and start again with ?force ?

Can you post the errors up?

I’m going to post up an update soon

Without ?force:

Notice: The template file "C:Inetpubairsouthwest (95)v2/install/templatesheader.tpl" doesn't exist in C:Inetpubairsouthwest (95)v2coreclassesTemplateSet.class.php on line 206

phpVMS Updater
You already have updated! Please delete this /install folder.

To force the update to run again, click: update.php?force


Notice: The template file "C:Inetpubairsouthwest (95)v2/install/templatesfooter.tpl" doesn't exist in C:Inetpubairsouthwest (95)v2coreclassesTemplateSet.class.php on line 206

With ?force:

Notice: The template file "C:Inetpubairsouthwest (95)v2/install/templatesheader.tpl" doesn't exist in C:Inetpubairsouthwest (95)v2coreclassesTemplateSet.class.php on line 206

phpVMS Updater
Starting the update...

Adding new options to the core/local.config.php...

Updating your database...


Warning: file_get_contents(C:Inetpubairsouthwest (95)v2/install/update.sql) [function.file-get-contents]: failed to open stream: No such file or directory in C:Inetpubairsouthwest (95)v2installInstaller.class.php on line 236

Update completed!


--------------------------------------------------------------------------------
If there were any errors, you may have to manually run the SQL update, or correct the errors, and click the following to re-run the update: update.php?force
Click here to goto your site, or your admin panel


Notice: The template file "C:Inetpubairsouthwest (95)v2/install/templatesfooter.tpl" doesn't exist in C:Inetpubairsouthwest (95)v2coreclassesTemplateSet.class.php on line 206

I’ve just noticed that it has worked this time, so that’s ok.  I’ll check the version etc now.

OK the version number is now 1.2.600 which has removed the message about the version.  Still unable to add downloads/categories though.

Does that table exist? the *_downloads table?