By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,215 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,215 IT Pros & Developers. It's quick & easy.

can't find all the includes after upgrading to PHP5

cassbiz
100+
P: 202
the below script worked without any errors before I upgraded to php5

Expand|Select|Wrap|Line Numbers
  1. <?php include "cust_logged_in.php"; ?>
  2.  
  3.         <script type="text/javascript">
  4.                 <!--
  5.                 function cFormular()
  6.                 {
  7.                         if(document.daten.nname.value == "")
  8.                         {
  9.                                 alert("<? echo $t_forms['name_req'] ?>");
  10.                                 document.daten.nname.focus();
  11.                                 return false;
  12.                         }
  13.                         if(document.daten.strasse.value == "")
  14.                         {
  15.                                 alert("<? echo $t_forms['adress_req'] ?>");
  16.                                 document.daten.strasse.focus();
  17.                                 return false;
  18.                         }
  19.                         if(document.daten.tel.value == "")
  20.                         {
  21.                                 alert("<? echo $t_forms['tel_req'] ?>");
  22.                                 document.daten.tel.focus();
  23.                                 return false;
  24.                         }
  25.                         var Wert=document.daten.preis.value;
  26.                         Wert = Wert.replace(/,/,".");
  27.                         if(isNaN(Wert) == true)
  28.                         {
  29.                          alert(Wert + " <? echo $t_forms['no_number'] ?>");
  30.                          document.daten.preis.focus();
  31.                          return false;
  32.                         }
  33.                 }
  34.  
  35.  
  36.                 //-->
  37.         </script>
  38. <?php
  39.         include $include_path."cust_cc_kopf.php";
  40.         include $include_path."links.php";
  41. /*        include $include_path."clsencrypt.php"; */
  42.  
  43. $andatum = $_GET['andatum'];
  44. $abdatum = $_GET['abdatum'];
  45. $zimmer = $_GET['zimmer'];
  46. $stadt = $_GET['stadt'];
  47. $plz = $_GET['plz'];
  48. $ort = $_GET['ort'];
  49.  
  50.  
  51. If ($knr!="")
  52.  {
  53.         $daten = suche('knr', $knr);
  54.         $i=0;
  55.         $daten[$i+1][0]= $row['knr'];
  56.         $anrede= $daten[$i+1][1];
  57.         $titel =$daten[$i+1][2];
  58.         $nname=$daten[$i+1][3];
  59.         $vname=$daten[$i+1][4];
  60.         $strasse= $daten[$i+1][5];
  61.         $plz=$daten[$i+1][6];
  62.         $ort=$daten[$i+1][7];
  63.         $stadt=$daten[$i+1][8];
  64.         $land=$daten[$i+1][9];
  65.         $tel=$daten[$i+1][10];
  66.         $fax=$daten[$i+1][11];
  67.         $mail=$daten[$i+1][12];
  68.         $partner=$daten[$i+1][13];
  69.         $sprache=$daten[$i+1][14];
  70.         $stamm=$daten[$i+1][15];
  71.         $bes=$daten[$i+1][16];
  72.  } 
  73. ?>
  74.  
  75. <table width="80%" border="0" align="center" >
  76. <!-- ###########     Guest Information     ###################-->
  77. <?php
  78. cust_startover();
  79. if ($knr!="")
  80. {
  81.         echo '<form name="daten" action="cust_reserviert.php?alter_kunde=ja" method="post" onSubmit="return cFormular()">';
  82.         $schreiben="readonly";
  83.         include $include_path."cust_form_gdaten.php"; 
  84.  
  85.         echo '</table><table border="0" cellspacing="0" cellpadding="0" align="center" width="80%">';
  86.         include $include_path."cust_form_zdaten.php";
  87. }else{
  88.         if ($eingabe==1)
  89.         {
  90.                 echo '<form name="daten" action="cust_reserviert.php" method="post" onSubmit="return cFormular()">';
  91.                 include $include_path."cust_form_gdaten.php";
  92.                 echo '</table><table border="0" cellspacing="0" cellpadding="0" align="center" width="80%">';
  93.                 include $include_path."cust_form_zdaten.php";
  94.         }
  95. }
  96. if ($eingabe==1 OR $knr!="")
  97. {
  98.         echo '
  99.         <tr id="tr1">
  100.                 <td colspan="2" align="center">By completing this form, you are aware that we will contact you
  101. either via telephone or email to confirm your reservation and take a deposit to hold your desired '.$t_book['room'].'.
  102.                 </td>
  103.         </tr>
  104.         <tr>
  105.                 <td colspan="2" align ="center">
  106.                         <input type="submit" value="'.$t_forms['book'].'">
  107.                 </td>
  108.         </tr>
  109.                 <input type="hidden" value="'.$knr.'" name="knr">
  110.                 </form>';
  111.  
  112.  
  113. }
  114. if ($eingabe!=1)
  115. {
  116. echo'</table><div align="center">
  117. <form action="details.php" method="post">
  118.                         <input type="input" size="10" maxlenth="10" name="resnr">
  119.                         <input type="submit" value="'.$t_forms['cust_searchres'].'">
  120.                 </form></div>
  121.                 </body>
  122. </html>'
  123. ;}
  124. ?>
  125.  
