Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

PHP Errors

Posted on 2007-10-09
49
Medium Priority
?
451 Views
Last Modified: 2013-12-13
I'm setting up PhPFile Navigator on our website. I have it installed and most stuff works ok, but on some pages if i click on a reload, or thumbnails button, then ill get an error, or the page wont load correctly. One thing i notice is in the url that it goes to the php file is in there twice, like this http://address/action.php/action.php?sAction=openIndex
0
Comment
Question by:gochiefs
  • 24
  • 21
  • 4
49 Comments
 
LVL 28

Expert Comment

by:gamebits
ID: 20044396
The script is not configured properly, without the script I cannot tell you where to make the change(s).
0
 

Author Comment

by:gochiefs
ID: 20045062
Seems to be more of a problem with either my PHP install or IIS because i get the same thing on other PHP pages ive tried.
0
 
LVL 17

Expert Comment

by:nplib
ID: 20050014
Post CODE.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:gochiefs
ID: 20050055
Heres the code for it. Like i said, the error only happens when on the main page. All other pages use the same menu, but seem to work correctly. actualizar and ver_imaxes are the two that cause problems. All the others work fine.

defined('OK') or die();
?>
<div id="menu_principal">
      <div id="escolle_ancho"><a href="#" onclick="return marca_ancho_corpo(true);" title="<?php echo $PFN_conf->t('maximizar_corpo'); ?>"><img src="<?php echo $relativo.$PFN_conf->g('estilo'); ?>imx/ancho_corpo.png" alt="<?php echo $PFN_conf->t('maximizar_corpo'); ?>" /></a></div>
      <h1 id="logo"><a href="navega.php?<?php echo PFN_quita_url('dir',false); ?>"><span>&nbsp;</span><?php echo $PFN_conf->t('PFN'); ?></a></h1>
      <ul id="menu1">
<?php if (!$PFN_conf->g('raiz','unica')) { ?>
            <li><a href="<?php echo $menu_opc['escoller_raiz']; ?>"><?php echo $PFN_conf->t('escoller_raiz'); ?></a></li>
<?php } if (!empty($menu_opc['zona_admin'])) { ?>
            <li class="admin"><a href="<?php echo $menu_opc['zona_admin']; ?>"><?php echo $PFN_conf->t('zona_admin'); ?></a></li>
<?php } if (!empty($menu_opc['buscador'])) { ?>
            <li><a href="<?php echo $menu_opc['buscador']; ?>"><?php echo $PFN_conf->t('buscador'); ?></a></li>
<?php } if (!empty($menu_opc['axuda'])) { ?>
            <li><a href="<?php echo $menu_opc['axuda']; ?>"><?php echo $PFN_conf->t('axuda'); ?></a></li>
<?php } if (!empty($menu_opc['sair'])) { ?>
            <li><a href="<?php echo $menu_opc['sair']; ?>"><?php echo $PFN_conf->t('sair'); ?></a></li>
<?php } ?>
      </ul>

      <br class="nada" />


      <ul id="menu2">
            <?php if (!empty($menu_opc['actualizar'])) { ?>
            <li><a href="<?php echo $menu_opc['actualizar']; ?>" onmouseover="amosa('menu_txt_actualizar');" onmouseout="oculta('menu_txt_actualizar');"><img src="<?php echo $PFN_conf->g('estilo'); ?>imx/actualizar.png" alt="<?php echo $PFN_conf->t('actualizar'); ?>" /></a></li>
            <?php } if (!empty($menu_opc['crear_dir'])) { ?>
            <li><a href="<?php echo $menu_opc['crear_dir']; ?>" onmouseover="amosa('menu_txt_crear_dir');" onmouseout="oculta('menu_txt_crear_dir');"><img src="<?php echo $PFN_conf->g('estilo'); ?>imx/crear_dir.png" alt="<?php echo $PFN_conf->t('crear_dir'); ?>" /></a></li>
            <?php } if (!empty($menu_opc['novo_arq'])) { ?>
            <li><a href="<?php echo $menu_opc['novo_arq']; ?>" onmouseover="amosa('menu_txt_novo_arq');" onmouseout="oculta('menu_txt_novo_arq');"><img src="<?php echo $PFN_conf->g('estilo'); ?>imx/novo_arq.png" alt="<?php echo $PFN_conf->t('novo_arq'); ?>" /></a></li>
            <?php } if (!empty($menu_opc['subir_arq'])) { ?>
            <li><a href="<?php echo $menu_opc['subir_arq']; ?>" onmouseover="amosa('menu_txt_subir_arq');" onmouseout="oculta('menu_txt_subir_arq');"><img src="<?php echo $PFN_conf->g('estilo'); ?>imx/subir_arq.png" alt="<?php echo $PFN_conf->t('subir_arq'); ?>" /></a></li>
            <?php } if (!empty($menu_opc['subir_url'])) { ?>
            <li><a href="<?php echo $menu_opc['subir_url']; ?>" onmouseover="amosa('menu_txt_subir_url');" onmouseout="oculta('menu_txt_subir_url');"><img src="<?php echo $PFN_conf->g('estilo'); ?>imx/subir_url.png" alt="<?php echo $PFN_conf->t('subir_url'); ?>" /></a></li>
            <?php } if (!empty($menu_opc['ver_imaxes'])) { ?>
            <li><a href="<?php echo $menu_opc['ver_imaxes']; ?>" onmouseover="amosa('menu_txt_ver_imaxes');" onmouseout="oculta('menu_txt_ver_imaxes');"><img src="<?php echo $PFN_conf->g('estilo'); ?>imx/ver_imaxes.png" alt="<?php echo $PFN_conf->t('ver_imaxes'); ?>" /></a></li>
            <?php } if (!empty($menu_opc['arbore'])) { ?>
            <li><a href="<?php echo $menu_opc['arbore']; ?>" onmouseover="amosa('menu_txt_arbore');" onmouseout="oculta('menu_txt_arbore');"><img src="<?php echo $PFN_conf->g('estilo'); ?>imx/arbore.png" alt="<?php echo $PFN_conf->t('arbore'); ?>" /></a></li>
            <?php } if (!empty($menu_opc['preferencias'])) { ?>
            <li><a href="<?php echo $menu_opc['preferencias']; ?>" onmouseover="amosa('menu_txt_preferencias');" onmouseout="oculta('menu_txt_preferencias');"><img src="<?php echo $PFN_conf->g('estilo'); ?>imx/preferencias_usuario.png" alt="<?php echo $PFN_conf->t('preferencias_usuario'); ?>" /></a></li>
            <?php } ?>
            <li id="menu_texto">
                  <?php if (!empty($menu_opc['actualizar'])) { ?>
                  <span id="menu_txt_actualizar" style="display: none;"><?php echo $PFN_conf->t('actualizar'); ?></span>
                  <?php } if (!empty($menu_opc['crear_dir'])) { ?>
                  <span id="menu_txt_crear_dir" style="display: none;"><?php echo $PFN_conf->t('crear_dir'); ?></span>
                  <?php } if (!empty($menu_opc['novo_arq'])) { ?>
                  <span id="menu_txt_novo_arq" style="display: none;"><?php echo $PFN_conf->t('novo_arq'); ?></span>
                  <?php } if (!empty($menu_opc['subir_arq'])) { ?>
                  <span id="menu_txt_subir_arq" style="display: none;"><?php echo $PFN_conf->t('subir_arq'); ?></span>
                  <?php } if (!empty($menu_opc['subir_url'])) { ?>
                  <span id="menu_txt_subir_url" style="display: none;"><?php echo $PFN_conf->t('subir_url'); ?></span>
                  <?php } if (!empty($menu_opc['ver_imaxes'])) { ?>
                  <span id="menu_txt_ver_imaxes" style="display: none;"><?php echo $PFN_conf->t('ver_imaxes'); ?></span>
                  <?php } if (!empty($menu_opc['arbore'])) { ?>
                  <span id="menu_txt_arbore" style="display: none;"><?php echo $PFN_conf->t('arbore'); ?></span>
                  <?php } if (!empty($menu_opc['preferencias'])) { ?>
                  <span id="menu_txt_preferencias" style="display: none;"><?php echo $PFN_conf->t('preferencias_usuario'); ?></span>
                  <?php } ?>
            </li>
      </ul>
