• Scripts getting by in php7 but chokes in php8 (1/2)

    From The Doctor@21:1/5 to All on Sat Dec 3 02:44:08 2022
    Here are a couple of scripts that are working in php7 but choke in php8

    Script 1

    <?php session_start();?>
    <!DOCTYPE html >
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Professional Development Solutions - Online Form</title>
    <meta name="robots" content="index, follow" />
    <link rel="stylesheet" type="text/css" href="css/css.css"/>
    <link rel="stylesheet" type="text/css" href="css/css2.css"/>
    <script >

    <?php
    $connect = mysqli_connect("localhost", "User", "PW","DB") or die ("Cannot connect");
    //mysqli_select_db($connect,"DB") or die("Cannot select database");


    /////////////////////////Filtering Generes////////////////////////////////////////

    $jresult = mysqli_query ($connect,"SELECT sessions.sessionid FROM sessions WHERE sessions.sessionid > 1208 ORDER BY sessions.sessionid ") or die('cannot show tables');
    $getcount = mysqli_query ($connect,"SELECT COUNT(*) FROM sessions");


    function load()
    {
    window.status = " "
    }

    function count(
    <?php
    while (
    //$row = mysqli_fetch_row($jresult,MYSQL_ASSOC) ;

    $row = mysqli_fetch_assoc ($jresult)
    ){
    if ( 400 > $row['sessionid'] ){
    echo "quans".$row['sessionid'].",";
    } else {
    echo "quans".$row['sessionid'];
    }
    }

    )
    {

    //Getting Values
    <?php
    $connect = mysqli_connect("localhost", "DB", "PW","DB") or die ("Cannot connect");
    mysqli_select_db($connect,"DB") or die("Cannot select database");


    /////////////////////////Filtering Generes////////////////////////////////////////

    $jresult1 = mysqli_query ($connect,"SELECT sessions.sessionid FROM sessions WHERE sessions.sessionid >1208 ORDER BY sessions.sessionid ") or die('cannot show tables');



    <?php
    while($row = mysqli_fetch_assoc($jresult1)){
    echo "var quan".$row['sessionid']." = parseInt(document.getElementById('quans".$row['sessionid']. "').value);\n";
    }




    //Stored Values

    <?php
    $connect = mysqli_connect("localhost", "DB", "PW","DB") or die ("Cannot connect");
    mysqli_select_db($connect,"DB") or die("Cannot select database");


    /////////////////////////Filtering Generes////////////////////////////////////////

    $jresult = mysqli_query ($connect,"SELECT sessions.sessionid FROM sessions WHERE sessions.sessionid > 1208 ORDER BY sessions.sessionid ") or die('cannot show tables');



    if
    ( 0
    <?php
    while($row = mysqli_fetch_assoc($jresult)){
    echo "|| (quan".$row['sessionid']." > 0 ) \n";
    }

    )

    {

    <?php
    $connect = mysqli_connect("localhost", "DB", "PW","DB") or die ("Cannot connect");
    mysqli_select_db($connect,"DB") or die("Cannot select database");


    /////////////////////////Filtering Generes////////////////////////////////////////

    $jresult = mysqli_query ($connect,"SELECT sessions.sessionid FROM sessions WHERE sessions.sessionid > 1208 ORDER BY sessions.sessionid ") or die('cannot show tables');



    <?php
    while($row = mysqli_fetch_assoc($jresult)){

    if (($row['sessionid'] == "1206") or ($row['sessionid'] == "1208")){
    echo "var price".$row['sessionid']." = 273.00 * quan".$row['sessionid'].";\n";

    }else if (($row['sessionid'] == "1205") or ($row['sessionid'] == "1207")){
    echo "var price".$row['sessionid']." = 210.00 * quan".$row['sessionid'].";\n";

    }else{
    echo "var price".$row['sessionid']." = 63.00 * quan".$row['sessionid'].";\n"; }

    }


    }
    else
    {

    <?php
    $connect = mysqli_connect("localhost", "DB", "PW","DB") or die ("Cannot connect");
    mysqli_select_db($connect,"DB") or die("Cannot select database");


    /////////////////////////Filtering Generes////////////////////////////////////////

    $jresult = mysqli_query ($connect,"SELECT sessions.sessionid FROM sessions WHERE sessions.sessionid > 1208 ORDER BY sessions.sessionid ") or die('cannot show tables');



    <?php
    while($row = mysqli_fetch_assoc($jresult)){
    echo "var price".$row['sessionid']." = 0;\n";
    }


    }




    // kortti

    <?php
    $connect = mysqli_connect("localhost", "DB", "PW","DB") or die ("Cannot connect");
    mysqli_select_db($connect,"DB") or die("Cannot select database");


    /////////////////////////Filtering Generes////////////////////////////////////////

    $jresult = mysqli_query ($connect,"SELECT sessions.sessionid FROM sessions WHERE sessions.sessionid > 1208 ORDER BY sessions.sessionid ") or die('cannot show tables');



    <?php
    while($row = mysqli_fetch_assoc($jresult)){
    echo "if (calc.price".$row['sessionid'].".checked){\n
    var wprice".$row['sessionid']." = document.calc.price".$row['sessionid'].".value = price".$row['sessionid'].";\n
    } else { \n
    var wprice".$row['sessionid']." = document.calc.price".$row['sessionid'].".value = 0;\n}\n
    ";
    }





    //document.getElementById("total").innerHTML = (wprice315 + wprice316 ) + ".00";

    document.calc.charge_total.value = ( 0

    <?php
    $connect = mysqli_connect("localhost", "DB", "PW","DB") or die ("Cannot connect");
    mysqli_select_db($connect,"DB") or die("Cannot select database");


    /////////////////////////Filtering Generes////////////////////////////////////////

    $jresult = mysqli_query ($connect,"SELECT sessions.sessionid FROM sessions WHERE sessions.sessionid > 1208 ORDER BY sessions.sessionid ") or die('cannot show tables');



    <?php
    while($row = mysqli_fetch_assoc($jresult)){
    echo " + wprice".$row['sessionid']." ";
    }




    ) + ".00";

    return charge_total;

    }
    </script>
    <!-- valid -->
    <!-- LOAD THE NECESSARY JQUERY LIBRARY-->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script src="js/jquery-latest.js"></script>
    <script src="js/jquery.validate.js"></script>
    <!-- USE THE READY FUNCTION -->
    <script>
    $(document).ready(function(){
    $("#blogm").validate({


    rules:{
    bill_first_name:{
    required:true,


    },
    bill_last_name:{
    required:true,


    },

    bill_address_one:{
    required:false,


    },

    bill_company_name:{
    required:false,


    },

    bill_city:{
    required:false,


    },

    bill_state_or_province:{
    required:false,


    },

    bill_country:{
    required:false,


    },

    bill_postal_code:{
    required:false,


    },

    bill_phone:{
    required:true,


    },


    email:{
    required:true,


    },

    CaptchaInput:{
    required:true,


    },


    note:{
    required:false,


    }




    },//////rules ends///////



    messages:{
    bill_first_name:{
    required: "*",

    },
    bill_last_name:{
    required: "*",


    },
    bill_address_one:{
    required: "*",


    },
    bill_company_name:{
    required: "*",


    },

    bill_city:{
    required: "*",


    },

    bill_state_or_province:{
    required: "*",


    },

    bill_country:{
    required: "*",


    },

    bill_postal_code:{
    required: "*",


    },

    bill_phone:{
    required: "*",


    },


    email:{
    required: "*",


    },

    CaptchaInput:{
    required:true,


    },


    note:{
    required: "*",


    }
    /*message:{
    required: "*",

    }*/



    }//////message ends///////



    });



    });
    </script>


    <script src="js/jquery.uniform.js"></script>
    <script>
    $(function(){
    $("input, textarea, select, button, radio").uniform();
    $(":file").uniform({fileBtnText: 'Phil is Cool;'});
    });
    </script>
    <link rel="stylesheet" href="css/uniform.default.css" type="text/css" media="screen">
    <link rel="stylesheet" href="css/uniform.agent.css" type="text/css" media="screen">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    </head>

    <body>

    <!--wrapper begins-->
    <div id="wrapper">

    <!--header begins-->

    <?php

    include("includes/header.php");



    <!--header ends-->



    <!--nav begins-->
    <div id="nav">

    <!--holder begins-->
    <div id="holder"><ul>
    <li><a href="https://www.DB.ca">Home</a></li>
    <li><a href="https://www.DB.ca/courses.php#nav2" >Courses</a></li>
    <li><a href="" >Archive</a></li>
    <li><a href="https://admin.acrobat.com/common/help/en/support/meeting_test.htm" >Connection</a></li>
    <li><a href="" >Biographies</a></li>
    <li><a href="https://www.DB.ca/contactus.php" >Contact Us</a></li>
    <li><a href="https://www.DB.ca/form.php#content" >Register</a></li>
    </ul>
    </div><!--holder ends-->

    </div><!--nav ends-->


    <!--mainbanner begins-->
    <div id="mainbanner">



    <!--banner begins-->
    <div id="banner">
    <h2 class="order">
    OnLine Order Form
    </h2>
    <p></p>

    <div id="canada">
    <img src="images/canada.png" alt="Canada" width="336" height="298" /></div>


    </div> <!--banner ends-->


    </div><!--mainbanner ends-->


    <!--content begins-->
    <div id="content">
    <div id="left">


    <?php
    $connect = mysqli_connect("localhost", "DB", "PW","DB") or die ("Cannot connect");
    mysqli_select_db($connect,"DB") or die("Cannot select database");


    /////////////////////////Filtering Generes////////////////////////////////////////

    $result = mysqli_query ($connect,"SELECT sessions.sessionid, courses.abbr, courses.seminar, sessions.date, sessions.time FROM sessions,courses WHERE sessions.courseid=courses.id AND sessions.sessionid > 1208 ORDER BY sessions.sessionid ") or die('
    cannot show tables');



    <form action="https://www.nk.ca/DB/step2.php" id="blogm" method="post" name="calc" onSubmit="return ( checkform(this) && count());" onKeyUp="highlight(event)" onClick="highlight(event)">


    <h2 class="courses1">Orders</h2>
    <div class="divider3"></div>

    <li class="order0"><b>Online Orders</b> - Complete and submit this form</li> <li class="order0"><b>Phone Orders</b> - Call <b>1-877-977-6774</b></li>
    <li class="order0"><b>Fax Orders</b> - Print the Order Form and FAX to 1-780-351-2029<br></li>
    <li class="order0"><b>Mail Orders</b> - Print the Order Form and mail to: P D Solutions 15422-104A Street Grande Prairie, AB T8X 0L1</li>

    </ul>

    <h2 class="proceed">This page uses javascript. Please turn javascript on the browser. </h2>



    <h2 class="courses1">Note</h2>
    <div class="divider3"></div>

    <ol id="order">
    <li class="order">All prices in CANADIAN Funds.</li>
    <li class="order">Canadian Residents 5% GST applies and will be added to your order</li>
    <li class="order">At the moment, browsers like Chrome, Egde and similar browser are having an issue . Please use, Firefox, Waterfox, Safari, Opera or Seamonkey to register.</li>
    <li class="order">Each course cost $63.00 IF you are GST exempt<br /><a href="formnogst.php">Click
    here
    </a></li>



    <li class="order"></li>
    </ol><ul>
    <li class="order2"> -Select the course you wish to take </li>
    <li class="order2"> -place the number one (1) in the quantity box </li>
    <li class="order2">-then click the "Calculate" button at the bottom
    of the page to give you a total. </li>
    <li class="order2"> -if you have made an error click on the reset
    button at the bottom of the page</li>
    </ul>


    <h2 class="courses1">Courses</h2>
    <div class="divider3"></div>
    <table class="tablemain style3">

    <td class="td1"><span class="top">Course ID</span></td>
    <td class="td2"><span class="top">Select Course</span></td>
    <td class="td3"><span class="top">Description</span></td>
    <td class="td3"><span class="top">Select Quantity</span></td>
    <td class="td4"><span class="top">Course Date</span></td>
    </tr>

    <?php
    //session_start();
    //$_SESSION['sessiondata'] = $results;
    if(mysqli_num_rows($result)){
    $results = array();

    $i = 0;
    while($row = mysqli_fetch_assoc($result)){

    if(!empty($row)){

    $results[]= $row;
    }

    //echo "<pre>";print_r($row);

    $sessionid1=$row['sessionid'];
    $abbr1=$row['abbr'];
    $seminar1=$row['seminar'];
    $date1=$row['date'];
    $time1=$row['time'];


    <?php
    echo '<tr>';

    echo " <td class=\"style3 textcenter\" >
    <input name=\"id[]" . $row['sessionid'] . "\" id=\"id". $row['sessionid']. "\" value=\"" .$row['abbr']. "-" .$row['sessionid']. "\" size=\"10\"></td>
    <td class=\"textcenter\"><input name=\"price[]\" id=\"price". $row['sessionid']. "\" value=\"63.00\" size=\"7\" type=\"checkbox\" ></td>
    <td class=\"style3 textcenter\"><input class=\"style3\" name=\"description[]\" id=\"description". $row['sessionid']. "\" value=\"". $row['seminar']. "\" type=\"text\"></td>
    <td class=\"style3 textcenter\"><input class=\"style3\" name=\"quantity[]\" value=\"0\" size=\"4\" type=\"text\" id=\"quans". $row['sessionid']. "\"></td>
    <td class=\"textcenter\"><span class=\"style3\">". $row['date']. "&nbsp;". $row['time']. "</span> </td>";

    echo "</tr>";
    }








    $i++;
    }

    //echo "<pre>";
    //print_r($results);
    //echo "</pre>";


    $_SESSION['sessiondata'] = $results;

    //echo $i;
    //echo "". $results . "";
    ?>
    </table>



    <p class="please">Please
    note: Checkmark Select
    Course and also the Corresponding Select Quantity is entered as 1, or
    as many as required.




    <table class="list1">

    <td class="list1">
    <label class="calculate">Price</label></td><td>
    <input type="text" name="charge_total" id="box1"/>
    <!--<em>*</em>-->
    </td></tr>




    <td class="last1">
    <input onClick="count()" value="Calculate" id="submit1" type="button"> </td><td>
    <input value="Reset" id="reset1" type="reset">
    </td></tr></table>





    <h2>Student Personal Information</h2>
    <div class="divider4"></div>
    <ul class="list">

    <li class="list">
    <label>First Name:</label>
    <input type="text" name="bill_first_name" id="box" />
    <em>*(Required)</em>
    </li>


    <li class="list">
    <label>Last Name:</label>
    <input type="text" name="bill_last_name" id="box2" />
    <em>*(Required)</em>
    </li>


    <li class="list">
    <label>Address</label>
    <input type="text" name="bill_address_one" id="box3" />
    <!--<em>*</em>-->
    </li>


    <li class="list">
    <label>Company</label>
    <input type="text" name="bill_company_name" id="box4" />
    <!--<em>*</em>-->
    </li>

    <li class="list">
    <label>City</label>
    <input type="text" name="bill_city" id="box5" />
    <!--<em>*</em>-->
    </li>

    <li class="list">
    <label>Province:</label>
    <input type="text" name="bill_state_or_province" id="box6" />
    <!--<em>*</em>-->
    </li>

    <!--li class="list">
    <label>Country:</label>
    <input type="text" name="bill_country" id="box7" />
    <em>*</em>
    </li-->

    <li class="list">
    <label>Postal Code:</label>
    <input type="text" name="bill_postal_code" id="box8" />
    <!--<em>*</em>-->
    </li>

    <li class="list">
    <label>Phone:</label>
    <input type="text" name="bill_phone" id="box9" />
    <em>*(Required)</em>
    </li>

    <!--li class="list">
    <label>Fax:</label>
    <input type="text" name="bill_fax"id="box10" />
    <em>*</em>
    </li-->

    <li class="list">
    <label>Email:</label>
    <input type="text" name="email" id="box11" />
    <em>*(Required)</em>
    </li>

    <!--li class="list">
    <label>Date of Birth(MM/DD):</label>
    <input type="text" name="note" id="box12" maxlength="5" />
    <em>*</em>
    </li-->


    <li class="warning">**Please doublecheck your e-mail address as it is used to send you a receipt.**</li>


    </ul>





    <h2 class="proceed"> Proceed with your order</h2>



    <p class="check">Please check that all information has
    been included and is accurate. Select
    the 'Place Your Order' button. When you place your order you will receive a screen confirmation.
    Please fill in the credit card information and proceed with the transaction.


    <table class="last"><tr><td>

    <!-- START CAPTCHA -->

    <div class="capbox">

    <div id="CaptchaDiv"></div>

    <div class="capbox-inner">
    Type the above number:<br>

    <input type="hidden" id="txtCaptcha">
    <input type="text" name="CaptchaInput" id="CaptchaInput" size="15"><br>

    </div>
    </div>
    <br><br>
    <!-- END CAPTCHA -->

    <input type="submit" value="Place Your Order" name="submit" id="submit" >
    <input type="reset" value="Clear the Form" id="reset" />
    </td></tr></table>
    </form>


    </div><!--left ends-->

    <div id="right">

    <!--nav begins-->
    <div id="nav100">

    <!--holder begins-->
    <div id="holder100">
    <ul>
    <li><a href="http://www.DB.ca/index.php" >Home</a></li>
    <li><a href="http://www.DB.ca/courses.php#nav2">Courses</a></li>
    <li><a href="http://www.DB.ca/archive.php">Archive</a></li>

    <li><a href="https://admin.acrobat.com/common/help/en/support/meeting_test.htm">Connection</a></li>
    <li><a href="http://www.DB.ca/contactus.php">Contact Us</a></li>
    <li><a href="https://secure.nl2k.ab.ca/DB/">Register</a></li></ul>
    </div><!--holder ends-->


    </div><!--nav ends-->




    </div><!--right ends-->

    <div id="bottomcontent">
    </div><!--bottom content ends-->

    </div> <!--content ends-->





    <div class="clearfooter">
    </div>


    </div><!--wrapper ends-->

    <?php

    include("includes/footer.php");




    <script
    src="http://code.jquery.com/jquery-3.5.1.js"
    integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
    crossorigin="anonymous"
    </script>
    <script>
    $( document ).ready(function() {
    var limit = 1;
    $('checkbox').on('change', function(evt) {
    if($(this).siblings(':checked').length >= limit) {
    this.checked = false;
    }
    });
    });
    </script>
    </body>
    </html>


    ----


    Script 2


    -----



    <?=session_start();?>
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="index, follow" />
    <link rel="stylesheet" type="text/css" href="css/css.css"/>
    <link rel="stylesheet" type="text/css" href="css/css2.css"/>
    <link rel="stylesheet" href="css/uniform.default.css" type="text/css" media="screen">
    <link rel="stylesheet" href="css/uniform.agent.css" type="text/css" media="screen">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
    </head>
    <body>
    <?php
    if(!empty($_SESSION['sessiondata'])){
    }

    <div id="wrapper">
    <!--header begins-->
    <?php
    include("includes/header.php");

    <!--header ends-->
    <FORM ACTION="https://www3.moneris.com/HPPDP/index.php" method=post>
    <?php
    if (isset($_POST['submit'])){

    $sessValue = $_POST['sessionid'];
    $store_id = "F9X7J04390";
    $hpp_key = "hpM9O1EIXKPB";
    $charge_total = $_POST['charge_total'];

    $bill_first_name = $_POST['bill_first_name'];
    $bill_last_name = $_POST['bill_last_name'];
    $bill_company_name = $_POST['bill_company_name'];
    $bill_address_one = $_POST['bill_address_one'];
    $bill_city = $_POST['bill_city'];
    $bill_state_or_province = $_POST['bill_state_or_province'];
    $bill_postal_code = $_POST['bill_postal_code'];
    $bill_phone = $_POST['bill_phone'];
    $email = $_POST['email'];

    <center>
    <!-- Store Settings-->
    <INPUT TYPE="HIDDEN" NAME="ps_store_id" VALUE="<?=$store_id?>">
    <INPUT TYPE="HIDDEN" NAME="hpp_key" VALUE="<?=$hpp_key?>">
    <!------- DEFINE CHARGE TOTAL HERE --->
    <br/><br/><h3>Your Purchase Total Is: </h3> <br/> <h2>$<?=$charge_total?></h2> <INPUT TYPE="hidden" NAME="charge_total" VALUE="<?=$charge_total?>"><br><br> <!-- Unique Order ID -->
    <!--INPUT TYPE="hidden" NAME="order_id" VALUE="<?=$sessValue?>"-->
    <!-- Additional Optional Details -->
    <input type="hidden" name="cust_id" value="<?=$sessValue?>">
    <input type="hidden" name="email" value="<?=$email?>">
    <input type="hidden" name="note" value="">
    <!-- Item Information -->
    <?php
    $items_count = 1;
    $subtotals = 0;
    foreach ($_POST['quantity'] as $key => $value) {

    if( $value > 0){

    if(isset($_POST['with_gst'][$key])){
    $item_price = 63.00;
    }else{
    $item_price = 60.00; //no gst included
    }

    $subtotals = ($item_price * $value);

    ?>
    <input type="hidden" name="quantity<?=$items_count?>" value="<?=$value?>">
    <input type="hidden" name="description<?=$items_count?>" value="<?=$_POST['description'][$key]?>">
    <input type="hidden" name="id<?=$items_count?>" value="<?=$_POST['id'][$key]?>">
    <input type="hidden" name="price<?=$items_count?>" value="<?=$item_price?>">
    <input type="hidden" name="subtotal<?=$items_count?>" value="<?=$subtotals?>">
    <?php
    $items_count++;
    }

    }

    <!-- Billing Information -->
    <input type="hidden" name="bill_first_name" value="<?=$bill_first_name?>"> <input type="hidden" name="bill_last_name" value="<?=$bill_last_name?>">
    <input type="hidden" name="bill_company_name" value="<?=$bill_company_name?>"> <input type="hidden" name="bill_address_one" value="<?=$bill_address_one?>"> <input type="hidden" name="bill_city" value="<?=$bill_city?>">
    <input type="hidden" name="bill_state_or_province" value="<?=$bill_state_or_province?>">
    <input type="hidden" name="bill_postal_code" value="<?=$bill_postal_code?>"> <input type="hidden" name="bill_country" value="<?=$bill_country?>">
    <input type="hidden" name="bill_phone" value="<?=$bill_phone?>">
    <input type="hidden" name="bill_fax" value="<?=$bill_fax?>">
    <?php
    }

    <INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Click to proceed to Secure Page"> </center>
    </FORM>
    <?php
    include("includes/footer.php");

    </div>
    </body>
    </html>


    In the error log we are seeing

    2022/12/01 08:26:20 [error] 51954#102104: *266090 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: sessionid in /path/to/step2.php on line 30PHP message: PHP Warning: Use of undefined constant charge_total - assumed 'charge_total' (
    this will throw an Error in a future version of PHP) in /path/to/step2.php on line 33PHP message: PHP Warning: Use of undefined constant bill_first_name - assumed 'bill_first_name' (this will throw an Error in a future version of PHP) in /path/to/step2.
    php on line 35PHP message: PHP Warning: Use of undefined constant bill_last_name - assumed 'bill_last_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 36PHP message: PHP Warning: Use of undefined constant bill_
    company_name - assumed 'bill_company_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 37PHP message: PHP Warning: Use of undefined constant bill_address_one - assumed 'bill_address_one' (this will throw an Error
    in a future version of PHP) in /path/to/step2.php on line 38PHP message: PHP Warning: Use of undefined constant bill_city - assumed 'bill_city' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 39PHP message: PHP
    Warning: Use of undefined constant bill_state_or_province - assumed 'bill_state_or_province' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 40PHP message: PHP Warning: Use of undefined constant bill_postal_code -
    assumed 'bill_postal_code' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 41PHP message: PHP Warning: Use of undefined constant bill_phone - assumed 'bill_phone' (this will throw an Error in a future version of PHP)
    in /usr/local/www/n
    2022/12/01 08:26:20 [error] 51954#102104: *266090 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined variable: bill_country in /path/to/step2.php on line 94PHP message: PHP Notice: Undefined variable: bill_fax in /path/to/step2.php on line 96"
    while reading upstream, client: 50.159.40.19, server: www.nk.ca, request: "POST /pdsolutions/step2.php HTTP/3.0", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", referrer: "https://site/subdir/archive.php"
    2022/12/01 10:41:52 [error] 51954#102104: *292249 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: sessionid in /path/to/step2.php on line 30PHP message: PHP Warning: Use of undefined constant charge_total - assumed 'charge_total' (
    this will throw an Error in a future version of PHP) in /path/to/step2.php on line 33PHP message: PHP Warning: Use of undefined constant bill_first_name - assumed 'bill_first_name' (this will throw an Error in a future version of PHP) in /path/to/step2.
    php on line 35PHP message: PHP Warning: Use of undefined constant bill_last_name - assumed 'bill_last_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 36PHP message: PHP Warning: Use of undefined constant bill_
    company_name - assumed 'bill_company_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 37PHP message: PHP Warning: Use of undefined constant bill_address_one - assumed 'bill_address_one' (this will throw an Error
    in a future version of PHP) in /path/to/step2.php on line 38PHP message: PHP Warning: Use of undefined constant bill_city - assumed 'bill_city' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 39PHP message: PHP
    Warning: Use of undefined constant bill_state_or_province - assumed 'bill_state_or_province' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 40PHP message: PHP Warning: Use of undefined constant bill_postal_code -
    assumed 'bill_postal_code' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 41PHP message: PHP Warning: Use of undefined constant bill_phone - assumed 'bill_phone' (this will throw an Error in a future version of PHP)
    in /usr/local/www/n
    2022/12/01 14:54:17 [error] 51954#102104: *333944 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: sessionid in /path/to/step2.php on line 30PHP message: PHP Warning: Use of undefined constant charge_total - assumed 'charge_total' (
    this will throw an Error in a future version of PHP) in /path/to/step2.php on line 33PHP message: PHP Warning: Use of undefined constant bill_first_name - assumed 'bill_first_name' (this will throw an Error in a future version of PHP) in /path/to/step2.
    php on line 35PHP message: PHP Warning: Use of undefined constant bill_last_name - assumed 'bill_last_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 36PHP message: PHP Warning: Use of undefined constant bill_
    company_name - assumed 'bill_company_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 37PHP message: PHP Warning: Use of undefined constant bill_address_one - assumed 'bill_address_one' (this will throw an Error
    in a future version of PHP) in /path/to/step2.php on line 38PHP message: PHP Warning: Use of undefined constant bill_city - assumed 'bill_city' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 39PHP message: PHP
    Warning: Use of undefined constant bill_state_or_province - assumed 'bill_state_or_province' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 40PHP message: PHP Warning: Use of undefined constant bill_postal_code -
    assumed 'bill_postal_code' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 41PHP message: PHP Warning: Use of undefined constant bill_phone - assumed 'bill_phone' (this will throw an Error in a future version of PHP)
    in /usr/local/www/n
    2022/12/01 14:56:37 [error] 51954#102104: *334234 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: sessionid in /path/to/step2.php on line 30PHP message: PHP Warning: Use of undefined constant charge_total - assumed 'charge_total' (
    this will throw an Error in a future version of PHP) in /path/to/step2.php on line 33PHP message: PHP Warning: Use of undefined constant bill_first_name - assumed 'bill_first_name' (this will throw an Error in a future version of PHP) in /path/to/step2.
    php on line 35PHP message: PHP Warning: Use of undefined constant bill_last_name - assumed 'bill_last_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 36PHP message: PHP Warning: Use of undefined constant bill_
    company_name - assumed 'bill_company_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 37PHP message: PHP Warning: Use of undefined constant bill_address_one - assumed 'bill_address_one' (this will throw an Error
    in a future version of PHP) in /path/to/step2.php on line 38PHP message: PHP Warning: Use of undefined constant bill_city - assumed 'bill_city' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 39PHP message: PHP
    Warning: Use of undefined constant bill_state_or_province - assumed 'bill_state_or_province' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 40PHP message: PHP Warning: Use of undefined constant bill_postal_code -
    assumed 'bill_postal_code' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 41PHP message: PHP Warning: Use of undefined constant bill_phone - assumed 'bill_phone' (this will throw an Error in a future version of PHP)
    in /usr/local/www/n
    2022/12/01 14:57:56 [error] 51954#102104: *334509 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: sessionid in /path/to/step2.php on line 30PHP message: PHP Warning: Use of undefined constant charge_total - assumed 'charge_total' (
    this will throw an Error in a future version of PHP) in /path/to/step2.php on line 33PHP message: PHP Warning: Use of undefined constant bill_first_name - assumed 'bill_first_name' (this will throw an Error in a future version of PHP) in /path/to/step2.
    php on line 35PHP message: PHP Warning: Use of undefined constant bill_last_name - assumed 'bill_last_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 36PHP message: PHP Warning: Use of undefined constant bill_
    company_name - assumed 'bill_company_name' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 37PHP message: PHP Warning: Use of undefined constant bill_address_one - assumed 'bill_address_one' (this will throw an Error
    in a future version of PHP) in /path/to/step2.php on line 38PHP message: PHP Warning: Use of undefined constant bill_city - assumed 'bill_city' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 39PHP message: PHP
    Warning: Use of undefined constant bill_state_or_province - assumed 'bill_state_or_province' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 40PHP message: PHP Warning: Use of undefined constant bill_postal_code -
    assumed 'bill_postal_code' (this will throw an Error in a future version of PHP) in /path/to/step2.php on line 41PHP message: PHP Warning: Use of undefined constant bill_phone - assumed 'bill_phone' (this will throw an Error in a future version of PHP)
    in /usr/local/www/n
    2022/12/01 14:57:56 [error] 51954#102104: *334509 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined variable: bill_country in /path/to/step2.php on line 94PHP message: PHP Notice: Undefined variable: bill_fax in /path/to/step2.php on line 96"
    while reading upstream, client: 75.159.29.38, server: www.nk.ca, request: "POST /pdsolutions/step2.php HTTP/3.0", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", referrer: "https://site/subdir/"

    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J.O. Aho@21:1/5 to All on Sat Dec 3 10:36:29 2022
    T24gMDMvMTIvMjAyMiAwMy40NCwgVGhlIERvY3RvciB3cm90ZToNCj4gSGVyZSBhcmUgYSBj b3VwbGUgb2Ygc2NyaXB0cyB0aGF0IGFyZSB3b3JraW5nIGluIHBocDcgYnV0IGNob2tlIGlu IHBocDgNCg0KVG9vIG11Y2ggY29kZSBmb3IgdXNlcmdyb3VwIHBvc3RzLCBnaXZlIGEgbGlu ayB0byB5b3VyIGdpdCByZXBvc2l0b3J5IA0KaW5zdGVhZCwgaWYgeW91IGRvbid0IGhhdmUg b25lLCBnaXRsYWIgYW5kIGdpdGh1YiBvZmZlcnMgeW91IHNvbWUgc3BhY2UgDQpmb3IgZnJl ZS4NCg0KPiBJbiB0aGUgZXJyb3IgbG9nIHdlIGFyZSBzZWVpbmcNCj4gDQo+IDIwMjIvMTIv MDEgMDg6MjY6MjAgW2Vycm9yXSA1MTk1NCMxMDIxMDQ6ICoyNjYwOTAgRmFzdENHSSBzZW50 IGluIHN0ZGVycjogIlBIUCBtZXNzYWdlOiBQSFAgTm90aWNlOiAgVW5kZWZpbmVkIGluZGV4 OiBzZXNzaW9uaWQgaW4gL3BhdGgvdG8vc3RlcDIucGhwIG9uIGxpbmUgMzBQSFAgbWVzc2Fn ZTogUEhQIFdh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mUgdmVyc2lvbiBvZiBQSFApIGluIC91c3IvbG9jYWwvd3d3L24NCg0K U2VlbXMgdG8gYmUgdGhlIGNsYXNzaWMgaXNzdWUgb2Ygbm90IGRlY2xhcmluZyB2YXJpYWJs ZXMvY29uc3RhbnRzIGFoZWFkIA0Kb2YgdXNlLg0KUGxlYXNlIHRyeSB0byBmb2xsb3cgQy9D KysgY29kaW5nIHN0YW5kYXJkLg0KDQoNCj4gICAgICAgIDIwMjIvMTIvMDIgMTA6NDQ6Mjkg W2Vycm9yXSA1MTk1NCMxMDIxMDQ6ICo1NTcwMjYgRmFzdENHSSBzZW50IGluIHN0ZGVycjog IlBIUCBtZXNzYWdlOiBQSFAgV2FybmluZzogIFVuZGVmaW5lZCBhcnJheSBrZXkgInNlc3Np b25pZCIgaW4gL3BhdGgvdG8vc3RlcDIucGhwIG9uIGxpbmUgMzBQSFAgbWVzc2FnZTogUEhQ IEZhdGFsIGVycm9yOiAgVW5jYXVnaHQgRXJyb3I6IFVuZGVmaW5lZCBjb25zdGFudCAiY2hh cmdlX3RvdGFsIiBpbiAvcGF0aC90by9zdGVwMi5waHA6MzMNCg0KdHJ5L2NhdGNoIGlzIGEg Z29vZCB3YXkgb2YgaGFuZGxpbmcgaXNzdWVzIHRoYXQgYXJpc2VzIHdoZW4geW91IGNhbid0 IA0KY2hlY2sgaWYgdmFsdWUgZXhpc3RzIG9yIG5vdCBiZWZvcmUgdXNlLg0KDQoNCj4gCQkJ ICBXaGF0IHBvaW50ZXJzIGZvciBmaXhlcz8NCg0KQWx3YXlzIGJlIHN1cmUgdGhlIHZhbHVl IGV4aXN0cyBiZWZvcmUgeW91IHVzZSBpdC4NCg0KDQotLSANCg0KICAvL0Fobw0K

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arno Welzel@21:1/5 to All on Mon Dec 5 01:02:04 2022
    The Doctor, 2022-12-03 03:44:

    Here are a couple of scripts that are working in php7 but choke in php8
    [...]

    You are posting nearly 1000 lines of text. Do you really expect anyone
    to check this for you?

    Learn how to use a XDebug and a proper test environment.

    [...]
    What pointers for fixes?

    <https://www.php.net/releases/8.1/en.php>


    --
    Arno Welzel
    https://arnowelzel.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)