WiltshireAirlines Posted April 24, 2014 Report Share Posted April 24, 2014 Hello everyone, So far, I've found phpVMS to be amazing. It's really well coded, except for one problem. The admin panel. Before I get started, let me say that the admin panel USED to work fine but no longer functions properly. First, the navigation menu (on the left side) is all messed up. Things are everywhere. Here's a mini-screenshot: http://tinypic.com/r/ojl655/8(go here if the image doesn't appear) http://tinypic.com/r/ojl655/8 Second, and probably most importantly, the pilot list is completely empty! Yes, I do have pilots, and PIREP's - none of them show in the admin panel. However, all pilots and pireps DO SHOW ON THE WEBSITE. I know the info is in the database - why is it not showing up on the admin panel? ALSO: I get this error: Open Flash Chart JSON Parse Error [syntax Error] Error at character 0, line 1: 0: <br /> I think that's the main culprit. Thanks for all help in advance! --- Bill Quote Link to comment Share on other sites More sharing options...
StartVM Posted April 25, 2014 Report Share Posted April 25, 2014 I am going to need a bit more to go off of. I PM'd you, hopefully we can meet on Skype and I can help you out Quote Link to comment Share on other sites More sharing options...
WiltshireAirlines Posted April 25, 2014 Author Report Share Posted April 25, 2014 Sorry, I didn't get the PM. I'm looking into the syntax error that I got. Do you know in what php file the error is in? If I knew, I think I could solve the problem. Quote Link to comment Share on other sites More sharing options...
RocketRod Posted April 25, 2014 Report Share Posted April 25, 2014 Dashboard.tpl But ensure your open flash chart is right too. Search for exploits of it. Quote Link to comment Share on other sites More sharing options...
WiltshireAirlines Posted April 25, 2014 Author Report Share Posted April 25, 2014 http://forums.cacti.net/viewtopic.php?f=5&t=48731 I have found this information. I am currently working on a fix. Quote Link to comment Share on other sites More sharing options...
WiltshireAirlines Posted April 25, 2014 Author Report Share Posted April 25, 2014 I've found so many cases of this problem but it seems like there is no easy solution. I have no php knowledge. I want to know where the error is coming from. Quote Link to comment Share on other sites More sharing options...
WiltshireAirlines Posted April 25, 2014 Author Report Share Posted April 25, 2014 Does anybody know where the code is to load the pilots into a list on the admin panel? Does anybody know what file has that code? Quote Link to comment Share on other sites More sharing options...
WiltshireAirlines Posted April 25, 2014 Author Report Share Posted April 25, 2014 I have some code that loads the stuff into the chart...if anybody could help me please public function getpilotsjson() { $page = $this->get->page; // get the requested page $limit = $this->get->rows; // get how many rows we want to have into the grid $sidx = $this->get->sidx; // get index row - i.e. user click to sort $sord = $this->get->sord; // get the direction if(!$sidx) $sidx =1; /* Do the search using jqGrid */ $where = array(); if($this->get->_search == 'true') { $searchstr = jqgrid::strip($this->get->filters); $where_string = jqgrid::constructWhere($searchstr); # Append to our search, add 1=1 since it comes with AND # from above $where[] = "1=1 {$where_string}"; } Config::Set('PILOT_ORDER_BY', "{$sidx} {$sord}"); # Do a search without the limits so we can find how many records $count = count(PilotData::findPilots($where)); if($count > 0) { $total_pages = ceil($count/$limit); } else { $total_pages = 0; } if ($page > $total_pages) { $page = $total_pages; } $start = $limit * $page - $limit; // do not put $limit*($page - 1) if ($start < 0) { $start = 0; } # And finally do a search with the limits $allpilots = PilotData::findPilots($where, $limit, $start); if(!$allpilots) { $allpilots = array(); } # Form the json header $json = array( 'page' => $page, 'total' => $total_pages, 'records' => $count, 'rows' => array() ); # Add each row to the above array foreach($allpilots as $row) { $status = ($row->retired==0) ? 'Active' : 'Retired'; $location = '<img src="'.Countries::getCountryImage($row->location).'" alt="'.$row->location.'" />'; $edit = '<a href="'.adminurl('/pilotadmin/viewpilots?action=viewoptions&pilotid='.$row->pilotid).'">Edit</a>'; $tmp = array( 'id' => $row->id, 'cell' => array( # Each column, in order $row->id, $row->firstname, $row->lastname, $row->email, $location, $status, $row->rank, $row->totalflights, $row->totalhours, $row->lastip, $edit, ), ); $json['rows'][] = $tmp; } header("Content-type: text/x-json"); echo json_encode($json); } Quote Link to comment Share on other sites More sharing options...
WiltshireAirlines Posted April 25, 2014 Author Report Share Posted April 25, 2014 I know that other people are getting this problem and it hasn't been solved. Can someone please at least try to find out what's going wrong? Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted April 25, 2014 Moderators Report Share Posted April 25, 2014 replace your admin folder with a new from a fresh installation (make sure that you have backed up your previous admin center folder) Quote Link to comment Share on other sites More sharing options...
WiltshireAirlines Posted April 25, 2014 Author Report Share Posted April 25, 2014 OK, I fixed it after extensive hours of research into the problem. I just added error_reporting(0); to every php file in /core/lib/php-ofc (whatever) Quote Link to comment Share on other sites More sharing options...
Moderators joeri Posted April 25, 2014 Moderators Report Share Posted April 25, 2014 so you just ignored a fix from somebody and used a way that will give problems again iff there is an update Quote Link to comment Share on other sites More sharing options...
WiltshireAirlines Posted April 26, 2014 Author Report Share Posted April 26, 2014 Ignore someone's fix? How do you know I ignored it? I tried it, nothing happened. Anyway, it turns out that the charts still don't load. Please don't ignore this problem, I know other people have this problem with phpVMS too. This should be fixed. Thanks. Quote Link to comment Share on other sites More sharing options...
WiltshireAirlines Posted April 26, 2014 Author Report Share Posted April 26, 2014 By the way, I did find the post that is pinned to the top on the Open Flash Chart exploits. I'm sure that has something to do with my problem. However, my site has not been compromised. You can't use phpVMS with this glitch. It really needs to be fixed. Quote Link to comment Share on other sites More sharing options...
Moderators joeri Posted April 26, 2014 Moderators Report Share Posted April 26, 2014 why is my phpvms then working without anny problems Quote Link to comment Share on other sites More sharing options...
ahughes3 Posted May 19, 2014 Report Share Posted May 19, 2014 Ok really that is not helpful Joeri, especially as a staff member. This is clearly a problem for a number of people and you obviously have a setup that is working. Would it not be possible for you and Wiltshire to compare your files and see where there are any differences. Does the development team really have no idea what is causing the issue or how to resolve it? If I had a working version myself, I would compare every file and try to zone in on the differences. I would also see if I could pack up my working files and pass them to others. I might even say what version of php i'm running with my working files. Or I might just offer nothing but sarcasm, but why would anyone do that eh Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted May 19, 2014 Moderators Report Share Posted May 19, 2014 Hi Guys, Can you let me know which phpVMS version are you downloading in ordee to install it on my server and check if there is any error? Thanks in advance... Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 19, 2014 Administrators Report Share Posted May 19, 2014 My 2 cents -> http://forum.phpvms.net/topic/21032-phpvms-admin-panel-bug/page__st__20#entry113081 Quote Link to comment Share on other sites More sharing options...
ahughes3 Posted May 19, 2014 Report Share Posted May 19, 2014 Hi Guys, Can you let me know which phpVMS version are you downloading in ordee to install it on my server and check if there is any error? Thanks in advance... Hi, I downloaded the version from github that you posted in the link you provided. Not sure where to look for the version but is this right? Version v2.1.934-170-g5ca803a I tried already using the download from the phpvms website which obviously didn't work so I downloaded the "master" version you suggested. The version of php on my hosting is 5.5 I think. They only just recently updated it. As for Simpilot's 2 cents, if I am running the latest version of php and the version of phpvms is old, do I just lump it or is there any way to work around? This doesn't seem to be a new issue and goes back to early 2013 as far as I can see. Whilst it doesn't stop the actual site from working and pilots booking flights etc, it would be great to sort so admins can view stats otherwise not sure how else we keep up to date. Thanks for the responses guys, I'm learning but I'm slow. (that sounded so much better in my head!) Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 19, 2014 Administrators Report Share Posted May 19, 2014 The OFC package is third party. I do not know when/if they will be updating it to work with newer versions of PHP. As far as phpVMS is concerned, it was written when php 5.3 was the latest greatest thing and has not been adapted to the newer versions of PHP. I do not know if it will ever be re-written in whole. There are a lot of folks that have contributed minor fixes on the version on the GitHub account that address certain issues with using it with later versions of PHP that you can download from there instead of the official download. Quote Link to comment Share on other sites More sharing options...
ahughes3 Posted May 20, 2014 Report Share Posted May 20, 2014 Hmm that's massively disappointing. So is it the case that phpvms won't be updated in the future? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 20, 2014 Administrators Report Share Posted May 20, 2014 As it is an open source project it can be up to the community to update it. Nabeel has in the past merged updates and fixes through pull requests into the beta version on GitHub. Anyone can create a pull request with their changes. Unfortunately open source projects more often than not end up in this situation, life happens and priorities change. Quote Link to comment Share on other sites More sharing options...
ahughes3 Posted May 20, 2014 Report Share Posted May 20, 2014 Yes I get that, I run four gaming servers and a virtual airline, two businesses and somewhere in amongst that is my family! Still I would have thought phpvms was big enough to have a whole bunch of admins helping keep it up-to-date and error free. If I knew how to code I would happily lend a hand. Whilst I think of it, the Open Flash issue I had has been resolved. It turns out, it's not to do with PHP version. Rather than explain, I'll link my other post which has a fix of sorts that worked for me. http://forum.phpvms.net/topic/8192-solution-strict-standards-errornew-php/ Hope it's of some use to someone. 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.