Wordpress site down after leadpage plugin installation - wordpress

I have a Wordpress site and when updating a leadpages plugin, I am seeing the following error...
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home2/dhankaran/public_html/wp-content/plugins/leadpages/App/Bootstrap/AdminBootstrap.php on line 196
I don't know where this file resides so I cannot update the code. please help!
Thanks
DK

Switch your display errors OFF from cpanel or wp-config.php, This may be the issue...
// Write this code in wp-config.php
// log php errors
#ini_set('log_errors','On'); // enable or disable php error logging (use 'On' or 'Off')
#ini_set('display_errors','Off'); // enable or disable public display of errors (use 'On' or 'Off')
Also check wp_debug in wp-config.php
define('WP_DEBUG', false); // disable debugging mode

Related

Undefined array key in wp-includes/class-wp-list-util.php

I'm getting an error when I click on the abandoned cart email link.
Warning: Undefined array key "line_total" in wp-includes/class-wp-list-util.php on line 169
There is 4 method to fix this error:
1: Go To Dashboard -> Update -> On You have the latest version of WordPress, click Re-Install Now.
2: try to use the default WordPress theme to see if your current theme causes this error.
3: Sounds like you are using an incompatible plugin, try disabling plugins one by one to find which plugin causes this error.
4: Finally you may disable wp_debug to ignore this error, go to wp-config.php
and find and set it to disable like the example below:
define( 'WP_DEBUG', false);

Wordpress "CURLOPT_SSL_VERIFYHOST" turned off

I'm working on my wordpress site hosted by a domain (not working in my local environment)
I got the error : "Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.'" in the function based on the cURL.php file.
I downloaded the Cacert.pem file but I don't know where should I put it or should I change something in my cURL.php
Looks like a setting in your hosting, you could try adding this to your themes functions.php
add_filter( 'https_local_ssl_verify', '__return_true' );
https://core.trac.wordpress.org/ticket/50748
It error is caused by a snuffleupagus rule(81) which doesn't allow you to disable the test.
Disabling the rule is a security concern and you show rather update the php code.
You can disable the rule on a cpanel server in /usr/share/cagefs/.cpanel.multiphp/opt/cpanel/ea-php74/root/etc/php.d/20-snuffleupagus.rules.d/default.rules
# Ensure that certificates are properly verified
sp.disable_function.function("curl_setopt").param("value").value("1").allow();
sp.disable_function.function("curl_setopt").param("value").value("2").allow();
# `81` is SSL_VERIFYHOST and `64` SSL_VERIFYPEER
#sp.disable_function.function("curl_setopt").param("option").value("64").drop().alias("Please don't turn CURLOPT_SSL_VERIFYCLIENT off.");
#sp.disable_function.function("curl_setopt").param("option").value("81").drop().alias("Please don't turn CURLOPT_SSL_VERIFYHOST off.");

Can't access WP-Admin page because of error

I am trying to edit a website I made in Wordpress, but when I go to the example.com/wp-admin/ to get to the Admin,
I get the errors, and so there is no way to go into Wordpress to edit the site.
I even changed the WP Theme back to the default TwentyTen through PHPMyAdmin, but that didn't help.
What can I do? Here is what I get when I try to go to wp-admin page:
Notice: register_uninstall_hook was called incorrectly. Only a static
class method or function can be used in an uninstall hook. Please see
Debugging in WordPress for more information. (This message was added
in version 3.1.) in
/home/content/80/13163980/html/ybk/wp-includes/functions.php on line
3547
Notice: Undefined index: page in
/home/content/80/13163980/html/ybk/wp-content/themes/rt_infuse_wp/functions.php
on line 45
Notice: Undefined index: page in
/home/content/80/13163980/html/ybk/wp-content/themes/rt_infuse_wp/functions.php
on line 55
Warning: Cannot modify header information - headers already sent by
(output started at
/home/content/80/13163980/html/ybk/wp-includes/functions.php:3547) in
/home/content/80/13163980/html/ybk/wp-includes/pluggable.php on line
1178
I just set WP_DEBUG mode to false and that skipped it all and got me to the WP-Admin login page.
Just find the pluggable.php and after <?php please add this ob_start(); and save. That should work.
Warning: Cannot modify header information - headers already sent by
Removing "blank lines" from function.php file and check it now issue is as it is than after check plugin folder >> disable plugin and check
Refresh your Browser, and the original error message Should go away.

Once I active Jetpack, I cannot open any dashboard pages any more

I have an issue when I try to install Jetpack on my wordpress site.
When the installation finished, I clicked "active" to active the Jetpack plugin, but I could not open any dashboard pages anymore.
I have already removed all other plugins and reinstalled Jetpack many times, but I still have the same issue.
What did I do is:
Add the following code in wp-config.php file to enable debugging.
// Enable WP_DEBUG mode
define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings
define('WP_DEBUG_DISPLAY', false);
#ini_set('display_errors',0);
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define('SCRIPT_DEBUG', true);
Open [your domain]/wp-content/debug.log to open the log
What did I find is:
PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 30720 bytes) in /hsphere/local/home/.../wp-admin/includes/media.php on line 2765
To slove this problem, i have added the following code in wp-config.php file
define('WP_MEMORY_LIMIT', '64M');
I don't really know the reason, but it works for me.

How to eliminate error warnings about ini_set?

my wordpress error log is filling up with this message:
PHP Warning: ini_set() has been disabled for security reasons in
/home/mywebsite/public_html/wp-includes/load.php on line 271
that line reads: ini_set( 'display_errors', 0 );
any suggestions on how to eliminate error warnings?
You are seeing that error because the XMLRPC_REQUEST constant is set to true, which causes WordPress to try and disable error reporting with the following:
if ( defined( 'XMLRPC_REQUEST' ) )
ini_set( 'display_errors', 0 );
Editing core Wordpress files is not recommended. They will be overwritten when you update or autoupdate. The correct way to correct for this is to edit the php.ini file on the server and remove ini_set from the disable_functions directive.
You could also set display_errors to Off, or alternatively change the error_reporting directive as well to prevent warnings from being shown.
error_reporting = E_ERROR
You could also try using the error_reporting() PHP function in wp-config.php to try and disable warnings as well.
// Turn off all error reporting
error_reporting(0);
// Only show errors
error_reporting(E_ERROR);
One other suggestion I have never tried to is to override the php.ini values via .htaccess which may or may not work on your host - see this guide.

Resources