</div>
0
 
LVL 17

Expert Comment

by:nplib
ID: 20050212
try changing your <a href="#" onclick="return marca_ancho_corpo(true);"
to
<a href="javascript:return marca_ancho_corpo(true);"
0
 
LVL 28

Expert Comment

by:gamebits
ID: 20050281
"One thing i notice is in the url that it goes to the php file is in there twice, like this http://address/action.php/action.php?sAction=openIndex"

If you look at the source code on the page before you click the link wht do you see in the <a href> tag? for the menu that is not working.

If the link is not constructed correctly (with the php file shown twice) it is because they are built dynamically then look at this in your file echo $menu_opc['actualizar']; << this variable should be the culprit
0
 

Author Comment

by:gochiefs
ID: 20050414
Ok, I found some more info. The first code i posted was from the opcions.inc.php. Here is the related opcions.php file. I noticed that the two links that do not work correctly have PFN_*_* instead of pointing to a php file. Still dont know how to fix it though

defined('OK') or die();

$menu_opc = array();
$menu_opc['escoller_raiz'] = 'menu.php?'.PFN_quita_url('dir',false);
$menu_opc['actualizar'] = PFN_get_url();

if ($PFN_conf->g('usuario','admin') == true) {
      $menu_opc['zona_admin'] = 'xestion/index.php?'.PFN_get_url(false);
} if ($PFN_conf->g('permisos','buscador')) {
      $menu_opc['buscador'] = 'accion.php?'.PFN_cambia_url(array('dir','accion'),array($dir,'buscador'),false);;
} if ($PFN_conf->g('permisos','axuda')) {
      $menu_opc['axuda'] = 'axuda.php?'.PFN_get_url(false);
} if ($PFN_conf->g('permisos','crear_dir')) {
      $menu_opc['crear_dir'] = 'accion.php?'.PFN_cambia_url(array('dir','accion'),array($dir,'crear_dir'),false);
} if ($PFN_conf->g('permisos','novo_arq')) {
      $menu_opc['novo_arq'] = 'accion.php?'.PFN_cambia_url(array('dir','accion'),array($dir,'novo_arq'),false);
} if ($PFN_conf->g('permisos','subir_arq')) {
      $menu_opc['subir_arq'] = 'accion.php?'.PFN_cambia_url(array('dir','accion'),array($dir,'subir_arq'),false);
} if ($PFN_conf->g('permisos','subir_url')) {
      $menu_opc['subir_url'] = 'accion.php?'.PFN_cambia_url(array('dir','accion'),array($dir,'subir_url'),false);
} if ($PFN_conf->g('permisos','ver_imaxes')) {
      $menu_opc['ver_imaxes'] = PFN_cambia_url(array('dir','ver_imaxes','completo'),array($dir,($ver_imaxes?'':'true'),$PFN_vars->get('completo')));
} if ($PFN_conf->g('usuario','cambiar_datos')) {
      $menu_opc['preferencias'] = 'preferencias.php?'.PFN_get_url(false);
} if ($PFN_conf->g('permisos','arbore')) {
      $menu_opc['arbore'] = 'arbore.php?'.PFN_get_url(false);
} if ($PFN_conf->g('permisos','sair')) {
      $menu_opc['sair'] = 'sair.php?'.PFN_get_url(false);
}

include ($PFN_paths['plantillas'].'opcions.inc.php');
?>
0
 
LVL 28

Expert Comment

by:gamebits
ID: 20051097
Look in this file that is getting include in the last script you posted

