problem with php pages

Problems with the Windows version of XAMPP, questions, comments, and anything related.

problem with php pages

Postby luigi.riva@dtpc.it » 27. August 2010 23:12

Hi. I've installed xampp on my new laptop. I copied all the web applications I developed in these years on the new machine. All applications were functioning and if you upload them on a ftp server they don't have any problem. Exspecially when there is the inclusion of a file, the browser doesn't inlcude the file, but it outputs this message:
"; include "testata.htm"; include "functions.php"; echo "
"; echo "
MENU PRINCIPALE

"; echo "Benvenuto, ".$_SESSION['username'].", il tuo ruolo è ".$_SESSION['reparto'].""; ?>
can anyone help me?

following the file code:

<?
include "validation.php";
echo "<link href=tabelle.css rel=stylesheet type=text/css>";

include "testata.htm";
include "functions.php";
echo "<br><table width=1020 border=1 cellspacing=0>";
echo "<tr><td class=titoli>MENU PRINCIPALE</td></tr></table><br>";
echo "Benvenuto, <strong> ".$_SESSION['username']."</strong>, il tuo ruolo &egrave; <strong>".$_SESSION['reparto']."</strong>";

?>
validation.php code:
<?php
@session_start();
if (!isset($_SESSION['username'])) {
$pag_precedente = "index.php";
include "redir_neutro.php";
exit;
}
?>

functions.php code:
<?
//funzioni utilizzate per tutto il software
function levapar($stringa) {
$stringa = eregi_replace("\n","<br>",$stringa);
$stringa = eregi_replace("\r","<br>",$stringa);
$stringa = eregi_replace("<br><br>","<br>",$stringa);
$stringa = eregi_replace("è","&egrave;",$stringa);
$stringa = eregi_replace("à","&agrave;",$stringa);
$stringa = eregi_replace("ò","&ograve;",$stringa);
$stringa = eregi_replace("ì","&igrave;",$stringa);
$stringa = eregi_replace("ù","&ugrave;",$stringa);
$stringa = eregi_replace("é","&eacute;",$stringa);
$stringa = eregi_replace("'","&acute;",$stringa);
$stringa = eregi_replace("&","&amp;",$stringa);
$stringa = eregi_replace("\"","&quot;",$stringa);
$stringa = eregi_replace("«","&laquo;",$stringa);
$stringa = eregi_replace("»","&raquo;",$stringa);
$stringa = eregi_replace("€","&euro;",$stringa);
$stringa = eregi_replace(";;",";",$stringa);
$stringa = addslashes($stringa);
return $stringa;
}
function levapar2($stringa) {
$stringa = eregi_replace("<br>","\n",$stringa);
$stringa = eregi_replace("<br>","\r",$stringa);
$stringa = eregi_replace("<br>","<br><br>",$stringa);
$stringa = eregi_replace("&egrave","è;",$stringa);
$stringa = eregi_replace("&agrave;","à",$stringa);
$stringa = eregi_replace("&ograve;","ò",$stringa);
$stringa = eregi_replace("&igrave;","ì",$stringa);
$stringa = eregi_replace("&ugrave;","ù",$stringa);
$stringa = eregi_replace("&eacute;","é",$stringa);
$stringa = eregi_replace("&acute;","'",$stringa);
$stringa = eregi_replace("&amp;","&",$stringa);
$stringa = eregi_replace("&quot;","\"",$stringa);
$stringa = eregi_replace("&laquo;","«",$stringa);
$stringa = eregi_replace("&raquo;","»",$stringa);
$stringa = eregi_replace("&euro;","€",$stringa);
$stringa = eregi_replace(";;",";",$stringa);
$stringa = stripslashes($stringa);
return $stringa;
}
function DuplicateMySQLRecord ($table, $id_field, $id) {
// load the original record into an array
$result = mysql_query("SELECT * FROM {$table} WHERE {$id_field}={$id}");
$original_record = mysql_fetch_assoc($result);

// insert the new record and get the new auto_increment id
mysql_query("INSERT INTO {$table} (`{$id_field}`) VALUES (NULL)");
$newid = mysql_insert_id();

// generate the query to update the new record with the previous values
$query = "UPDATE {$table} SET ";
foreach ($original_record as $key => $value) {
if ($key != $id_field) {
$query .= '`'.$key.'` = "'.str_replace('"','\"',$value).'", ';
}
}
$query = substr($query,0,strlen($query)-2); # lop off the extra trailing comma
$query .= " WHERE {$id_field}={$newid}";
mysql_query($query);

// return the new id
return $newid;
}
?>

