can't find all the includes after upgrading to PHP5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cassbiz
    New Member
    • Oct 2006
    • 202

    can't find all the includes after upgrading to PHP5

    the below script worked without any errors before I upgraded to php5

    Code:
    <?php include "cust_logged_in.php"; ?>
    
            <script type="text/javascript">
                    <!--
                    function cFormular()
                    {
                            if(document.daten.nname.value == "")
                            {
                                    alert("<? echo $t_forms['name_req'] ?>");
                                    document.daten.nname.focus();
                                    return false;
                            }
                            if(document.daten.strasse.value == "")
                            {
                                    alert("<? echo $t_forms['adress_req'] ?>");
                                    document.daten.strasse.focus();
                                    return false;
                            }
                            if(document.daten.tel.value == "")
                            {
                                    alert("<? echo $t_forms['tel_req'] ?>");
                                    document.daten.tel.focus();
                                    return false;
                            }
                            var Wert=document.daten.preis.value;
                            Wert = Wert.replace(/,/,".");
                            if(isNaN(Wert) == true)
                            {
                             alert(Wert + " <? echo $t_forms['no_number'] ?>");
                             document.daten.preis.focus();
                             return false;
                            }
                    }
    
    
                    //-->
            </script>
    <?php
            include $include_path."cust_cc_kopf.php";
            include $include_path."links.php";
    /*        include $include_path."clsencrypt.php"; */
    
    $andatum = $_GET['andatum'];
    $abdatum = $_GET['abdatum'];
    $zimmer = $_GET['zimmer'];
    $stadt = $_GET['stadt'];
    $plz = $_GET['plz'];
    $ort = $_GET['ort'];
    
    
    If ($knr!="")
     {
            $daten = suche('knr', $knr);
            $i=0;
            $daten[$i+1][0]= $row['knr'];
            $anrede= $daten[$i+1][1];
            $titel =$daten[$i+1][2];
            $nname=$daten[$i+1][3];
            $vname=$daten[$i+1][4];
            $strasse= $daten[$i+1][5];
            $plz=$daten[$i+1][6];
            $ort=$daten[$i+1][7];
            $stadt=$daten[$i+1][8];
            $land=$daten[$i+1][9];
            $tel=$daten[$i+1][10];
            $fax=$daten[$i+1][11];
            $mail=$daten[$i+1][12];
            $partner=$daten[$i+1][13];
            $sprache=$daten[$i+1][14];
            $stamm=$daten[$i+1][15];
            $bes=$daten[$i+1][16];
     } 
    ?>
    
    <table width="80%" border="0" align="center" >
    <!-- ###########     Guest Information     ###################-->
    <?php
    cust_startover();
    if ($knr!="")
    {
            echo '<form name="daten" action="cust_reserviert.php?alter_kunde=ja" method="post" onSubmit="return cFormular()">';
            $schreiben="readonly";
            include $include_path."cust_form_gdaten.php"; 
    
            echo '</table><table border="0" cellspacing="0" cellpadding="0" align="center" width="80%">';
            include $include_path."cust_form_zdaten.php";
    }else{
            if ($eingabe==1)
            {
                    echo '<form name="daten" action="cust_reserviert.php" method="post" onSubmit="return cFormular()">';
                    include $include_path."cust_form_gdaten.php";
                    echo '</table><table border="0" cellspacing="0" cellpadding="0" align="center" width="80%">';
                    include $include_path."cust_form_zdaten.php";
            }
    }
    if ($eingabe==1 OR $knr!="")
    {
            echo '
            <tr id="tr1">
                    <td colspan="2" align="center">By completing this form, you are aware that we will contact you
    either via telephone or email to confirm your reservation and take a deposit to hold your desired '.$t_book['room'].'.
                    </td>
            </tr>
            <tr>
                    <td colspan="2" align ="center">
                            <input type="submit" value="'.$t_forms['book'].'">
                    </td>
            </tr>
                    <input type="hidden" value="'.$knr.'" name="knr">
                    </form>';
    
    
    }
    if ($eingabe!=1)
    {
    echo'</table><div align="center">
    <form action="details.php" method="post">
                            <input type="input" size="10" maxlenth="10" name="resnr">
                            <input type="submit" value="'.$t_forms['cust_searchres'].'">
                    </form></div>
                    </body>
    </html>'
    ;}
    ?>
    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
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Has you $include_path variable been set up correctly?

    Ronald :cool:

    Comment

    • cassbiz
      New Member
      • Oct 2006
      • 202

      #3
      yes.

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

      cust_form_gdate n.php and cust_form_zdate n.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?

      Code:
       ['$i+1']['1']
      Code:
      If ($knr!="")
       {
              $daten = suche('knr', $knr);
              $i=0;
              $daten[$i+1][0]= $row['knr'];
              $anrede= $daten[$i+1][1];
              $titel =$daten[$i+1][2];
              $nname=$daten[$i+1][3];
              $vname=$daten[$i+1][4];
              $strasse= $daten[$i+1][5];
              $plz=$daten[$i+1][6];
              $ort=$daten[$i+1][7];
              $stadt=$daten[$i+1][8];
              $land=$daten[$i+1][9];
              $tel=$daten[$i+1][10];
              $fax=$daten[$i+1][11];
              $mail=$daten[$i+1][12];
              $partner=$daten[$i+1][13];
              $sprache=$daten[$i+1][14];
              $stamm=$daten[$i+1][15];
              $bes=$daten[$i+1][16];
       }


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

      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.

      Comment

      • cassbiz
        New Member
        • Oct 2006
        • 202

        #4
        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.

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          The arithmatic will not be executed:
          Code:
          $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:

          Comment

          • cassbiz
            New Member
            • Oct 2006
            • 202

            #6
            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.

            Code:
            http://.../cust_cdata.php?andatum=1172250000&abdatum=1172293200&plz=97526&ort=Grants%20Pass&stadt=OR&zimmer=3&eingabe=1

            Comment

            • Motoma
              Recognized Expert Specialist
              • Jan 2007
              • 3236

              #7
              Originally posted by cassbiz
              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.

              Code:
              http://.../cust_cdata.php?andatum=1172250000&abdatum=1172293200&plz=97526&ort=Grants%20Pass&stadt=OR&zimmer=3&eingabe=1
              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?

              Comment

              • cassbiz
                New Member
                • Oct 2006
                • 202

                #8
                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.

                Comment

                Working...