0

I have recently migrated from the old PHP5xx to PHP7.4.23 version and below is the error message when localhost URL is tested. I can confirm the index.php has reference to include rightbar.php from the same folder destination. If I remove the reference to rightbar.php then the website loads perfectly. I am not a coder but would need some great help on this. Website error:`PHP Fatal error:

Uncaught Error: Call to undefined function getResultBYkeyword() in C:\inetpub\wwwroot\tamilmelisai\rightbar.php:169 Stack trace: #0 C:\inetpub\wwwroot\tamilmelisai\index.php(28): include() #1 {main} thrown in C:\inetpub\wwwroot\tamilmelisai\rightbar.php on line 169`

Line 169 of rightbar.php has the following code:

<?php $videoDetailstops = getResultBYkeyword("latest tamil trailers",3); if(count($videoDetailstops)):?>
                  
2
  • 1
    Not sure if it's the problem, but check the casing of: getResultBYkeyword. The Y is uppercase. Should it be getResultByKeyword? Commented Sep 7, 2021 at 15:46
  • Thanks Ivan, still the same error. It must be something to do with the upgrade of PHP and it doesn't understand the command. Commented Sep 8, 2021 at 4:22

1 Answer 1

-1

After lots and trial and error, fianlly below is the solution that I worked it out even though I am not a coder by any chance. Appreciate all those who looked at the query and responded. Form this:

<?php $videoDetailstops = getResultBYkeyword("latest tamil trailers",3); if(count($videoDetailstops)):?>

To this:

<?php if (isset ($videoDetailstops) && $videoDetailstops = getResultBYkeyword("latest tamil trailers",3));?>
Sign up to request clarification or add additional context in comments.

1 Comment

call to undefined function means the line calling said function doesn't understand what the function is. That usually caused by function declaration (the function getResultBYkeyword() {} part is not included in current file. You solution doesn't make sense in that regard. Must be caused by some other modification you did while debugging.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.