include ($PFN_paths['plantillas'].'opcions.inc.php');
0
 
LVL 17

Expert Comment

by:nplib
ID: 20051100
can you load the page in your browser then goto view source and paste the code here or give a url to the actual site.

This URL http://address/action.php/action.php?sAction=openIndex" brings me to www.address.com with errors that it can't find the requested URL.
0
 

Author Comment

by:gochiefs
ID: 20051140
Heres the page source.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>PHPfileNavigator</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="PHPfileNavigator" />
<meta name="description" content="PHPfileNavigator: Administrador de ficheros y directorios via web." />
<meta name="author" content="Lito, phpfilenavigator@litoweb.net" />
<meta name="version" content="232" />
<link rel="SHORTCUT ICON" href="favicon.ico" />
<link rel="stylesheet" href="estilos/pfn/estilos.css" type="text/css" />
<script type="text/javascript" src="js/scripts.js"></script>
<script type="text/javascript" src="js/html_decoder.js"></script>
<script type="text/javascript"><!--

imaxes = new Array();
imaxes[1] = imaxes[2] = imaxes[3] = imaxes[4] = imaxes[5] = imaxes[6] = new Image();
imaxes[7] = imaxes[8] = imaxes[9] = new Image();

imaxes[1].src = "estilos/pfn/imx/fondo.png";
imaxes[2].src = "estilos/pfn/imx/info.png";
imaxes[3].src = "estilos/pfn/imx/copiar.png";
imaxes[4].src = "estilos/pfn/imx/mover.png";
imaxes[5].src = "estilos/pfn/imx/eliminar.png";
imaxes[6].src = "estilos/pfn/imx/renomear.png";
imaxes[7].src = "estilos/pfn/imx/permisos.png";
imaxes[8].src = "estilos/pfn/imx/descargar.png";
imaxes[9].src = "estilos/pfn/imx/comprimir.png";

marca_ancho_corpo();

//--></script>
</head>
<body>
<div id="corpo"><br class="nada" />
ÿ<div id="menu_principal">
      <div id="escolle_ancho"><a href="#" onclick="return marca_ancho_corpo(true);" title="Maximize Body"><img src="estilos/pfn/imx/ancho_corpo.png" alt="Maximize Body" /></a></div>
      <h1 id="logo"><a href="navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd"><span>&nbsp;</span>PHPfileNavigator</a></h1>
      <ul id="menu1">
            <li><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=buscador">Search</a></li>
            <li><a href="axuda.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd">Help</a></li>
            <li><a href="sair.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd">Exit</a></li>
      </ul>

      <br class="nada" />


      <ul id="menu2">
                        <li><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd" onmouseover="amosa('menu_txt_actualizar');" onmouseout="oculta('menu_txt_actualizar');"><img src="estilos/pfn/imx/actualizar.png" alt="Reload" /></a></li>
                        <li><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=crear_dir" onmouseover="amosa('menu_txt_crear_dir');" onmouseout="oculta('menu_txt_crear_dir');"><img src="estilos/pfn/imx/crear_dir.png" alt="New Folder" /></a></li>
                        <li><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=novo_arq" onmouseover="amosa('menu_txt_novo_arq');" onmouseout="oculta('menu_txt_novo_arq');"><img src="estilos/pfn/imx/novo_arq.png" alt="Create a File" /></a></li>
                        <li><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=subir_arq" onmouseover="amosa('menu_txt_subir_arq');" onmouseout="oculta('menu_txt_subir_arq');"><img src="estilos/pfn/imx/subir_arq.png" alt="Upload a File" /></a></li>
                        <li><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=subir_url" onmouseover="amosa('menu_txt_subir_url');" onmouseout="oculta('menu_txt_subir_url');"><img src="estilos/pfn/imx/subir_url.png" alt="Upload URL" /></a></li>
                        <li><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;ver_imaxes=true" onmouseover="amosa('menu_txt_ver_imaxes');" onmouseout="oculta('menu_txt_ver_imaxes');"><img src="estilos/pfn/imx/ver_imaxes.png" alt="Thumbnails" /></a></li>
                        <li><a href="arbore.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd" onmouseover="amosa('menu_txt_arbore');" onmouseout="oculta('menu_txt_arbore');"><img src="estilos/pfn/imx/arbore.png" alt="Folder Tree" /></a></li>
                        <li><a href="preferencias.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd" onmouseover="amosa('menu_txt_preferencias');" onmouseout="oculta('menu_txt_preferencias');"><img src="estilos/pfn/imx/preferencias_usuario.png" alt="User Preferences" /></a></li>
                        <li id="menu_texto">
                                    <span id="menu_txt_actualizar" style="display: none;">Reload</span>
                                    <span id="menu_txt_crear_dir" style="display: none;">New Folder</span>
                                    <span id="menu_txt_novo_arq" style="display: none;">Create a File</span>
                                    <span id="menu_txt_subir_arq" style="display: none;">Upload a File</span>
                                    <span id="menu_txt_subir_url" style="display: none;">Upload URL</span>
                                    <span id="menu_txt_ver_imaxes" style="display: none;">Thumbnails</span>
                                    <span id="menu_txt_arbore" style="display: none;">Folder Tree</span>
                                    <span id="menu_txt_preferencias" style="display: none;">User Preferences</span>
                              </li>
      </ul>
</div>
<div id="utilidades_superior">
      <div id="navegacion">
Location:&nbsp; <a href="navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.">Start</a> /      </div>
            <script type="text/javascript"><!--

      function envia_busca (obx_form) {
            obx_palabra = obx_form.palabra_buscar.value;

            if (obx_palabra == "" || obx_palabra == "Search") {
                  return false;
            }

            return true;
      }

      //--></script>
      <div id="buscador">
            <form id="busca_simple" action="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=buscador" method="post" onsubmit="return envia_busca(this);">
            <fieldset>
            <input type="hidden" name="executa" value="true" />
            <input type="hidden" name="campos_buscar[]" value="nome" />
            <input type="hidden" name="donde_buscar" value="2" />
            <input type="text" name="palabra_buscar" id="palabra_buscar" value="Search" onfocus="this.value='';" />
            <input type="image" name="submit" src="estilos/pfn/imx/buscar.png" style="border: 0;" />
            </fieldset>
            </form>
      </div>
      </div>
