Jump to content

Paul-D

Members
  • Posts

    117
  • Joined

  • Last visited

Paul-D's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. Thanks for that I didn't correct a <?php. PHP 8 is very strickt and takes no prisoners. I w will have to go through the rest of my code with a fine tooth comb. Thanks for your help.
  2. That didn/t work it gave me another error Parse error: syntax error, unexpected token "?" in /vhost/d/e/s/desmond-otoole.co.uk/www/bank2/StatementEntry.php on line 113 Probably because the ending bracket was moved away from the ? SELECTED <?php }? >
  3. Well I have done exactly as you sugest but this is still not happy. The problem is around a <select> </select> on lines 111 to 123 Error: Parse error: Unclosed '{' on line 122 in /vhost/d/e/s/desmond-otoole.co.uk/www/bank2/StatementEntry.php on line 191. I can not see any issues as there is definatly spaces here. There is .htaccess with the lines php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on phpTest.txt
  4. Well thanks to Barrand. Leaving spaces after <?php and before ?> has made a diffrence. I have never done that before. Is this NEW to PHP8 or has it always supposed to be that way? Love to know!
  5. One question is, if i put an exit; on line 4 why do I not get an ! am here message only?
  6. Error on page is Parse error: Unclosed '{' on line 183 in /vhost/d/e/s/desmond-otoole.co.uk/www/bank2/DataInput.php on line 23
  7. As an addition, they changed my .htaccess to php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on
  8. I have had majour problems with my easyspace website. I beleive the servers were not updating over the weekend. I am now told that the reason for the error is on a line that should not be reached. I put a hello world and an exit at the verry top of the code. Can soneone tell me what is wrong with line 183 please [<?php if($MM > '10') {?>] After I spoke to them this morning the page says Parse error: Unclosed '{' on line 183 in /vhost/d/e/s/desmond-otoole.co.uk/www/bank2/DataInput.php on line 236 But there is no line 236. Test.txt
  9. Well thanks for all that. I thought ther was a problem with that function but it worked fine under PHP 5.4 for some strange reason. THings are looking up now. Thanks also to kicken. I have only used <?php at the beginning of a file but stand correctedd now.
  10. Thanks for all your help. I have managed to isolate the function with the problem. The problem is I can't figure a way out of it. I have a database table of futuristic entries into an look ahead statment. What I want to do is display an online bank statment where the start date is given to a function and I want the querie to create a data set from tthat date to six weeks in advance. Can someone help me out with this query. What is strange here is this all worked fine for tebn years untill my provider updated the server from PHP 5.4 to PHP8. So the SQL will probably need to change. function GetAllData($StartDate) { $pdo = connectDB(); $sqlAllData = "SELECT * FROM Bank_Data WHERE EntryDate > :StartDate AND EntryDate <= DATE_ADD(:StartDate, INTERVAL 6 WEEK) ORDER BY EntryDate ASC, Output"; $stmt = $pdo->prepare($sqlAllData); $stmt->execute(['StartDate' => $StartDate]); return $stmt; } Error Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number in /vhost/d/e/s/desmond-otoole.co.uk/www/bank2/secure/SecureFunctionsBankPDO.php:39 Stack trace: #0 /vhost/d/e/s/desmond-otoole.co.uk/www/bank2/secure/SecureFunctionsBankPDO.php(39): PDOStatement->execute() #1 /vhost/d/e/s/desmond-otoole.co.uk/www/bank2/Statement.php(104): GetAllData() #2 {main} thrown in /vhost/d/e/s/desmond-otoole.co.uk/www/bank2/secure/SecureFunctionsBankPDO.php on line 39
  11. Well that is new to me. I have only used <?php at the start of a page and under php 5.4 it worked fine for over 10 years. Maybe this is more strickt in PHP 8. It did work fine for over 10 years. FACT. I will go through all my files tomorrow and let you know the outcome.
  12. My screenshot only shows a web page with problems. it dosn't show code. all the pages start withy <?php. I HAVE CHECKED. I know I am getting old and I haven’t touched this stuff for ten years or more but this section of my website, a virtual bank statement from today and into the 6 week future, to give me an idea of my spending limits, is very important to me. Statement.php.txt
  13. I know I am getting old and I haven’t touched this stuff for ten years or more but this section of my website, a virtual bank statement from today and into the 6 week future, to give me an idea of my spending limits, is very important to me.
  14. As you can see from the screen print of my web page. The trapping errors is not working. I need to find out why the error is. I have shown my ConnectDB() code and the function FetAllData(). I have directly tried the SQL on the database and it is fine. It is the same SQL I used before in mMySQL which worked for years. The SQL is fine. My question is, is there a problem with the PDO database conection code? Can someone check the PDO code please. Checked out Ubinto download and got... What you will need: A Windows 10 or Windows 11 physical or virtual machine with all the updates installed. Out of my league vertual Windows.
  15. AND FINALY. To make things worse. I have to work this on a webhousting company because I am using a Windows computer and can not set the whole thing up with loacal host, PDO driven database and PHP 8. Life would be great if I could.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.