testata.htm code:
<html>
<head>
<link href="tabelle.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link {
color: #000000;
}
a:hover {
color: #003399;
}
a:visited {
color: #000000;
}
-->
</style>
<script language=JavaScript>

var menus=[],_m3=window.external?[' style="width:100%;height:100%"','div onclick="','div']:['','a href="javascript:','a'],_mC=document.getElementById?function(_mR){return document.getElementById(_mR)}:function(_mR){return document.all[_mR]};function menu(_m1,_mO){var _=this,i;_._m1=_m1;_._mO=_mO;_._mS='';_.id=menus.length;_._m0=[];_._m2=[];_._m4=[0,0];_._mO[-1]={'firstX':20,'firstY':20,'nextX':15,'nextY':15,'width':100,'height':22,'hideAfter':200,'target':'_self','trace':0,'css':''};for(i=0;i<_._m1.length;i++)if(_._m1[i])new _mE(0,_,_,_._m1[i]);for(i=0;i<_._m2.length;i++)_mA(_._m2[i],1);menus[_.id]=_;}function _mD(_mK){var i,a=menus[_mK]._m0;for(i=0;i<a.length;i++){_mA(a[i],0);_mB(a[i],'norm');}}function _mF(_mK,_mI){var m=menus[_mK],_=m._m0[_mI]._m1[1];_mB(m._m0[_mI],'clck');if(_)open(_,_m9(m._m0[_mI]._m8,m._mO,'target'));}function _mG(_mK,_mI){var m=menus[_mK];m._mL=setTimeout('_mD('+_mK+')',_m9(m._mN._m8,m._mO,'hideAfter'));if(m._mN.id==_mI)m._mN=null;}function _mH(_mK,_mI){var m=menus[_mK],_,_m7,i;m._mN=_=m._m0[_mI];if(m._mL)clearTimeout(m._mL);for(i=0;i<m._m0.length;i++){_=m._m0[i];_m7=!m._mN._mS.indexOf(_._mT);if(_m7)_mB(_,_==m._mN?'over':'norm');_mA(_,_m7);}if(m._mN._m6)for(i=m._mN;i&&i._m5;i=i._mP)_mB(i,'over');}function _mE(l,p,m,_m1){var _=this,i,c=p._m2.length,_mO=m._mO;_._m1=_m1;_._mP=p;_._mT=p._mS;_._mS=p._mS+c+':';_._m8=l;_.id=m._m0.length;m._m0[_.id]=_;p._m2[c]=_;var id=m.id+','+_.id,nX,nY;_._m6=_m9(l,_mO,'trace');for(i=l;i>=-1;i--){if(_mO[i]&&_mO[i]['nextX']!=null)nX=_mO[i]['nextX'];if(_mO[i]&&_mO[i]['nextY']!=null)nY=_mO[i]['nextY'];if(nX!=null||nY!=null)break;}_._m4=[p._m4[0]+_m9(l,_mO,'firstX')+(nX!=null?nX*c+_m9(l,_mO,'width')*c:0),p._m4[1]+_m9(l,_mO,'firstY')+(nY!=null?nY*c+_m9(l,_mO,'height')*c:0)];document.write('<',_m3[1],'_mF(',id,')" id="me',id,'" style="position:absolute;top:',_._m4[1],'px;left:',_._m4[0],'px;width:',_m9(l,_mO,'width'),'px;height:',_m9(l,_mO,'height'),'px;visibility:hidden;z-index:',l,';text-decoration:none" onmouseout="_mG(',id,')" onmouseover="_mH(',id,')"><div',_m3[0],' id="mi',id,'" class="',_m9(l,_mO,'css'),'norm">',_m1[0],'</div></',_m3[2],'>');_._m5=[_mC('me'+m.id+','+_.id),_mC('mi'+m.id+','+_.id),_m9(l,_mO,'css')];if(_m1.length>2){_._m2=[];for(i=2;i<_m1.length;i++)if(_m1[i])new _mE(l+1,_,m,_m1[i]);}}function _mA(_,_mJ){if(_._mQ==_mJ)return;_._mQ=_mJ;if(_mJ)_._m5[0].style.visibility='visible';else if(_._m8)_._m5[0].style.visibility='hidden';}function _mB(_,_mM){if(_._m5[3]==_mM)return;_._m5[3]=_mM;_._m5[1].className=_._m5[2]+_mM}function _m9(l,_mO,k){for(var i=l;i>=-1;i--)if(_mO[i]&&_mO[i][k]!=null)return _mO[i][k];}