<br class="nada" />
<script type="text/javascript"><!--

function marca_desmarca_multiples () {
      obx_form = document.getElementById('seleccion_multiple');
      ahora = document.getElementById('check_maestro');

      for (b=0; b < obx_form.length; b++) {
            tmpobx = obx_form.elements[b];

            if (tmpobx.name.indexOf('multiple_escollidos[]') == 0) {
                  tmpobx.checked = ahora.checked;

                  if (ahora.checked) {
                        tmpobx.parentNode.parentNode.className = 'trmarcada';
                  } else {
                        if (document.getElementById) {
                              obxtr = tmpobx.parentNode.parentNode;
                        } else {
                              obxtr = tmpobx.parentElement.parentElement;
                        }

                        partes = obxtr.id.split('_');

                        if (obxtr.id.indexOf('trdir') == 0) {
                              obxtr.className = 'trdir'+partes[1];
                        } else {
                              obxtr.className = 'trarq'+partes[1];
                        }
                  }
            }
      }
}

function marca_multiple (obx) {
      if (document.getElementById) {
            obxtr = obx.parentNode.parentNode;
      } else {
            obxtr = tmpobx.parentElement.parentElement;
      }

      if (obx.checked) {
            obxtr.className = 'trmarcada';
      } else {
            obxmaestro = document.getElementById('check_maestro');
            partes = obxtr.id.split('_');
            obxmaestro.checked = false;
            obxtr.className = partes[0]+partes[1];
      }
}

function envia_escollidos (accion) {
      ok = 0;
      obx_form = document.getElementById('seleccion_multiple');

      for (b = 0; (b < obx_form.length) && (ok < 2); b++) {
            tmpobj = obx_form.elements[b];

            if ((tmpobj.name.indexOf('multiple_escollidos[]') == 0) && (tmpobj.checked == true)) {
                  ok++;
            }
      }

      if ((ok > 0) && (accion != '')) {
            if (accion == 'descargar') {
                  destino = 'accion.php?accion=multiple_descargar&amp;PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;zlib=true';

                  if (ok > 1) {
                        nome = prompt(HtmlDecode('compressed file\'s name:'));

                        if ((nome == '') || !nome) {
                              return false;
                        }

                        destino += '&amp;nome_comprimido='+nome;
                  }
            } else {
                  destino = 'accion.php?accion=multiple_'+accion+'&amp;PHPSESSID=2a000f11f8333224814bd2543eef71fd';
            }

            obx_form.action = destino.replace(/&amp;/g, '&');
            obx_form.submit();
      }

      return false;
}

