Server error (5xx) being reported by Google Webmaster Tools - php

We are getting Server error (5xx) via our Google Search Console. Do you know why this is happening? And is there a solution to fix this?
When I checked error_log we found something like these:
[21-Aug-2019 06:11:11 UTC] PHP Fatal error: Call to undefined function twentysixteen_excerpt() in /home/teedupgolf/public_html/wp-content/themes/teedup/image.php on line 49
[21-Aug-2019 06:11:39 UTC] PHP Fatal error: Call to undefined function twentysixteen_excerpt() in /home/teedupgolf/public_html/wp-content/themes/teedup/image.php on line 49
[21-Aug-2019 06:12:03 UTC] PHP Fatal error: Call to undefined function twentysixteen_excerpt() in /home/teedupgolf/public_html/wp-content/themes/teedup/image.php on line 49
Most pages looks like automatically generated, here are the example pages:
https://teedupgolftours.com/2015/01/
https://teedupgolftours.com/category/uncategorized/
https://teedupgolftours.com/2015/07/
What we have done for now, we just disallow these links on robots.txt

I had the same mistake.
If the site uses multiple languages, please use hreflang like the following example:
<link rel = "alternate" href = "https://smsreceive.site/Home/en" hreflang = "x-default" />

Related

PHP Fatal error: Uncaught Error: Call to undefined function

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)):?>
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));?>

simple_html_dom: simple use-case - to get back data for storing in SQLite db

i fairly new to simple_html_dom usage and methods. I know a little the parser,
update: since file_get_html is not a native PHP function, the function resides within my included file that cannot be found so i need to to fix that first. The filed does not exist by checking the inc folder in the project root.
i am going to fix it.
i want to gather some information from this site:
https://europa.eu/youth/volunteering/organisations_en#open
is this possible to get the content - of let us say 10 or 20 last records on that page - and subesquently to store it in my mysql - db!?
<?php
// Report all PHP errors (see changelog)
include('inc/simple_html_dom.php');
//base url
$base = 'https://europa.eu/youth/volunteering/organisations_en#open';
//home page HTML
$html_base = file_get_html( $base );
//get all category links
foreach($html_base->find('a') as $element) {
echo "<pre>";
print_r( $element->href );
echo "</pre>";
}
$html_base->clear();
unset($html_base);
?>
have the above code and I'm trying to get certain elements of the page but it isn't returning anything.
Is it possible that certain PHP functions might be disabled on the server to stop that?
The above code works perfectly on other sites.
Is there any workaround?
see some errors i get here:
<br />
<b>Warning</b>: include(inc/simple_html_dom.php): failed to open stream: No such file or directory in <b>[...][...]</b> on line <b>5</b><br />
<br />
<b>Warning</b>: include(): Failed opening 'inc/simple_html_dom.php' for inclusion (include_path='.:') in <b>[...][...]</b> on line <b>5</b><br />
<br />
<b>Fatal error</b>: Uncaught Error: Call to undefined function file_get_html() in [...][...]:11
Stack trace:
#0 {main}
thrown in <b>[...][...]</b> on line <b>11</b><br />
and this one:
FATAL ERROR syntax error, unexpected '<', expecting end of file on line number 1
update: since file_get_html is not a native PHP function, the function resides within my included file that cannot be found so i need to to fix that first. The filed does not exist by checking the inc folder in the project root.
i am going to fix it.
finally i have it like this:
C:\Users\Kasper\Documents\_mk_\_dev_\php\ ->here my_project-file_
C:\Users\Kasper\Documents\_mk_\_dev_\php\includes (and here the "simplehtmldom-parser" from https://sourceforge.net/projects/simplehtmldom/ goes in
i am going to testrun now the whole thing on my machine - using ATOM
cf see the picture

Error activating Bon Toolkit for Wordpress and get the following error:

Fatal error: Call to undefined function bon_toolkit_set_options() in
C:\xampp\htdocs\wordpress\wp-content\plugins\bon-toolkit\bon-toolkit.php
on line 410
When I go to line 410 I see this:
return $options = bon_toolkit_set_options();
}
I am new to programming, very very much a FNG. Any help and guidance is appreciated.
Look at the following fix in bon-toolkit source code

