patva1 Posted July 5, 2009 Report Share Posted July 5, 2009 I get this error when I try to view the route map: Parse error: syntax error, unexpected T_ELSE in /home/a8930745/public_html/phpvms/core/modules/RouteMap/RouteMap.php on line 31 I checked and double checked, and that particular part of the code is exactly as Nabeel said to make it. Any help is appreciated. Quote Link to comment Share on other sites More sharing options...
Strider Posted July 5, 2009 Report Share Posted July 5, 2009 Copy that part of the code and post it here, a fresh pair of eyes will help. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 5, 2009 Author Report Share Posted July 5, 2009 Here it is $shownroutes = array(); $centerlat = 0; $centerlong = 0; # Create map foreach($allschedules as $schedule) { $route = $schedule->depicao.$schedule->arricao; if(in_array($route, $shownroutes)); { continue; } else { $shownroutes[] = $route; } Quote Link to comment Share on other sites More sharing options...
Strider Posted July 6, 2009 Report Share Posted July 6, 2009 if(in_array($route, $shownroutes));<- there shouldn't be a ; there. That is what is causing your problem. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 6, 2009 Administrators Report Share Posted July 6, 2009 It also seems like you're missing the closing bracket for the foreach() Also, PLEASE indent!! After every { there should be an indent, you'll spot errors real fast: $shownroutes = array(); $centerlat = 0; $centerlong = 0; # Create map foreach($allschedules as $schedule) { $route = $schedule->depicao.$schedule->arricao; if(in_array($route, $shownroutes)) { continue; } else { $shownroutes[] = $route; } } Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 6, 2009 Author Report Share Posted July 6, 2009 Thanks for the help. There are no more errors, but when I go to the page it loads but no map shows up. I have a google API key, and the live flight map works, just when I go to the routmap nothing loads on the page. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 6, 2009 Administrators Report Share Posted July 6, 2009 Check this thread http://forum.phpvms.net/index.php?topic=902.new Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 6, 2009 Author Report Share Posted July 6, 2009 When I try to save the file I get this error: Warning: ftp_put() [function.ftp-put]: Can't open that file: Permission denied in /home/manager/public_html/includes/filesystem.inc.php on line 1367 Status: This file could not be saved. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 7, 2009 Administrators Report Share Posted July 7, 2009 Set the permissions on the file you're editing to something writable (775 or 777) Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 7, 2009 Author Report Share Posted July 7, 2009 I got the file edited, but all that will show up is the title, still no map. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 8, 2009 Administrators Report Share Posted July 8, 2009 Can you paste the files? Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 8, 2009 Author Report Share Posted July 8, 2009 The file for the page where I am calling for the route map, the actual route map file, or both? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 8, 2009 Administrators Report Share Posted July 8, 2009 both, just attach them Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 8, 2009 Author Report Share Posted July 8, 2009 Here they are. Thanks for all of your help so far. routemap.htm RouteMap.php.txt Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 9, 2009 Administrators Report Share Posted July 9, 2009 ok in routemap.htm, just do <?php MainController::Run('RouteMap', 'Controller'); ?> Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 9, 2009 Author Report Share Posted July 9, 2009 When I use that I get the following php error: Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/a8930745/public_html/phpvms//core/templates/<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Route Map</title> </head> <body> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAmh5p1i5yMwpb66nDaOw1eRQwTXokuW8BVf_s5QXPuQRNUwc0eRRF4KMwcmpt4u7wbdAJNLbxS-w5jA" type="text/javascript" charset="utf-8"></script><script type="text/javascript" charset="utf-8"> //<![CDATA[ /************************************************* * Created with GoogleMapAPI 2.5 * Author: Monte Ohrt <monte AT ohrt DOT com> * Copyright 2005-2006 New Digital Group * http://www.phpinsider.com/php/code/GoogleMapAPI/ *************************************************/ var points = []; var markers = []; var counte in /home/a8930745/public_html/phpvms/core/classes/TemplateSet.class.php on line 95 Thanks. Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 17, 2009 Author Report Share Posted July 17, 2009 Could anyone tell me what this error is saying/how to fix it? I have been trying to fix it/ trace the route of the problem for quite some time, but to no avail. Thanks. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 17, 2009 Administrators Report Share Posted July 17, 2009 Seems like you're putting HTML in your title Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 18, 2009 Author Report Share Posted July 18, 2009 Seems like you're putting HTML in your title Could you please explain what you mean/how to fix it. I think I understand what you are saying, but I want to be sure. I apologize for the extent of my questions, I am not very good at coding, as you can probably guess. Thanks for all of your help so far. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 19, 2009 Administrators Report Share Posted July 19, 2009 No problem. What are you entering for the page title? Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 19, 2009 Author Report Share Posted July 19, 2009 Here is what the header/title looks like: <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Route Map</title> </head> Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 22, 2009 Administrators Report Share Posted July 22, 2009 I mean for the page you created Quote Link to comment Share on other sites More sharing options...
patva1 Posted July 22, 2009 Author Report Share Posted July 22, 2009 I mean for the page you created That is for the page I created. If you mean what phpvms asked to name the page, then it was Route Map. 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.