Forum Replies Created

Viewing 15 replies - 1 through 15 (of 55 total)
  • Thread Starter icc97

    (@icc97)

    Hi Andrew,

    Thanks for your reply.

    PHP 5.5 is actively supported with security patches on Ubuntu 14.04, not by PHP but by Canonical.

    https://askubuntu.com/a/527537/8989

    Yes, like most packages in Ubuntu, the security team backports security fixes, including for versions that are no longer supported by upstream.

    The Stripe PHP API only requires PHP 5.3. So where does the requirement for PHP 5.6 come from?

    icc97

    (@icc97)

    @fullysupportedphil – PHP 5.5.9 is the max version on Ubuntu 14.04 LTS and it’s almost certainly never going to go up to 5.6. So everyone on that platform (which is a lot of users) is hitting problems with this release.

    I’m going to hit it again because I need to move to WooCommerce 3 and I don’t want to because I can’t install your Stripe compatibility fixes for WooCommerce 3 and I don’t want to risk breaking things.

    What is it that is so special about v5.6 vs v5.5.9 that is so important in your code? Do you really need to break compatibility?

    WordPress is great for allowing backwards compatibility, it’s one of the things that makes WordPress so inclusive, yet you’re breaking that.

    Please, please re-consider the need to break compatibility at least until Ubuntu 14.04 is end of life.

    Thread Starter icc97

    (@icc97)

    @michelalbrecht1 what version of the plugin do you have installed?

    There’s a reason they have that WC_STRIPE_MIN_PHP_VER in there which is because there will be PHP code that is incompatible with PHP 5.4. So changing the constant will get your plugin working but it’s going to crash at some point.

    I actually reverted to v3.0.7 just as that was the one I had on my staging server: https://downloads.wp.xz.cn/plugin/woocommerce-gateway-stripe.3.0.7.zip

    This works fine on my server with PHP 5.5.19.

    • This reply was modified 9 years, 2 months ago by icc97.
    Thread Starter icc97

    (@icc97)

    Hi Thomas,

    Great, thank you.

    Cheers,

    Ian

    Thread Starter icc97

    (@icc97)

    Hi Thomas,

    Thanks for the quick response.

    Yes, I did receive that warning. But by then it’s too late, the site is broken.

    When making a breaking change you should be updating the major version number.

    Unfortunately the downgrade route is not as simple as the upgrade route, but not exactly hard.

    If you could put a link in that warning of where to download the previous version that does work with PHP < 5.6 that would be helpful e.g. https://downloads.wp.xz.cn/plugin/woocommerce-gateway-stripe.3.1.2.zip

    Cheers,

    Ian

    icc97

    (@icc97)

    Thanks for the reply. I really should be writing this on a WordPress bug, but I’m putting it here for now.

    I did a quick bit of research on it – I assume WordPress still using the zxcvbn library (http://wptavern.com/ridiculously-smart-password-meter-coming-to-wordpress-3-7) which sounds like an excellent implementation of a password checker.

    But even with me knowing the various password schemes, I found it really hard / opaque to understand what you need to do to your current password to make it stronger.

    It rejects this password ‘easythereforeaccept’ (19 characters) long as weak. It still rejects it as weak if users do their standard of adding an exclamation mark, so ‘easythereforeaccept!’.

    That is a mixed password of 20 characters which is getting rejected.

    I know the standard of adding an exclamation isn’t good practice, but effectively banning all existing practices makes it really frustrating.

    Of course if people know the XKCD that this is based on then they can add in spaces to get ‘easy therefore accept!’ and that is suddenly strong. But no normal person knows that.

    I understand we want to improve people’s passwords, but it seems we’ve just created another frustrating password checker with rules that are even harder to figure out.

    icc97

    (@icc97)

    Actually in WooCommerce’s defense – it looks like this is just using the WordPress underlying password checker. How WordPress can have such a poor implementation of a password checker amazes me.

    icc97

    (@icc97)

    I’ve already started getting complaints about this from customers. I’ve just tried it myself and it’s pretty poor from what I’ve tested. In my testing I found that adding an extra character would convert a strong password to a medium one – that is just wrong.

    As my first example of a failure case:

    1. abasdsdflkj (Weak)
    2. abasdsdflkjd (Medium)
    3. abasdsdflkjdd (Strong)
    4. abasdsdflkjddd (Medium)

    I’ve hit this same problem with APC Object Cache. Simplest fix was a webserver restart to clear the cache.

    Thread Starter icc97

    (@icc97)

    Sorry – yes I meant to say that I was assuming it was to avoid hacking attempts (like mine :))

    Thread Starter icc97

    (@icc97)

    My hacky attempt at a work around using ../content/uploads doesn’t work as you strip out the ..

    Thread Starter icc97

    (@icc97)

    In adaptive-images-actions.php line 123 you guess the base directory based on where wp-admin is:

    $request_base_dir = substr( $request_uri, 0, strpos( $request_uri, '/wp-admin', 1 ) );

    But my watched ‘content’ directory lies outside wp.

    Thread Starter icc97

    (@icc97)

    Here’s the debug info if that helps:

    ✔ PHP GD library is installed.
    
    ✔ Image cache directory has been created.
    
        /var/www/vhosts/ia.klever.co.uk/httpdocs/content/cache/adaptive-images => drwxr-xr-x
    
    ✔ Installation .htaccess file is setup OK.
    
        /var/www/vhosts/ia.klever.co.uk/httpdocs/.htaccess => -rw-r--r--
    
    ❖ Adaptive images settings dump:
    
        array(9) {
          ["resolutions"]=>
          array(3) {
            [0]=>
            int(1024)
            [1]=>
            int(640)
            [2]=>
            int(480)
          }
          ["cache-directory"]=>
          string(21) "cache/adaptive-images"
          ["watched-directories"]=>
          array(2) {
            [0]=>
            string(15) "content/uploads"
            [1]=>
            string(14) "content/themes"
          }
          ["jpeg-quality"]=>
          int(65)
          ["sharpen-images"]=>
          bool(true)
          ["watch-cache"]=>
          bool(true)
          ["browser-cache"]=>
          float(180)
          ["version"]=>
          string(6) "0.3.52"
          ["sanitized"]=>
          bool(true)
        }

    And the system information:

    System information
    PHP	
    
    5.5.9-1ubuntu4.9
    MySQL	
    
    5.5.40-0ubuntu0.14.04.1
    WordPress	
    
    4.2.2
    Multisite	
    
    No
    Debug Mode	
    
    No
    Table Prefix	
    
    wp_
    Web Server	
    
    Apache
    Site url	
    
    http://ia.klever.co.uk/wp
    Home url	
    
    http://ia.klever.co.uk
    Permalinks	
    
    /%year%/%monthnum%/%postname%/
    PHP Error Log	
    
    Ext/mysqli	
    
    Yes
    WP Locale	
    
    en_US
    DB Charset	
    
    utf8
    PHP Time Limit	
    
    60
    WP Memory Limit	
    
    40M
    PHP Memory Limit	
    
    256M
    WP Max Upload Size	
    
    8mb
    PHP Post Max Size	
    
    8M
    PHP Upload Max Size	
    
    128M
    PHP Max Input Vars	
    
    1000
    PHP Display Errors	
    
    0
    Active plugins	
    
    Adaptive Images for WordPress v.0.3.52 by Nevma
    Bootstrap 3 Shortcodes v.3.3.6 by Filip Stefansson, Simon Yeldon, and Michael W. Delaney
    Child Page Navigation v.1.3.3 by ITS Alaska
    Pitta Migration v.0.3.3 by Ian Channing @ VSN International
    W3 Total Cache v.0.9.4.1 by Frederick Townes
    MU plugins	
    
    Adaptive Images for WordPress v.0.3.52 by Nevma
    Bootstrap 3 Shortcodes v.3.3.6 by Filip Stefansson, Simon Yeldon, and Michael W. Delaney
    Child Page Navigation v.1.3.3 by ITS Alaska
    Pitta Migration v.0.3.3 by Ian Channing @ VSN International
    W3 Total Cache v.0.9.4.1 by Frederick Townes
    Thread Starter icc97

    (@icc97)

    Hi @nevma,

    Sorry for the delay. Thank you for trying to fix this! It is certainly closer, but it doesn’t look like it has quite worked though.

    My .htaccess after re-saving the settings:

    # Watched directories
        RewriteCond %{REQUEST_URI} /wp/content/uploads [OR]
        RewriteCond %{REQUEST_URI} /wp/content/themes
    
        # Redirect images through the adaptive images script
        RewriteRule \.(?:jpe?g|gif|png)$ /content/plugins/adaptive-images/adaptive-images/ai-main.php [L]

    This is my directory structure:

    httpdocs
     - content (custom wp-content directory)
     - wp (wordpress)

    It figures out that I have WordPress in a subdirectory called wp, and figures out the I’ve renamed wp-content to content. However it still thinks that content is under wp.

    Thread Starter icc97

    (@icc97)

    Awesome, thanks! It might be difficult to handle as the constants I’m using aren’t just text:

    define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/content' );
    if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off') {
    	$protocol = 'http';
    } else {
    	$protocol = 'https';
    }
    
    define( 'WP_CONTENT_URL', $protocol . '://' . $_SERVER['HTTP_HOST'] . '/content' );
Viewing 15 replies - 1 through 15 (of 55 total)