I still am not getting any errors in the error log but the output is not displaying. It finds the beginning includes ie the login and header but the rest it does not find.

Thanks in advance
Feb 21 '07 #1
Share this Question
Share on Google+
7 Replies


ronverdonk
Expert 2.5K+
P: 4,258
Has you $include_path variable been set up correctly?

Ronald :cool:
Feb 22 '07 #2

cassbiz
100+
P: 202
yes.

The header is in the same include dir as the rest of the forms that are suppose to display

cust_form_gdaten.php and cust_form_zdaten.php are not showing.

Also in the one section below is it written correctly? Is it necessary to put a single ' quote in the brackets?

Expand|Select|Wrap|Line Numbers
  1.  ['$i+1']['1']
  2.  
Expand|Select|Wrap|Line Numbers
  1.  
  2. If ($knr!="")
  3.  {
  4.         $daten = suche('knr', $knr);
  5.         $i=0;
  6.         $daten[$i+1][0]= $row['knr'];
  7.         $anrede= $daten[$i+1][1];
  8.         $titel =$daten[$i+1][2];
  9.         $nname=$daten[$i+1][3];
  10.         $vname=$daten[$i+1][4];
  11.         $strasse= $daten[$i+1][5];
  12.         $plz=$daten[$i+1][6];
  13.         $ort=$daten[$i+1][7];
  14.         $stadt=$daten[$i+1][8];
  15.         $land=$daten[$i+1][9];
  16.         $tel=$daten[$i+1][10];
  17.         $fax=$daten[$i+1][11];
  18.         $mail=$daten[$i+1][12];
  19.         $partner=$daten[$i+1][13];
  20.         $sprache=$daten[$i+1][14];
  21.         $stamm=$daten[$i+1][15];
  22.         $bes=$daten[$i+1][16];
  23.  }
  24.  


I am thinking that it may have to do with the register_globals.

I have double and triple checked that all $_GET and $_POST are just that so that the variables would cross from one page to another.

Thanks for your help.
Feb 22 '07 #3

cassbiz
100+
P: 202
Oh, one more thing. The script is not outputting any errors in /var/log/php/error_log so the logs have not been much help.
Feb 22 '07 #4

ronverdonk
Expert 2.5K+
P: 4,258
The arithmatic will not be executed:
Expand|Select|Wrap|Line Numbers
  1. $daten[$i+1]
You'd better increase $i before using it this way, so better is to address $daten as
[php]$i++;
$daten[$i][0]= $row['knr'];
.. etc...
[/php]

Ronald :cool:
Feb 22 '07 #5

cassbiz
100+
P: 202
I changed the $i value and don't know if it is working or not.

The variables that I am trying to pass to the form are not working.

the input string that is going to the above form looks like this.

Expand|Select|Wrap|Line Numbers
  1. http://.../cust_cdata.php?andatum=1172250000&abdatum=1172293200&plz=97526&ort=Grants%20Pass&stadt=OR&zimmer=3&eingabe=1
  2.  
Feb 22 '07 #6

Motoma
Expert 2.5K+
P: 3,235
I changed the $i value and don't know if it is working or not.

The variables that I am trying to pass to the form are not working.

the input string that is going to the above form looks like this.

Expand|Select|Wrap|Line Numbers
  1. http://.../cust_cdata.php?andatum=1172250000&abdatum=1172293200&plz=97526&ort=Grants%20Pass&stadt=OR&zimmer=3&eingabe=1
  2.  
What warning level are you running at? Are you getting any error messages?
When you say your variables aren't working, do you mean the ones from $_GET?
Feb 23 '07 #7

cassbiz
100+
P: 202
bringing up an old subject again.

I am not receiving any output or any errors on the above. It is like it just vanished.

Is there a way to force an output from shell?

All the paths have been checked and when it runs in php4 it works flawless. In php5 I am befuddled.
Mar 6 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.