</script>
<script language=JavaScript>
var menuHierarchy = [
['Anagrafiche', null,
['Utenti','utenti.php',
['Nuovo utente','nuovo_utente.php'],
],
['Cli/for','clienti.php',
['Nuovo Cliente','nuovo_cliente.php'],
],
['Agenti','lista_agenti.php',
['Nuovo Agente','nuovo_agente.php'],
],
['Macchine','lista_macchine.php',
['Nuova Macchina','nuova_macchina.php'],
],
['Pagamenti','pagamenti.php',
['Nuovo Pagamento','nuovo_pagamento.php'],
],
['Banche','banche.php',
['Nuova Banca','nuova_banca.php'],
],
],
['Prodotti', null,
['Gestione magazzino','Magazzino.php',
['Nuovo articolo','nuovo_articolo.php'],
],
['Gestione forniture','forniture.php',
['Nuova fornitura','nuova_fornitura.php'],
],
],
['Pre-vendita', null,
['Costi','lista_costi.php',
['Nuovo costo','nuovo_costo.php'],
],
['Preventivi','preventivi.php',
['Nuovo preventivo','nuovo_preventivo.php'],
],
['Ddt','lista_ddt.php',
['Nuovo Ddt','nuovo_ddt.php'],
],
['Commesse','Commesse.php',
['Nuova Commessa','nuova_commessa.php'],
],
],
['Fatturazione', null,
['Nuova fattura',null,
['Fatt. consumabili','fatturazione_fase1.php?tipo=consumabili'],
['Fatt. vendita','fatturazione_fase1.php?tipo=vendita'],
['Fatt. assistenza','fatturazione_fase1.php?tipo=assistenza'],
['Fatt. libera','nuova_fattura.php'],
],
['Lista fatture','lista_fatture.php',
],
['Prima nota','prima_nota.php',
['Nuovo mov.','nuova_riga_primanota.php'],
],
['Ri. Ba','riba.php'],
['Mastrini','mastrini.php'],
],
['Post-vendita', null,
['Licenze','licenze.php',
['Nuova licenza','nuova_licenza.php'],
],
['Provvigioni','provvigioni.php'],
['Statistiche','venduto.php'],
['Assistenza','assistenza.php',
['Nuovo Rapportino','nuovo_rapportino.php'],
],
],
['Uscita', 'index.php',
],
['', null,
]
];



</script>

