Kalo Posted August 17, 2016 Report Share Posted August 17, 2016 (edited) Does anyone know if there are any plans to make phpvms compatible with php5.4 or higher? I have found simpilots php5.5 version here https://github.com/V...rs/phpvms_5.5.x and here http://www.flyaka.co....5.x-master.zip but it seems it would be a nightmare to import my database from php5.3. There are lots of new fields added in tables preventing an import. Such as in the pilots table there is a new "payadjust" field. There are a bunch of new fields in the schedules tables, and probably a bunch of other tables as well. Does anyone know if there's a php5.4+ version that uses all default tables? Or are there any plans for an official 5.4+ version? Edited August 17, 2016 by Kalo Quote Link to comment Share on other sites More sharing options...
web541 Posted August 17, 2016 Report Share Posted August 17, 2016 Yeah, the links you provided have been tested with php 5.5, however I've installed it on php 5.4 in the past with no real problems. In case you're wondering, phpvms 5.5.x has also been tested with php 7.0 in a development environment (here) Are you installing a fresh version or wanting to port your current (.tpl) version over? I say this because, there is no real "easy" way to port it all over as many (many) things have changed from the .tpl version to the .php version including what you've stated, the table structure. As far as I know, this was the current up-to-date phpvms version as of a while ago until it got removed from github. What you could do is export lets say the aircraft, airlines, airports, hubs, pilots, pireps, ranks and schedules table (as they have had minor changes) and then install the newer phpvms version into a different folder in your public_html, connect it to a different database (so technically you'd have two version running simultaneously with no conflict) and then import the tables above. No guarantees it will work, but theoretically it should import the data into the columns specified and I believe none have been removed, only added during the upgrade. Remember to BACKUP first if you try this though. Quote Link to comment Share on other sites More sharing options...
TennShadow Posted August 17, 2016 Report Share Posted August 17, 2016 Yeah, the links you provided have been tested with php 5.5, however I've installed it on php 5.4 in the past with no real problems. In case you're wondering, phpvms 5.5.x has also been tested with php 7.0 in a development environment (here) Are you installing a fresh version or wanting to port your current (.tpl) version over? I say this because, there is no real "easy" way to port it all over as many (many) things have changed from the .tpl version to the .php version including what you've stated, the table structure. As far as I know, this was the current up-to-date phpvms version as of a while ago until it got removed from github. What you could do is export lets say the aircraft, airlines, airports, hubs, pilots, pireps, ranks and schedules table (as they have had minor changes) and then install the newer phpvms version into a different folder in your public_html, connect it to a different database (so technically you'd have two version running simultaneously with no conflict) and then import the tables above. No guarantees it will work, but theoretically it should import the data into the columns specified and I believe none have been removed, only added during the upgrade. Remember to BACKUP first if you try this though. I did exactly this last weekend. I didn't add any of those new columns into my tables and so far I haven't had any issues. I've got debug turned on and so far so good. This is my production db on my test site so I haven't finished testing it all yet. I'm hoping testing keeps going well and I can move on as is. Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 18, 2016 Author Report Share Posted August 18, 2016 What you could do is export lets say the aircraft, airlines, airports, hubs, pilots, pireps, ranks and schedules table (as they have had minor changes) and then install the newer phpvms version into a different folder in your public_html, connect it to a different database (so technically you'd have two version running simultaneously with no conflict) and then import the tables above. No guarantees it will work, but theoretically it should import the data into the columns specified and I believe none have been removed, only added during the upgrade. Remember to BACKUP first if you try this though. If I understand you correctly I think I have done this already. I installed a fresh phpvms5.5 version into a fresh database...then I tried to import my old database. It gave me a bunch of errors I'm assuming because of the different table fields. I even tried importing individual tables like my old pilots or schedules tables into the fresh 5.5 database but that did not work either. Quote Link to comment Share on other sites More sharing options...
web541 Posted August 18, 2016 Report Share Posted August 18, 2016 try exporting the pilots table out of the original database and importing it into the new one and then if it gives you errors, post them here so we can take a look. Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 19, 2016 Author Report Share Posted August 19, 2016 try exporting the pilots table out of the original database and importing it into the new one and then if it gives you errors, post them here so we can take a look. thanks, these are the errors I get when importing the pilots and schedules tables. Last picture is my import settings: Quote Link to comment Share on other sites More sharing options...
web541 Posted August 19, 2016 Report Share Posted August 19, 2016 (edited) ah ok, it's a foreign key constraint failure, try opening the SQL file and place this before the CREATE_TABLE... or even running this before you import SET FOREIGN_KEY_CHECKS=0; Edited August 19, 2016 by web541 Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 20, 2016 Author Report Share Posted August 20, 2016 ah ok, it's a foreign key constraint failure, try opening the SQL file and place this before the CREATE_TABLE... or even running this before you import thanks, hmm I got the same error with pilots table and a slightly different one with schedules. Did I put the foreign_key_checks in the right spot? new schedules error: Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 20, 2016 Author Report Share Posted August 20, 2016 this is kind of interesting, I exported a default pilots table and tried to import it without making any changes and I got the same error. Could there be some other problem since I cant even re-import the default tables it makes? Quote Link to comment Share on other sites More sharing options...
web541 Posted August 20, 2016 Report Share Posted August 20, 2016 hmmm, Using the new database (not the original) For the following, use phpMyAdmin 1. Export the pilots table 2. Go to the new database 3. Run this query in the SQL tab (near Import or Export, etc.) SET FOREIGN_KEY_CHECKS=0; TRUNCATE phpvms_pilots; This will effectively empty the new pilots table and reset the auto-increment 4. Import the data as usual See if that works, if it doesn't, post your errors again and see if in the .sql file contains the following -- -- Indexes for table `phpvms_pilots` -- ALTER TABLE `phpvms_pilots` ADD PRIMARY KEY (`pilotid`), ADD KEY `code` (`code`), ADD KEY `rank` (`rank`); If it does, this may be conflicting with the import, so remove it and anything below it and then try the steps again. Quote Link to comment Share on other sites More sharing options...
OzFlyer Posted August 20, 2016 Report Share Posted August 20, 2016 Hi Kalo, All I did to fix foreign key errors was to delete the table and let the create new table in the backup file re-build it. In fact with the last few test server rebuilds after install a fresh copy of phpVMS I deleted all the tables and just let import of the backup file rebuild them all. Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 20, 2016 Author Report Share Posted August 20, 2016 (edited) hmmm, Using the new database (not the original) For the following, use phpMyAdmin 1. Export the pilots table 2. Go to the new database 3. Run this query in the SQL tab (near Import or Export, etc.) SET FOREIGN_KEY_CHECKS=0; TRUNCATE phpvms_pilots; This will effectively empty the new pilots table and reset the auto-increment 4. Import the data as usual Still some errors: when importing my old pilot table: when I did the above to my old pilot table, but also added what you said to do in post #7 SET FOREIGN_KEY_CHECKS=0; before create table: when re-importing phpvms5.5 default pilot table: See if that works, if it doesn't, post your errors again and see if in the .sql file contains the following -- -- Indexes for table `phpvms_pilots` -- ALTER TABLE `phpvms_pilots` ADD PRIMARY KEY (`pilotid`), ADD KEY `code` (`code`), ADD KEY `rank` (`rank`); If it does, this may be conflicting with the import, so remove it and anything below it and then try the steps again. A little success here! I could get both my old pilot table and the new unchanged pilot table to import...but now the pilot list shown on the webpage does not show pilots from the database @ /index.php/pilots (it's an empty list, even though in phpMyadmin it shows all pilots in the table in the old format...I guess because the fields are different?) To get the phpvms5.5 default pilot table to import I had to delete from line 74 and down: to get my old pilot table to import I had to add SET FOREIGN_KEY_CHECKS=0; before Creat Table like you said AND delete from line 824 and down: Edited August 20, 2016 by Kalo Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 20, 2016 Author Report Share Posted August 20, 2016 Hi Kalo, All I did to fix foreign key errors was to delete the table and let the create new table in the backup file re-build it. In fact with the last few test server rebuilds after install a fresh copy of phpVMS I deleted all the tables and just let import of the backup file rebuild them all. I tried this to, but got the above errors. It seems like the problems are because the phpvms php5.5 versions add all kinds of new fields to the tables. Do you think there's a version out there for php5.5 that uses only the default tables of phpvms without adding extra stuff? Quote Link to comment Share on other sites More sharing options...
web541 Posted August 20, 2016 Report Share Posted August 20, 2016 Still some errors: when importing my old pilot table: when I did the above to my old pilot table, but also added what you said to do in post #7 SET FOREIGN_KEY_CHECKS=0; before create table: when re-importing phpvms5.5 default pilot table: A little success here! I could get both my old pilot table and the new unchanged pilot table to import...but now the pilot list shown on the webpage does not show pilots from the database @ /index.php/pilots (it's an empty list, even though in phpMyadmin it shows all pilots in the table in the old format...I guess because the fields are different?) To get the phpvms5.5 default pilot table to import I had to delete from line 74 and down: to get my old pilot table to import I had to add SET FOREIGN_KEY_CHECKS=0; before Creat Table like you said AND delete from line 824 and down: Hmmm, can you check in your local.config.php that your database has been set right. While you're there, can you also check this: Find these Config::Set('DEBUG_MODE', false); Config::Set('DEBUG_LEVEL', 1); // 1 logs query errors, 2 logs all queries And change them to this Config::Set('DEBUG_MODE', true); Config::Set('DEBUG_LEVEL', 2); // 1 logs query errors, 2 logs all queries Once done, go to your pilots page and refresh the page to see if it's picking up any queries. Once that's done, you can go into your core/local.config.php file and change these back to the original Config::Set('DEBUG_MODE', false); Config::Set('DEBUG_LEVEL', 1); // 1 logs query errors, 2 logs all queries That should allow you to see if it is a query issue or not. I assume you just followed the procedure above, but just making sure, have you changed any tables or columns/fields? Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 21, 2016 Author Report Share Posted August 21, 2016 thanks for all the help. My database connections were fine but I don't know much about all the other settings, I'll upload a copy of my local.config.php. I tried the above changes but the pilots list did not show on the website. I didn't make any changes to the database, but since there doesn't seem to be an "official" version, each version out there are slightly different sizes like the two links I referenced in post #1, so I'm not sure if I have the best version. my local.config.php: http://pastebin.com/vARD4r6E [/code] Quote Link to comment Share on other sites More sharing options...
web541 Posted August 21, 2016 Report Share Posted August 21, 2016 Oh, I forgot to mention, go into core/logs/logs.txt and see if anything has been recorded. Are the pilots showing up in the admin center? Were they before you imported? If you open up the front page of you skin and for a test put this on it (you can remove it after) <?php $allpilots = PilotData::getAllPilots(); foreach($allpilots as $pilot) { echo $pilot->firstname.''.$pilot->lastname; } echo '<br />'; echo '<pre>'; print_r($allpilots); echo '</pre>'; ?> Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 21, 2016 Author Report Share Posted August 21, 2016 Oh, I forgot to mention, go into core/logs/logs.txt and see if anything has been recorded. Are the pilots showing up in the admin center? Were they before you imported? If you open up the front page of you skin and for a test put this on it (you can remove it after) Nothing is in logs. Pilots do show up in admin center. I'm not sure where to put the code you suggested, do you mean put it index.php all by itself? I tried that and got a white page. Thanks again. Quote Link to comment Share on other sites More sharing options...
web541 Posted August 21, 2016 Report Share Posted August 21, 2016 Nothing is in logs. Pilots do show up in admin center. I'm not sure where to put the code you suggested, do you mean put it index.php all by itself? I tried that and got a white page. Thanks again. Ok that's a start. Are the pilots showing in the admin center the correct pilots or the original? In regards to that code, If you have a skin on the newer version, place it in lib/skins/YOURSKINNAME/frontpage_main.php If you don't have a skin on the newer version, place it in core/templates/frontpage_main.php Please remove it after you see the results to make sure nothing weird happens in the future. At this point, also try clearing your cache. Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 22, 2016 Author Report Share Posted August 22, 2016 The pilots are showing up in admin center from my old database, all 500 or so. When I put that code into frontpage_main.php it listed all the pilots in a big paragraph format and shewed a bunch of code....it looked pretty messy. Quote Link to comment Share on other sites More sharing options...
web541 Posted August 22, 2016 Report Share Posted August 22, 2016 In your local.config.php, is your DB_NAME the correct one and have you imported the table from the old database now? Just need to clear some things up first. Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 22, 2016 Author Report Share Posted August 22, 2016 In your local.config.php, is your DB_NAME the correct one and have you imported the table from the old database now? Just need to clear some things up first. Yes to both questions. Quote Link to comment Share on other sites More sharing options...
Kalo Posted August 25, 2016 Author Report Share Posted August 25, 2016 thanks for your help web, I decided I will unfortunately have to rent a separate server for phpvms so I can run php5.3 solely on that server. It's probably better to stick with the official release version anyways in case there ever is an update to phpvms. Quote Link to comment Share on other sites More sharing options...
Onno Posted August 29, 2016 Report Share Posted August 29, 2016 i had the offical version and updated with this version no poblems and that is on php 5.3. regrds Onno Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.