//--></script>
<form id="seleccion_multiple" action="#" method="post" onsubmit="envia_escollidos(); return false;"><table id="listado" summary="">
      <thead>
      <tr class="trcab">
                        <th><input type="checkbox" id="check_maestro" name="check_maestro" onclick="marca_desmarca_multiples();" class="checkbox" /></th>
                        <th><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;orde=nome&amp;pos=ASC">Name</a></th>
                        <th><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;orde=tipo&amp;pos=ASC">Type</a></th>
                        <th><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;orde=tamano&amp;pos=ASC">Size</a></th>
                        <th><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;orde=data&amp;pos=ASC">Date</a></th>
                        <th><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;orde=permisos&amp;pos=ASC">Permissions</a></th>
                        <th><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;orde=accions&amp;pos=ASC">Actions</a></th>
                  </tr>
      </thead>
      <tbody>
      <tr class="trinfo">
                        <td>&nbsp;</td>
                                    <td class="tdnome" colspan="3">
                  <strong>Main</strong><br />            </td>
                        <td>12:41 10-10-2007</td>
                        <td>777</td>
                        <td>
                  <ul class="accions">
                                                <li class="info"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;cal=.&amp;accion=info" title="Information"><span class="oculto">Information</span></a></li>
                                          </ul>
            </td>
                  </tr>
                  <tr id="trarq_1_0" class="trarq1">
                        <td><input type="checkbox" id="multiple_escollidos_a0" name="multiple_escollidos[]" value="01 Empty Cupboard.wma" class="checkbox" onclick="marca_multiple(this);" /></td>
                        <td class="tdnome">
                                    <a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=01%20Empty%20Cupboard.wma&amp;accion=descargar" onclick="window.open(this.href); return false;">
                                    <img src="estilos/pfn/ico/wma.png" alt="File" style="margin-right: 5px;" />
                                    01 Empty Cupboard</a>
                              </td>
                        <td>WMA</td>
                        <td>14.79 MB</td>
                        <td>12:40 10-10-2007</td>
                        <td>666</td>
                        <td>
                  <ul class="accions">
                                                <li class="info"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=01%20Empty%20Cupboard.wma&amp;accion=info" title="Information"><span class="oculto">Information</span></a></li>
                                                <li class="descargar"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=01%20Empty%20Cupboard.wma&amp;accion=descargar&amp;modo=descargar" title="Download"><span class="oculto">Download</span></a></li>
                                          </ul>
            </td>
                  </tr>
            <tr id="trarq_0_1" class="trarq0">
                        <td><input type="checkbox" id="multiple_escollidos_a1" name="multiple_escollidos[]" value="09 Lovely Ugly.wma" class="checkbox" onclick="marca_multiple(this);" /></td>
                        <td class="tdnome">
                                    <a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=09%20Lovely%20Ugly.wma&amp;accion=descargar" onclick="window.open(this.href); return false;">
                                    <img src="estilos/pfn/ico/wma.png" alt="File" style="margin-right: 5px;" />
                                    09 Lovely Ugly</a>
                              </td>
                        <td>WMA</td>
                        <td>7.84 MB</td>
                        <td>12:36 10-10-2007</td>
                        <td>666</td>
                        <td>
                  <ul class="accions">
                                                <li class="info"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=09%20Lovely%20Ugly.wma&amp;accion=info" title="Information"><span class="oculto">Information</span></a></li>
                                                <li class="descargar"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=09%20Lovely%20Ugly.wma&amp;accion=descargar&amp;modo=descargar" title="Download"><span class="oculto">Download</span></a></li>
                                          </ul>
            </td>
                  </tr>
            <tr id="trarq_1_2" class="trarq1">
                        <td><input type="checkbox" id="multiple_escollidos_a2" name="multiple_escollidos[]" value="ApplicationTemplateCore.wsp" class="checkbox" onclick="marca_multiple(this);" /></td>
                        <td class="tdnome">
                                    <a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=ApplicationTemplateCore.wsp&amp;accion=descargar" onclick="window.open(this.href); return false;">
                                    <img src="estilos/pfn/ico/0.png" alt="File" style="margin-right: 5px;" />
                                    ApplicationTemplateCore</a>
                              </td>
                        <td>WSP</td>
                        <td>1.06 MB</td>
                        <td>11:55 10-10-2007</td>
                        <td>666</td>
                        <td>
                  <ul class="accions">
                                                <li class="info"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=ApplicationTemplateCore.wsp&amp;accion=info" title="Information"><span class="oculto">Information</span></a></li>
                                                <li class="descargar"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=ApplicationTemplateCore.wsp&amp;accion=descargar&amp;modo=descargar" title="Download"><span class="oculto">Download</span></a></li>
                                          </ul>
            </td>
                  </tr>
            <tr id="trarq_0_3" class="trarq0">
                        <td><input type="checkbox" id="multiple_escollidos_a3" name="multiple_escollidos[]" value="bfExplorer-0.0.7.2.zip" class="checkbox" onclick="marca_multiple(this);" /></td>
                        <td class="tdnome">
                                    <a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=bfExplorer-0.0.7.2.zip&amp;accion=descargar" onclick="window.open(this.href); return false;">
                                    <img src="estilos/pfn/ico/zip.png" alt="File" class="icono" />
                                    bfExplorer-0.0.7.2</a>
                  <br />This is a test upload            </td>
                        <td>ZIP</td>
                        <td>1.36 MB</td>
                        <td>11:53 10-10-2007</td>
                        <td>666</td>
                        <td>
                  <ul class="accions">
                                                <li class="info"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=bfExplorer-0.0.7.2.zip&amp;accion=info" title="Information"><span class="oculto">Information</span></a></li>
                                                <li class="descargar"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=bfExplorer-0.0.7.2.zip&amp;accion=descargar&amp;modo=descargar" title="Download"><span class="oculto">Download</span></a></li>
                                          </ul>
            </td>
                  </tr>
            <tr id="trarq_1_4" class="trarq1">
                        <td><input type="checkbox" id="multiple_escollidos_a4" name="multiple_escollidos[]" value="Employee Logins.tif" class="checkbox" onclick="marca_multiple(this);" /></td>
                        <td class="tdnome">
                                    <a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=Employee%20Logins.tif&amp;accion=descargar" onclick="window.open(this.href); return false;">
                                    <img src="estilos/pfn/ico/tif.png" alt="File" style="margin-right: 5px;" />
                                    Employee Logins</a>
                              </td>
                        <td>TIF</td>
                        <td>6.02 MB</td>
                        <td>12:30 10-10-2007</td>
                        <td>666</td>
                        <td>
                  <ul class="accions">
                                                <li class="info"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=Employee%20Logins.tif&amp;accion=info" title="Information"><span class="oculto">Information</span></a></li>
                                                <li class="descargar"><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;cal=Employee%20Logins.tif&amp;accion=descargar&amp;modo=descargar" title="Download"><span class="oculto">Download</span></a></li>
                                          </ul>
            </td>
                  </tr>
            </tbody>
</table>

<div id="utilidades_inferior">
      <div id="paxinar">
            <select id="lista" onchange="enlace('/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;lista='+this.value);">
<option value="0" selected="selected">1 - 5</option>
</select>      </div>

            <ul id="pe_multiple">
            <li class="primeiro">Selection:</li>
                        <li class="comprimir"><a href="#" onclick="return envia_escollidos('descargar');" title="Download Compressed Archive"><span class="oculto">Multiple Compression</span></a></li>
                  </ul>
      </div>
</form><br class="nada" />
<div id="resumo_dir">
      5 Files -  Size: 31.07 MB</div>
      <div id="pe_separador"></div>
</div>
<div id="pe">
            <table id="pe_utiles" summary=""><tr><td style="border: 0;">&nbsp;</td></tr></table>
            <div id="pe_texto"><a href="http://pfn.sourceforge.net/" onclick="window.open(this.href, '_blank'); return false">PHPfileNavigator</a> - Execution time: 0,0605 seconds</div>
</div>
<!--

Tempos de execucion:

1192041669.2969500: inicio
1192041669.3320260: precarga
1192041669.3328300: cabeceira
1192041669.3351280: opcions
1192041669.3396450: i:navega
1192041669.3442160: f:navega
1192041669.3448650: posicion
1192041669.3492060: i:dir
1192041669.3492330: i:arq
1192041669.3574740: navega
1192041669.3585370: fin

//-->
</body>
</html>
 
0
 

Author Comment

by:gochiefs
ID: 20051164
gamebits:

That include is the first code that i posted.
0
 
LVL 28

Expert Comment

by:gamebits
ID: 20051195
Ok we have <a href="<?php echo $menu_opc['actualizar']; ?>"
Then we have                                $menu_opc['actualizar'] = PFN_get_url();