<style>
body {
font: 11px Arial,Verdana,Helvetica,sans-serif;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
<style>
.gurtl0norm {
padding: 4px;
font: 12px Arial, Tahoma, Verdana, Geneva, Helvetica, sans-serif;
text-decoration: none;
border: 1px solid #5E8383;
border-left: 4px solid #5E8383;
background: #5E8383;
color: white;
cursor: hand;
}
.gurtl0over {
padding: 4px;
font: 12px Arial, Tahoma, Verdana, Geneva, Helvetica, sans-serif;
text-decoration: none;
border: 1px solid #A4A4A4;
border-left: 4px solid #E1B700;
background: #A4A4A4;
color: white;
cursor: hand;
}
.gurtl0clck {
padding: 4px;
font: 12px Arial, Tahoma, Verdana, Geneva, Helvetica, sans-serif;
text-decoration: none;
border: 1px solid #A4A4A4;
border-left: 4px solid #E1B700;
background: #949494;
color: white;
cursor: hand;
}
.gurtl1norm {
padding: 3px;
font: 12px Arial, Tahoma, Verdana, Geneva, Helvetica, sans-serif;
text-decoration: none;
border: 1px solid white;
border-left: 4px solid #EBEFEF;
background: #EBEFEF;
color: #243D4B;
cursor: hand;
}
.gurtl1over {
padding: 3px;
font: 12px Arial, Tahoma, Verdana, Geneva, Helvetica, sans-serif;
text-decoration: none;
border: 1px solid white;
border-left: 4px solid #E1B700;
background: #EBEFEF;
color: #243D4B;
cursor: hand;
}
.gurtl1clck {
padding: 3px;
font: 12px Arial, Tahoma, Verdana, Geneva, Helvetica, sans-serif;
text-decoration: none;
border: 1px solid white;
border-left: 4px solid #E1B700;
background: #DBDFDF;
color: #243D4B;
cursor: hand;
}
.gurtl2norm {
padding: 3px;
font: 12px Arial, Tahoma, Verdana, Geneva, Helvetica, sans-serif;
text-decoration: none;
border: 1px solid white;
border-left: 4px solid #d4efc0;
background: #d4efc0;
color: #243D4B;
cursor: hand;
}
.gurtl2over {
padding: 3px;
font: 12px Arial, Tahoma, Verdana, Geneva, Helvetica, sans-serif;
text-decoration: none;
border: 1px solid white;
border-left: 4px solid #e7b7fe;
background: #d4efc0;
color: #243D4B;
cursor: hand;
}
.gurtl2clck {
padding: 3px;
font: 12px Arial, Tahoma, Verdana, Geneva, Helvetica, sans-serif;
text-decoration: none;
border: 1px solid white;
border-left: 4px solid #e7b7fe;
background: #bfef59;
color: #243D4B;
cursor: hand;
}
</style>


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>

<script language="JavaScript">
<!--
new menu (menuHierarchy, [
{
'height': 25,
'width' : 125,
'firstX' : 0,
'firstY' : 130,
'nextX' : 1,
'hideAfter' : 200,
'css' : 'gurtl0',
'trace' : true
},
{
'height': 23,
'width' : 155,
'firstY' : 25,
'firstX' : 0,
'nextY' : -1,
'css' : 'gurtl1'
},
{
'height': 18,
'width' : 140,
'firstX' : 111,
'firstY' : 10
}
])

//-->
</script>
</head>
<table width="999" border="1" cellspacing="0">
<tr>
<td width="333"><div align="center"></div></td>
<td width="333"><div align="center"><img src="immagini/Logo-4Labels_epigrafe.gif" width="195" height="100"></div></td>
<td width="333"><div align="center" class="ecoform12ct"><a href="dump_database2.php" target="_blank">Fai il Backup dei dati</a> </div></td>
</tr>
</table>
<table width="1000" border="0" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td width="61" class="ecoform12ct"><img src="immagini/spacer.gif" height="50"></td>
<td width="76" class="ecoform12ct">&nbsp;</td>
<td width="52" class="ecoform12ct">&nbsp;</td>
<td width="76" class="ecoform12ct">&nbsp;</td>
<td width="75" class="ecoform12ct">&nbsp;</td>
<td width="71" class="ecoform12ct">&nbsp;</td>
<td width="78" class="ecoform12ct">&nbsp;</td>
<td width="62" class="ecoform12ct">&nbsp;</td>
<td width="61" class="ecoform12ct">&nbsp;</td>
<td width="75" class="ecoform12ct">&nbsp;</td>
<td width="68" class="ecoform12ct">&nbsp;</td>
<td width="67" class="ecoform12ct">&nbsp;</td>
<td width="58" class="ecoform12ct">&nbsp;</td>
<td width="62" class="ecoform12ct">&nbsp;</td>
</tr>
</table>

</html>
luigi.riva@dtpc.it
 
Posts: 1
Joined: 27. August 2010 22:42

Re: problem with php pages

Postby Altrea » 27. August 2010 23:25

Next time, please use the code or Quote BBTags to see, which source code and which is important information about your problem.

Okay, now to your problem:
Please search for short_open_tags in the board search.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 77 guests