Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Note: I also had to modify line 283 of the wptouch/themes/bauhaus/default/functions.php

    global $bauhaus_featured_posts;
    $settings = bauhaus_get_settings();
    $args = bauhaus_featured_get_args();
    $classes = [];
    if ( $settings->bauhaus_post_listing_autoplay ) {
    	$classes[] = 'autoplay';
    }

    Initializing Arrays in PHP using the [] syntax is only supported in PHP 5.4 and greater.

    So Line 283 needs to be changed to:

    $classes = array();

    The real solution is to contact your hosting company to make sure your website is running an updated version of PHP (5.6 or greater) since these older versions are no longer supported and may have security vulnerabilities. But for those who don’t have that option, these changes might work.

    • This reply was modified 9 years, 6 months ago by J. Max Wilson.

    Unless I am mistaken, it looks to me like version WPTouch 4.3 is using PHP namespacing.

    Here is the code that is failing (specifically line 104 of wptouch/core/class-cache-smash.php):

    if ( $w3tc_095_or_greater ) {
    	$w3_config = new \W3TC\Config( true );
    }
    else {
    	$w3_config = new W3_Config( true );
    }

    PHP Namespacing is only supported in PHP 5.3.x and above. If your hosting service is running PHP 5.2.x for your site, line 104 will cause the fatal error.

    You might try editing the file to check the PHP version:

    if (version_compare(phpversion(), '5.3.0', '>') && $w3tc_095_or_greater ) {
    	$w3_config = new \W3TC\Config( true );
    }
    else {
    	$w3_config = new W3_Config( true );
    }

    This seems to have worked for me, though I am in the process of updating my hosting to use a newer version of PHP, which will also fix this.

    • This reply was modified 9 years, 6 months ago by J. Max Wilson.
    J. Max Wilson

    (@jmaxwilson)

    @psionmark

    I’m on MediaTemple too and having a similar problem with both the admin area and the main site. And wp-cron is the number one GPU hog on my site as well.

    Still looking for a solution…

    J. Max Wilson

    (@jmaxwilson)

    @otto42

    Yup. I tested all of the transports and the self DNS lookup and they all work fine.

    I don’t understand why wp-cron.php would be hit so much, shouldn’t it only run a few times a day? I guess there could be a plugin that causes it to fire more frequently?

    J. Max Wilson

    (@jmaxwilson)

    Ok, since the last time I wrote I have been trying to narrow down the problem. It is still really slow, and not just in the admin section, my blog homepage sometimes takes 30 – 40 seconds to load. I did some timing on the sql queries being executed by WordPress 2.7 and the database is not the problem all the queries run extremely fast.

    Like I said in my last post, I have tried all of the suggestions in thread, including those related to curl and enabling and disabling various transports with no change.

    I’m still trying to identify the specific section of the code that is causing this, but here is one clue that I discovered while reviewing my site statistics:

    The wp-chron.php appears to be the most requested file on my site. I’m continuing to investigate it.

    I’ve been watching this topic for a couple of weeks, trying every solution that was suggested, but nothing has helped. I have a number of WordPress blogs running 2.7 and it sometimes takes between 10 and 30 seconds for them to load the main page.

    I’m running on the grid server at MediaTemple.net, with Apache 2.0.54, PHP 5.2.6, MySQL 4.1.11, and libcurl 7.13.2 on Debian GNU/Linux 4.0 2.6.20.2-1.

    I was hoping that 2.7.1 would fix it, but I just installed it and it still loads abominably slow.

    Any ideas?

    Thread Starter J. Max Wilson

    (@jmaxwilson)

    I see that “ryan” checked in changes to /wp-admin/includes/dashboard.php (Revsion #9635) that appear to resolve this issue.

    I’ve updated and tested it on my installation and it appears to work perfectly. Subscriber level users can now only see the “Right Now” widget, the WordPress news and blogs widgets, the incoming links widget, and the recent comments widget properly shows only approved comments and no links to view all.

    Excellent work!

    Please mark this thread as “resolved.”

    Thanks for your quick resolution.

Viewing 7 replies - 1 through 7 (of 7 total)