Undefined index within a PHP path

Newbie here to OpenCart extension development. I am currently developing a 99Bill (Chinese payment method) payment extension.
Currently, I've added new files to the MVC directories (so, I added files under admin, catalog, etc, where I named my extension bill99, since PHP doesn't allow names that start with numbers).
I was trying to test my extension, but on my OpenCart home page, I get the following error:
Notice: Undefined index: mobile_description in /vagrant/opencart/upload/catalog/model/catalog/product.php on line 20Notice: Undefined index: mobile_description in /vagrant/opencart/upload/catalog/model/catalog/product.php on line 20Notice: Undefined index: mobile_description in /vagrant/opencart/upload/catalog/model/catalog/product.php on line 20Notice: Undefined index: mobile_description in /vagrant/opencart/upload/catalog/model/catalog/product.php on line 20Notice: Undefined index: mobile_description in /vagrant/opencart/upload/catalog/model/catalog/product.php on line 20Notice: Undefined index: mobile_description in /vagrant/opencart/upload/catalog/model/catalog/product.php on line 20
I am not quite sure how I triggered it, since I never edited or touched the product.php file before. The error appears even if I disable/uninstall my 99Bill extension.
When I navigate to product.php, line 20 simply says:
'description' => $query->row['mobile_description']
I have a feeling my error has nothing to do with the product.php file, since I never touched it before, and likely relates to my 99Bill extension. I may have not initialized a class somewhere.
For someone that's had this error before, could you help me understand this?
Well: line 20 accesses an array index, doesn't it? Suppose the index doesn't exist, wouldn't the error message you get make sense then? try dumping the contents of $query->row or replace what you have now with:
'description' => isset($query->row['mobile_description']) ? $query->row['mobile_description'] : null,
As far as why you get this notice: This answer explains that, and contains some snippets that could help you refactoring your code

WordPress WP-Admin Just Partly blank. Only Left Sidebar shown

I've been using wordpress for a few years without issues. No changes in themes or plugins, and lately I lost the ability to see my wp-admin page fully (Only left sidebar shows, right framelayout is completely blank in every sidebar link I click). The website is still fully functioning and works and I'm able to log-in to the admin page (wp-login.php).
The ONLY pages I can see that loads up is Jetpack, Slideshows, and Feedbacks, Settings -> Portfolio SlideShows Pro/Sharing links.
I've tried:
renaming plugins to deactivate
renaming template (retromania) and uploading twentyeleven
reloaded 'backwpup' auto backup files even all the way back to 2013-7-13-53-23.
Checking functions.php page for empty blanks top and bottom
rewrite wp-config Akismet Key
Attempted to turn on 'WP-Debug', but have no idea where the log goes...
Here is what my error_log says from my /wp/ folder:
[27-Jun-2014 04:06:17 America/Denver] PHP Fatal error: require(): Failed opening required '/home2/wesleych/public_html/wp/wp-includes/load.php' (include_path='.:/usr/php/54/usr/lib64:/usr/php/54/usr/share/pear') in /home2/wesleych/public_html/wp/wp-settings.php on line 21
-- repeated 2 more times--
[27-Jul-2014 16:01:32 UTC] PHP Warning: strip_tags() expects parameter 1 to be string, array given in /home2/wesleych/public_html/wp/wp-includes/formatting.php on line 2911
-- repeated 9 more times --
[27-Jul-2014 16:02:26 UTC] PHP Warning: trim() expects parameter 1 to be string, array given in /home2/wesleych/public_html/wp/wp-includes/pluggable.php on line 461
-- repeated 8 more times --
[20-Sep-2014 15:34:16 America/Denver] PHP Fatal error: Call to undefined function force_ssl_admin() in /home2/wesleych/public_html/wp/wp-login.php on line 15
[20-Sep-2014 21:47:57 UTC] PHP Notice: Undefined index: backwpup_int in /home2/wesleych/public_html/wp/wp-includes/cron.php on line 103
I've been scowering the web for some similar issues, seems like all places I looked only talks about completely blank wp-admin pages.
Any suggestions? =)

Categories