Would like to see the function PFN_get_url();
0
 

Author Comment

by:gochiefs
ID: 20051208
Here is the get_url and the cambia_url, which is the other erroring one.

/**
* function PFN_get_url (boolean $php, boolean header)
*
* devuelve la url actual.
* si el parámetro $php es true, la cadena incluye
* al principio el valor de PHP_SELF
* para llamadas desde la funcion Header('Location: ...'); se debe
* pasar a true el parametro $header
*
* return string
*/
function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $php?($PFN_vars->server('PHP_SELF').'?'):'';
      $q = PFN_query_array();
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}

/**
* function PFN_cambia_url (mixed $orixen, mixed $destino, boolean $php, boolean header)
*
* realiza un cambio en alguna de las variables pasadas por
* QUERY_STRING, en caso de no existir la variable a cambiar,
* la crea.
* el cambio no será permanente ya que la próxima vez que se pida
* el mismo campo, devolve su valor inicial.
* el cambio puede ser multiple si los valores de $orixen y $destino
* son un array
* si el parámetro $php es true, la cadena incluye
* al principio el valor de PHP_SELF
* para llamadas desde la funcion Header('Location: ...'); se debe
* pasar a true el parametro $header
*
* return string
*/
function PFN_cambia_url ($orixen, $destino, $php=true, $header=false) {
      global $PFN_vars;
      $cad = $php?($PFN_vars->server('PHP_SELF').'?'):'';
      $url = PFN_query_array();

      if (is_array($orixen)) {
            foreach ($orixen as $k => $v) {
                  if (empty($destino[$k])) {
                        unset($url[$v]);
                  } else {
                        $url[$v] = $destino[$k];
                  }
            }
      } else {
            if (empty($destino)) {
                  unset($url[$orixen]);
            } else {
                  $url[$orixen] = $destino;
            }
      }

      return $cad.PFN_query_str($url,$header?'&':'&amp;');
}

/**
* function PFN_cambia_outra_url (string $url, mixed $orixen, mixed $destino, boolean $header=false)
*
* realiza un cambio en una URL distinta a la actual
*
* return string
*/
function PFN_cambia_outra_url ($url, $orixen, $destino, $header=false) {
      $q = array();
      list($php, $query) = explode('?', $url);
      strlen($query)?parse_str($query, $q):'';

      if (is_array($orixen)) {
            foreach ($orixen as $k => $v) {
                  if (empty($destino[$k])) {
                        unset($q[$v]);
                  } else {
                        $q[$v] = $destino[$k];
                  }
            }
      } else {
            if (empty($destino)) {
                  unset($q[$orixen]);
            } else {
                  $q[$orixen] = $destino;
            }
      }

      $acum = '';
      $partes = explode('/', $php);

      if (preg_match('/^[a-z]{3,5}:$/i', $partes[0], $http)) {
            $http = $http[0].'/';
            array_shift($partes);
      } else {
            $http = '';
      }

      foreach ($partes as $v) {
            if (!empty($v) && $v != '.') {
                  $acum .= '/'.rawurlencode($v);
            }
      }

      $q = PFN_query_str($q, ($header?'&':'&amp;'));

      return $http.$acum.(empty($q)?'':('?'.$q));
}
0
 
LVL 17

Expert Comment

by:nplib
ID: 20051452
Here is a snippet of your code,

The reason for the problem you are having is on some of the links, the ones you mentioned the problem in the href you will notice a preceding slash  

href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd" onmouseover="amosa('menu_txt_actualizar');"
if you changed it to
href="pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd" onmouseover="amosa('menu_txt_actualizar');"
You will no longer get that problem.

if you look at the following code you will notice the href's that don't have a preceding slash work fine and the one's that have it break.
That is why.

                      <li><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd" onmouseover="amosa('menu_txt_actualizar');" onmouseout="oculta('menu_txt_actualizar');"><img src="estilos/pfn/imx/actualizar.png" alt="Reload" /></a></li>
                        <li><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=crear_dir" onmouseover="amosa('menu_txt_crear_dir');" onmouseout="oculta('menu_txt_crear_dir');"><img src="estilos/pfn/imx/crear_dir.png" alt="New Folder" /></a></li>
                        <li><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=novo_arq" onmouseover="amosa('menu_txt_novo_arq');" onmouseout="oculta('menu_txt_novo_arq');"><img src="estilos/pfn/imx/novo_arq.png" alt="Create a File" /></a></li>
                        <li><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=subir_arq" onmouseover="amosa('menu_txt_subir_arq');" onmouseout="oculta('menu_txt_subir_arq');"><img src="estilos/pfn/imx/subir_arq.png" alt="Upload a File" /></a></li>
                        <li><a href="accion.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;accion=subir_url" onmouseover="amosa('menu_txt_subir_url');" onmouseout="oculta('menu_txt_subir_url');"><img src="estilos/pfn/imx/subir_url.png" alt="Upload URL" /></a></li>
                        <li><a href="/pfn/navega.php/pfn/navega.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd&amp;dir=.&amp;ver_imaxes=true" onmouseover="amosa('menu_txt_ver_imaxes');" onmouseout="oculta('menu_txt_ver_imaxes');"><img src="estilos/pfn/imx/ver_imaxes.png" alt="Thumbnails" /></a></li>
                        <li><a href="arbore.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd" onmouseover="amosa('menu_txt_arbore');" onmouseout="oculta('menu_txt_arbore');"><img src="estilos/pfn/imx/arbore.png" alt="Folder Tree" /></a></li>
                        <li><a href="preferencias.php?PHPSESSID=2a000f11f8333224814bd2543eef71fd" onmouseover="amosa('menu_txt_preferencias');" onmouseout="oculta('menu_txt_preferencias');"><img src="estilos/pfn/imx/preferencias_usuario.png" alt="User Preferences" /></a></li>

