flyalaska Posted October 31, 2015 Report Share Posted October 31, 2015 I am helping someone with their site. He has this error file_exists(): File name is longer than the maximum allowed path length on this platform (4096) On the index page and the profile pages. We thought it was the skin, I uploaded a different skin to test that theory. Same error. phpVMS 5.5.2 php 5.4. We have also tried it with php 5.5 and 5.6 There is a route, airplane, and two airports in the database. There is some data. Any hekp would be appreciated. Quote Link to comment Share on other sites More sharing options...
web541 Posted October 31, 2015 Report Share Posted October 31, 2015 Have any hubs been added? Quote Link to comment Share on other sites More sharing options...
flyalaska Posted October 31, 2015 Author Report Share Posted October 31, 2015 Just one Quote Link to comment Share on other sites More sharing options...
web541 Posted October 31, 2015 Report Share Posted October 31, 2015 Hmmm, can you see if this works http://forum.phpvms.net/topic/22164-phpvms-55/#entry119612 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted October 31, 2015 Author Report Share Posted October 31, 2015 Its already defaulted like that Quote Link to comment Share on other sites More sharing options...
web541 Posted October 31, 2015 Report Share Posted October 31, 2015 Have there been any flights in the database -> your skin might be looking for the past 5 flights. Have you tried it with Crystal? Quote Link to comment Share on other sites More sharing options...
flyalaska Posted October 31, 2015 Author Report Share Posted October 31, 2015 No flights yet. Error goes away with crystal. Quote Link to comment Share on other sites More sharing options...
web541 Posted October 31, 2015 Report Share Posted October 31, 2015 Is there anything that is the same on both pages that could be outputting that error? Quote Link to comment Share on other sites More sharing options...
flyalaska Posted October 31, 2015 Author Report Share Posted October 31, 2015 no, I put other skins on his site, all came with the same error. I will have him file some flights, see what happens. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 1, 2015 Administrators Report Share Posted November 1, 2015 Does any of the airline names have a period (.) in it? If the end of the error message looks something like; <select name="code" id="code"> <opt in /home/u328252270/public_html/suava/demo/core/classes/TemplateSet.class.php on line 96 I would guess the airline name has a period in it or possibly the code of the airline is TPL or PHP Quote Link to comment Share on other sites More sharing options...
flyalaska Posted November 1, 2015 Author Report Share Posted November 1, 2015 No period, the Airline code is VAP http://www.klm-airways.com Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 1, 2015 Administrators Report Share Posted November 1, 2015 Try removing the registration form from the front page and see if the error goes away. EDIT: I meant login form Quote Link to comment Share on other sites More sharing options...
flyalaska Posted November 1, 2015 Author Report Share Posted November 1, 2015 No change Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 1, 2015 Administrators Report Share Posted November 1, 2015 Can you put up a phpinfo file and let me know the link? I think it is something in the config on the server, there is another site doing the same thing hosted on a Hostinger server as well. -> http://tamv.net/suav...hp/registration Quote Link to comment Share on other sites More sharing options...
flyalaska Posted November 1, 2015 Author Report Share Posted November 1, 2015 I sent you the link through PM Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 1, 2015 Administrators Report Share Posted November 1, 2015 Is your server (for flyaka) running on fastcgi for php? It would be in the first section of phpinfo and is labeled -> Server API Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 1, 2015 Administrators Report Share Posted November 1, 2015 I think you said you are running 5.5.2 of my version, if that is correct try this; /core/classes/TemplateSet.class.php line 117 should be if (is_string($value) && $value != '' && substr_count($value, $this->tpl_ext) > 0) { change to if (is_string($value) && $value != '' && substr_count($value, $this->tpl_ext."\n\r") > 0) { 1 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted November 1, 2015 Author Report Share Posted November 1, 2015 That fixed it. Thank you! Yes on my AKA server - Server API CGI/FastCGI 1 Quote Link to comment Share on other sites More sharing options...
KLM Posted November 1, 2015 Report Share Posted November 1, 2015 Words cannot express my feelings, nor my thanks for all your help." I know it isn't much but I really want to say Thank You for everything My friend 1 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted November 1, 2015 Author Report Share Posted November 1, 2015 This fix puts another error in the air. In admin know matter what link I click there is some sort error where a menu should be. It will display sidebar_dashboard.php for examplae, different for each link. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted November 1, 2015 Administrators Report Share Posted November 1, 2015 Ew... Lets try this. Change line 117 to; if (is_string($value) && $value != '' && substr($value, -3) == $this->tpl_ext) { 1 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted November 1, 2015 Author Report Share Posted November 1, 2015 That did it. Thank you David! 1 Quote Link to comment Share on other sites More sharing options...
KLM Posted November 2, 2015 Report Share Posted November 2, 2015 That did it. Thank you David! Yeah thank you both of you, But especially Eddie, for helping me out so much. Quote Link to comment Share on other sites More sharing options...
bass Posted March 1, 2016 Report Share Posted March 1, 2016 This fix puts another error in the air. In admin know matter what link I click there is some sort error where a menu should be. It will display sidebar_dashboard.php for examplae, different for each link. I also have this error, can not remove. Due to this error fails to add anything in the admin panel of the site. Quote Link to comment Share on other sites More sharing options...
bass Posted March 1, 2016 Report Share Posted March 1, 2016 <?php /** * Codon PHP Framework * www.nsslive.net/codon * Software License Agreement (BSD License) * * Copyright (c) 2008 Nabeel Shahzad, nsslive.net * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @author Nabeel Shahzad * @copyright Copyright (c) 2008, Nabeel Shahzad * @link http://www.nsslive.net/codon * @license BSD License * @package codon_core */ class TemplateSet { public $template_path = ''; public $enable_caching = false; public $cache_timeout; public $tpl_ext = '.tpl'; protected $vars = array(); /*public function __construct($path='') { if($path!='') $this->Set($path); }*/ /** * Set the default path to look for the templates * * @param string $path Path to the templates folder */ public function setTemplatePath($path) { # Remove trailing directory separator $len = strlen($path); if($path[$len-1] == DS) $path=substr($path, 0, $len-1); $this->template_path = $path; } public function enableCaching($bool=true) { $this->enable_caching = $bool; } /** * Clear all variables */ public function clearVars() { $this->vars = array(); } /** * Set a variable to the template, call in the template * as $name * * @param mixed $name Variable name * @param mixed $value Variable value */ public function set($name, $value) { // See if they're setting the template as a file // Check if the file exists if (is_string($value) && $value != '' && substr($value, -3) == $this->tpl_ext) { if(file_exists($this->template_path . DS . $value)) { $value = $this->GetTemplate($value, true); } } $this->vars[$name] = $value; } /** * Alias to self::ShowTemplate(); * * @param string $tpl_name Template name including extention * @param bool $checkskin Check the skin folder or not */ public function show($tpl_name, $checkskin=true, $force_base=false) { return $this->ShowTemplate($tpl_name, $checkskin, $force_base); } public function showVars() { extract($this->vars, EXTR_OVERWRITE); echo '<pre>'; print_r(get_defined_vars()); echo '</pre>'; } /** * Show a template on screen, checks to see if the * template is cached or not as well. To return a template, * use self::GetTemplate(); this ends up calling GetTemplate() * if the cache is empty or disabled * * @param string $tpl_name Template name including extention * @param bool $checkskin Check the skin folder or not * @return mixed This is the return value description * */ public function showTemplate($tpl_name, $checkskin=true, $force_base=false) { if($this->enable_caching == true) { $cached_file = CACHE_PATH . DS . $tpl_name; // The cache has expired if((time() - filemtime($cached_file)) > ($this->cache_timeout*3600)) { unlink($cached_file); $tpl_output = $this->GetTemplate($tpl_name, true, $checkskin, $force_base); echo $tpl_output; //cache it into the storage file if($this->enable_caching == true) { $fp = fopen($cached_file, 'w'); fwrite($fp, $tpl_output, strlen($tpl_output)); fclose($fp); } } else // Cache not expired, so just include that cache { @include $cached_file; } } else { return $this->getTemplate($tpl_name, false, $checkskin, $force_base); } } /** * Alias to $this->GetTemplate() * * @param string $tpl_name Template to return (with extension) * @param bool $ret Return the template or output it on the screen * @param bool $checkskin Check the active skin folder for the template first * @return mixed Returns template text is $ret is true * */ public function get($tpl_name, $ret=false, $checkskin=true, $force_base=false) { return $this->getTemplate($tpl_name, $ret, $checkskin, $force_base); } /** * GetTemplate * This gets the actual template data from a template, and fills * in the variables * * @param string $tpl_name Template to return (with extension) * @param bool $ret Return the template or output it on the screen * @param bool $checkskin Check the active skin folder for the template first * @param bool $force_base Force it to read from the base template dir * @return mixed Returns template text is $ret is true * */ public function getTemplate($tpl_name, $ret=false, $checkskin=true, $force_base=false) { /* See if the file has been over-rided in the skin directory */ if(strstr($tpl_name, $this->tpl_ext) === false) { $tpl_name .= $this->tpl_ext; } if($force_base === true) { $old_tpl = $this->template_path; $this->template_path = Config::Get('BASE_TEMPLATE_PATH'); if($checkskin === true) { if(defined('SKINS_PATH') && file_exists(SKINS_PATH . DS . $tpl_name)) { $tpl_path = SKINS_PATH . DS . $tpl_name; } else { $tpl_path = $this->template_path . DS . $tpl_name; } } } if((!defined('ADMIN_PANEL') || $force_base == true) && $checkskin == true) { if(defined('SKINS_PATH') && file_exists(SKINS_PATH . DS . $tpl_name)) { $tpl_path = SKINS_PATH . DS . $tpl_name; } else { $tpl_path = $this->template_path . DS . $tpl_name; } } else { $tpl_path = $this->template_path . DS . $tpl_name; } if($force_base) { $this->template_path = $old_tpl; } if(!file_exists($tpl_path)) { trigger_error('The template file "'.$tpl_path.'" doesn\'t exist'); return; } extract($this->vars, EXTR_OVERWRITE); ob_start(); include $tpl_path; $cont = ob_get_contents(); ob_end_clean(); # Check if we wanna return if($ret==true) return $cont; echo $cont; } /** * ShowModule * This is an alias to MainController::Run(); calls a function * in a module. Returns back whatever the called function returns * * @param string $ModuleName Module name to call * @param string $MethodName Function which to call in the module * @return mixed This is the return value description * */ public function showModule($ModuleName, $MethodName='ShowTemplate') { return MainController::Run($ModuleName, $MethodName); } } Like this I got the code, did as written in this thread, did not help. I can something not so made? Can I help you? (I use an old version of phpvms) Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted May 11, 2016 Report Share Posted May 11, 2016 Ew... Lets try this. Change line 117 to; if (is_string($value) && $value != '' && substr($value, -3) == $this->tpl_ext) { Hi sir, I applied this rule to resolve the previous error "sidebar_dashboard.tpl" it resolved well, but the previous error shown again "Warning: file_exists(): File name is longer than the maximum allowed path length on this platform (4096): /var/www/vhosts/....." FYI my php version is 5.3.29 looking forward Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted May 16, 2016 Report Share Posted May 16, 2016 Any idea! 1 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted May 17, 2016 Author Report Share Posted May 17, 2016 Are you able to edit the php setting on your server? Quote Link to comment Share on other sites More sharing options...
FlyingMachine Posted May 19, 2016 Report Share Posted May 19, 2016 Yes, i do Quote Link to comment Share on other sites More sharing options...
flyalaska Posted May 19, 2016 Author Report Share Posted May 19, 2016 Is that the full error message? 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.