• thepubcl

    (@thepubcl)


    First, absolute amateur might be giving me to much credit. So, Beware. Info: Web sever: siteground. Theme: SG Double child theme of SG Window. Using SG Optimizer for process. When checking compatibility with SG Opti I get the following:

    FILE: /home/thepubcl/public_html/wp-content/themes/sg-window/inc/social-media-widget.php
    ——————————————————————————————–
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ——————————————————————————————–
    7 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.

    It seems like this is a theme developer issue but I have circled SG Window support forums for 2 days and can find no answer. Running PHP 5.6 now, but can’t update until issues resolved. If I can fix great, If I need to delete a problem plugin Ok. Site has worked fine for the last four years while getting my degree and now that I am hardly utilizing it until I get a job, and traffic is at an all time low, it starts loading slow and giving problems. Not a large site. I do like the theme for my purposes and would like to keep using it if possible. Anyway if anyone can help it would be appreciated.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • helldog2018

    (@helldog2018)

    Hi @thepubcl,

    The widgets function need a __construct instead of the functions name.
    Below an example of how it probably looks like

    function social_media_widget() {
        parent::__construct(false, $name = 'Social Media Widget' );
    }

    Change to something like this

    function __construct() {
        parent::__construct(false, $name = 'Social Media Widget' );
    }

    Let us know if this has solved your issue.

    Thread Starter thepubcl

    (@thepubcl)

    Thanks, helldog2018
    this is what I found:
    function sgwindow_SocialIcons() {

    /* Widget settings. */
    $widget_ops = array(
    ‘classname’ => ‘sgwindow_socialicons’,
    ‘description’ => __(‘Display Social Media Links.’, ‘sg-window’ ));

    /* Widget control settings. */
    $control_ops = array(
    ‘width’ => 250,
    ‘height’ => 250,
    ‘id_base’ => ‘sgwindow_socialicons_widget’);

    /* Create the widget. */
    parent::__construct( ‘sgwindow_socialicons_widget’, __(‘SG Social Media Icons’, ‘sg-window’ ), $widget_ops, $control_ops );

    Maybe it’s obvious, but again… amateur, so?

    helldog2018

    (@helldog2018)

    Hi there,

    try editing the code to:

    function __construct() {
    
    /* Widget settings. */
    $widget_ops = array(
    ‘classname’ => ‘sgwindow_socialicons’,
    ‘description’ => __(‘Display Social Media Links.’, ‘sg-window’ ));
    
    /* Widget control settings. */
    $control_ops = array(
    ‘width’ => 250,
    ‘height’ => 250,
    ‘id_base’ => ‘sgwindow_socialicons_widget’);
    
    /* Create the widget. */
    parent::__construct( ‘sgwindow_socialicons_widget’, __(‘SG Social Media Icons’, ‘sg-window’ ), $widget_ops, $control_ops );
    Thread Starter thepubcl

    (@thepubcl)

    Thanks, helldog 2018,
    That did it! Now I just have to get Mailpoet to support v2 and fix their comparability issues. Then I’m good to go!

    helldog2018

    (@helldog2018)

    Your welcome, happy that it solved your issue regarding the widget.
    I have no idea what the compatibility issues are with Mailpoet, but if you have an error report, I am happy to take a look.

    Thread Starter thepubcl

    (@thepubcl)

    Wow, thanks, this is what I have:

    754 | WARNING | Function dl() is deprecated since PHP 5.3
    754 | WARNING | Function dl() is deprecated since PHP 5.3
    852 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ————————————————————————————————–

    ——————————————————————————————————————————————————————–

    FILE: /home/thepubcl/public_html/wp-content/plugins/wysija-newsletters/helpers/bounce.php
    —————————————————————————————–
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    —————————————————————————————–
    63 | WARNING | Function dl() is deprecated since PHP 5.3

    helldog2018

    (@helldog2018)

    Hi,

    This is probably the same issue as the other widget, can you show me what is inside public_html/wp-content/plugins/wysija-newsletters/helpers/bounce.php?

    Thread Starter thepubcl

    (@thepubcl)

    Sorry, the first section was under:
    FILE: /home/thepubcl/public_html/wp-content/plugins/wysija-newsletters/inc/pear/pear.php

    Looking for other

    helldog2018

    (@helldog2018)

    You can show them both svp.
    Both files have same issue: Function dl()

    Thread Starter thepubcl

    (@thepubcl)

    This is 55-66 in bounce file

    if (function_exists(‘dl’)) {
    //We will try to load it on the fly
    $fatalMessage = ‘The system tried to load dynamically the ‘ . $EXTENSION . ‘ extension’;
    $fatalMessage .= ‘<br/>If you see this message, that means the system could not load this PHP extension’;
    $fatalMessage .= ‘<br/>Please enable the PHP Extension ‘ . $EXTENSION;
    ob_start();
    echo $fatalMessage;
    //This method could cause a fatal error, but we will still display some messages in that case.
    dl($EXTENSION);
    $warnings = str_replace($fatalMessage, ”, ob_get_clean());
    if (extension_loaded(‘imap’) OR function_exists(‘imap_open’))
    return true;

    Thread Starter thepubcl

    (@thepubcl)

    Ignore that

    Thread Starter thepubcl

    (@thepubcl)

    Sorry thought I was in the other file. That is correct for Bounce file

    Thread Starter thepubcl

    (@thepubcl)

    736-756
    function loadExtension($ext)
    {
    if (!extension_loaded($ext)) {
    // if either returns true dl() will produce a FATAL error, stop that
    if ((ini_get(‘enable_dl’) != 1) || (ini_get(‘safe_mode’) == 1)) {
    return false;
    }
    if (OS_WINDOWS) {
    $suffix = ‘.dll’;
    } elseif (PHP_OS == ‘HP-UX’) {
    $suffix = ‘.sl’;
    } elseif (PHP_OS == ‘AIX’) {
    $suffix = ‘.a’;
    } elseif (PHP_OS == ‘OSX’) {
    $suffix = ‘.bundle’;
    } else {
    $suffix = ‘.so’;
    }
    return @dl(‘php_’.$ext.$suffix) || @dl($ext.$suffix);
    }
    return true;

    and 852-853
    function PEAR_Error($message = ‘unknown error’, $code = null,
    $mode = null, $options = null, $userinfo = null)

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    These are warnings, not errors, so you don’t really need to do anything. The code will work as it stands.

    Meantime, post a question in those plugins’ support forums.

    Thread Starter thepubcl

    (@thepubcl)

    Thanks Steve,

    I did post to Mailpoet, so far their answer was similar to yours, that it shouldn’t be a problem. Unfortunately it is. SG Optimizer runs the compatibility test and doesn’t let you go to the update step until conflicts are resolved.

    Then Helldog2018 was very nice to help fix the issue I posted here and then was even nicer to offer to take a look at the Mailpoet issue I was having. So I took them up on the offer.

    So, I’m guessing you were not having a problem with that, you were just suggesting Mailpoet might be of more help? Anyway, if I can’t get these resolved, all I can think to do is delete Mailpoet plugin (which opens a different list of issues) to allow me to move on with PHP 7 update . This is why (as an amateur) I was happy to have Helldog2018’s offer.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Trying to update to PHP 7, compatability issues’ is closed to new replies.