I would need some more time to figure out exactly what to fix, but you could always
do something like change your PFN_get_url function from

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $php?($PFN_vars->server('PHP_SELF').'?'):'';
      $q = PFN_query_array();
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}
to
function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $php?($PFN_vars->server('PHP_SELF').'?'):'';
      $q = PFN_query_array();
      $return = $cad.PFN_query_str($q,$header?'&':'&amp;');
      return substr($return, 1, strlen($return);
}

This will return the string without the preceding /
0
 

Author Comment

by:gochiefs
ID: 20051504
trying the code you gave me causes http 500 error or syntax error, unexpected ';' on line 79, which would be the last ;
0
 
LVL 17

Expert Comment

by:nplib
ID: 20051688
Sorry Typo,
I forgot a second ) in the

return substr($return, 1, strlen($return));

copy and paste this over the previous.

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $php?($PFN_vars->server('PHP_SELF').'?'):'';
      $q = PFN_query_array();
      $return = $cad.PFN_query_str($q,$header?'&':'&amp;');
      return substr($return, 1, strlen($return));
}
0
 

Author Comment

by:gochiefs
ID: 20051815
Nope, still nothing.
heres the address with original code
/pfn/navega.php/pfn/navega.php?PHPSESSID=f53cbdcaefa0c7440503b4e218ad2dfc

And here it is with yours.
/pfn/pfn/navega.php/pfn/navega.php?PHPSESSID=f53cbdcaefa0c7440503b4e218ad2dfc
0
 
LVL 17

Expert Comment

by:nplib
ID: 20051920
ok revert your code to orignal,

Can you post the PFN_query_array() function, and the PFN_query_str() function.

add "print_r($cad);" to your function, just to see what's it out.

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $php?($PFN_vars->server('PHP_SELF').'?'):'';
      $q = PFN_query_array();
      print_r($cad);
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}
0
 

Author Comment

by:gochiefs
ID: 20051955
Here ya go
And i beleive this is what you wanted from the print /pfn/navega.php/pfn/navega.php?ÿ

/**
* function PFN_query_array (void)
*
* devuelve la cadena de QUERY_STRING convertida
* en un array multidimensional
*
* return array
*/
function PFN_query_array () {
      global $PFN_vars;
      parse_str($PFN_vars->server('QUERY_STRING'),$a);
      return $a;
}

/**
* function PFN_query_str (array $params, string $sep)
*
* recibe un array multidimensional y lo transforma en
* una cadena para pasar como QUERY_STRING, con los elementos
* separados por $sep
*
* return string
*/
function PFN_query_str ($params, $sep="&amp;") {
       foreach ($params as $key => $value) {
            $str .= (strlen($str) < 1) ? '' : $sep;
            $str .= $key.'='.rawurlencode($value);
      }

      return $str;
}

0
 
LVL 17

Expert Comment

by:nplib
ID: 20052192
While I go through this code can you do the following and tell me the output

remove "print_r($cad);"

add "print_r($q);" to your function, just to see what's it out.

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $php?($PFN_vars->server('PHP_SELF').'?'):'';
      $q = PFN_query_array();
      print_r($q);
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}
0
 

Author Comment

by:gochiefs
ID: 20052211
Here ya go

Array ( [PHPSESSID] => 4cafb849788b71f57daf80c72c6f7edd ) Array ( [PHPSESSID] => 4cafb849788b71f57daf80c72c6f7edd ) Array ( [PHPSESSID] => 4cafb849788b71f57daf80c72c6f7edd ) Array ( [PHPSESSID] => 4cafb849788b71f57daf80c72c6f7edd ) Array ( [PHPSESSID] => 4cafb849788b71f57daf80c72c6f7edd ) Array ( [PHPSESSID] => 4cafb849788b71f57daf80c72c6f7edd ) ÿ
0
 
LVL 17

Expert Comment

by:nplib
ID: 20052258
What happens if you change the $cad = .... line to the following?
and add the print_r($cad) back.
What is the result.

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $PFN_vars->server('PHP_SELF').'?';
      print_r($cad);
      $q = PFN_query_array();
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}
0
 

Author Comment

by:gochiefs
ID: 20052274
Here ya go
pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?ÿ
0
 
LVL 17

Expert Comment

by:nplib
ID: 20052325
function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $php?($_SERVER['PHP_SELF'].'?'):'';
      print_r($cad);
      $q = PFN_query_array();
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}

Try that, tell me the output.
0
 

Author Comment

by:gochiefs
ID: 20053392
/pfn/navega.php/pfn/navega.php?ÿ
0
 
LVL 17

Expert Comment

by:nplib
ID: 20056743
If You do this?
function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = ($_SERVER['PHP_SELF'].'?';
      print_r($cad);
      $q = PFN_query_array();
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}

What is the output?

Or if you do this?

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $php;
      print_r($cad);
      $q = PFN_query_array();
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}

What is the output;
0
 

Author Comment

by:gochiefs
ID: 20056966
for the first one
PHP Parse error: syntax error, unexpected ';' in C:\Inetpub\wwwroot\pfn\data\include\funcions.php on line 76  

and just the number 1 for the second.
0
 
LVL 17

Expert Comment

by:nplib
ID: 20057045
Sorry Typo, Try again.

If You do this?
function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $_SERVER['PHP_SELF'].'?';
      print_r($cad);
      $q = PFN_query_array();
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}

What is the output?
0
 

Author Comment

by:gochiefs
ID: 20057079
Here ya go.

/pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?/pfn/navega.php/pfn/navega.php?ÿ
0
 
LVL 17

Expert Comment

by:nplib
ID: 20057317
This should return a numerical output, if I'm right it should return the number 30.

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $PFN_vars->server('PHP_SELF').'?';
      print_r($cad);
      $q = PFN_query_array();
      $return = $cad.PFN_query_str($q,$header?'&':'&amp;');
      echo strlen($return);
      return $return;
}
0
 

Author Comment

by:gochiefs
ID: 20057338

/pfn/navega.php/pfn/navega.php?73/pfn/navega.php/pfn/navega.php?73/pfn/navega.php/pfn/navega.php?73/pfn/navega.php/pfn/navega.php?73/pfn/navega.php/pfn/navega.php?73/pfn/navega.php/pfn/navega.php?73ÿ
0
 
LVL 17

Expert Comment

by:nplib
ID: 20057341
Sorry, I made a mistake, so much copy and pasting code.

This should return a numerical output, if I'm right it should return the number 30.

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $PFN_vars->server('PHP_SELF').'?';
      echo strlen($cad);
      $q = PFN_query_array();
      $return = $cad.PFN_query_str($q,$header?'&':'&amp;');
      return $return;
}
0
 

Author Comment

by:gochiefs
ID: 20057359
Close...returned a 31
313131313131ÿ
0
 
LVL 17

Expert Comment

by:nplib
ID: 20057463
What is the output?

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $PFN_vars->server('PHP_SELF').'?';
      echo substr($cad , (strlen($cad )/2)+1, strlen($cad ));
      $q = PFN_query_array();
      $return = $cad.PFN_query_str($q,$header?'&':'&amp;');
      return $return;
}
0
 

Author Comment

by:gochiefs
ID: 20057478
pfn/navega.php?pfn/navega.php?pfn/navega.php?pfn/navega.php?pfn/navega.php?pfn/navega.php?ÿ
0
 
LVL 17

Expert Comment

by:nplib
ID: 20057501
See if this fixes your problem.

function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $PFN_vars->server('PHP_SELF').'?';
      $cad = substr($cad , (strlen($cad )/2)+1, strlen($cad ));
      $q = PFN_query_array();
      $return = $cad.PFN_query_str($q,$header?'&':'&amp;');
      return $return;
}
0
 

Author Comment

by:gochiefs
ID: 20057537
Almost right. Just has the extra pfn directory

pfn/pfn/navega.php?PHPSESSID=60df8b8d11aa2609f992be5599259dfb
0
 
LVL 17

Accepted Solution

by:
nplib earned 2000 total points
ID: 20057594
function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $PFN_vars->server('PHP_SELF').'?';
      $cad = substr($cad , (strlen($cad )/2)+5, strlen($cad ));
      $q = PFN_query_array();
      $return = $cad.PFN_query_str($q,$header?'&':'&amp;');
      return $return;
}
0
 

Author Comment

by:gochiefs
ID: 20057766
That appears to work and i changed the code for the cambria one and that also works now too. :)
The only problem left is the thumbnails dont show up, which is what the cambia url one does.
0
 
LVL 17

Expert Comment

by:nplib
ID: 20057961
Try this.
If this doesn't work, we will have  to go through it line by line.

function PFN_cambia_url ($orixen, $destino, $php=true, $header=false) {
      global $PFN_vars;
      $cad = $php?($PFN_vars->server('PHP_SELF').'?'):'';
      $cad = substr($cad , (strlen($cad )/2)+5, strlen($cad ));
      $url = PFN_query_array();

      if (is_array($orixen)) {
            foreach ($orixen as $k => $v) {
                  if (empty($destino[$k])) {
                        unset($url[$v]);
                  } else {
                        $url[$v] = $destino[$k];
                  }
            }
      } else {
            if (empty($destino)) {
                  unset($url[$orixen]);
            } else {
                  $url[$orixen] = $destino;
            }
      }

      return $cad.PFN_query_str($url,$header?'&':'&amp;');
}
0
 

Author Comment

by:gochiefs
ID: 20058067
It turns out its worse than i though. Downloads are corrupted. Theyre fine if i view them on the server, but something is happening when theyre downloaded to clients that the files are being corrupted.
Ill mess with it some and start another question if i cant figure it out. Thanks for all your help
0
 
LVL 17

Expert Comment

by:nplib
ID: 20058128
I had that happen once when the files where coming from a unix/linux based server.
Make sure the file have a owner of nobody and a group owner of nogroup.

That should solve that.
0
 

Author Comment

by:gochiefs
ID: 20058299
I'm running IIS, but just to check i gave the everyone permission to my IIS folder, and the uploads folder. Still same thing. When i download it downloads the correct file size, but if you open the file with notepad its completely empty.
0
 
LVL 17

Expert Comment

by:nplib
ID: 20058369
After closing it does the file size change? Or does it remain the same?
0
 

Author Comment

by:gochiefs
ID: 20058387
stays the same.
0
 
LVL 17

Expert Comment

by:nplib
ID: 20058419
What size is the file size?
0
 

Author Comment

by:gochiefs
ID: 20058436
24.1 KB
Its a jpeg image. Double checked and both the original working file and the corruprt one are the exact same size.
0
 

Author Comment

by:gochiefs
ID: 20066043
ok, looks like its back to the drawing board. I reinstalled FileNav and it seems the code that we changed in the function.php is why the downloads arent working anymore
0
 
LVL 17

Expert Comment

by:nplib
ID: 20066256
duplicate the functions

with slightly different names,

one done the way I showed, one the original.

For the links that it fixed, call to the new function, for the downloads call to the original function.
E.g.
function PFN_get_url _actualizar($php=true, $header=false) {
      global $PFN_vars;
      $cad = $PFN_vars->server('PHP_SELF').'?';
      $cad = substr($cad , (strlen($cad )/2)+5, strlen($cad ));
      $q = PFN_query_array();
      $return = $cad.PFN_query_str($q,$header?'&':'&amp;');
      return $return;
}
function PFN_get_url ($php=true, $header=false) {
      global $PFN_vars;
      $cad = $PFN_vars->server('PHP_SELF').'?';
      $q = PFN_query_array();
      return $cad.PFN_query_str($q,$header?'&':'&amp;');
}
and do similar with the cambia functions.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question