PHP v5.3 Required (Notice Instead of Exception) #13

Closed
jaswrks opened this Issue Nov 27, 2013 · 11 comments

Comments

Projects
None yet
3 participants
@jaswrks
Member

jaswrks commented Nov 27, 2013

Generate an administrative notice instead of a PHP exception; allowing the plugin to be activated, but without actually loading the plugin under this scenario.

A notice to the site owner could helpful in cases where the plugin is NOT being updated through the Dashboard. This will remove the risk of crashing a site that's attempting to run Quick Cache w/o PHP v5.3 installed.

@ghost ghost assigned jaswrks Nov 27, 2013

@jaswrks jaswrks closed this in 3571a02 Nov 27, 2013

jaswrks pushed a commit to websharks/comet-cache-pro that referenced this issue Nov 27, 2013

jaswrks pushed a commit to websharks/comet-cache-pro that referenced this issue Nov 27, 2013

@jaswrks

This comment has been minimized.

Show comment Hide comment
@jaswrks

jaswrks Nov 27, 2013

Member

EMERGENCY: If All Else Fails (How-To Remove Quick Cache)

Ordinarily you can just deactivate Quick Cache from the plugins menu in WordPress. However, if you're having a more serious issue, please following the instructions here.

Log into your site via FTP; perhaps using FileZilla.
Delete this file: /wp-content/advanced-cache.php
Delete this directory: /wp-content/plugins/quick-cache/
Remove this line from your /wp-config.php file: define('WP_CACHE', TRUE);

Quick Cache is now completely uninstalled and you can start fresh :-)

Member

jaswrks commented Nov 27, 2013

EMERGENCY: If All Else Fails (How-To Remove Quick Cache)

Ordinarily you can just deactivate Quick Cache from the plugins menu in WordPress. However, if you're having a more serious issue, please following the instructions here.

Log into your site via FTP; perhaps using FileZilla.
Delete this file: /wp-content/advanced-cache.php
Delete this directory: /wp-content/plugins/quick-cache/
Remove this line from your /wp-config.php file: define('WP_CACHE', TRUE);

Quick Cache is now completely uninstalled and you can start fresh :-)

@jaswrks

This comment has been minimized.

Show comment Hide comment
@jaswrks

jaswrks Nov 28, 2013

Member

Re-opening. The fix in place for this still relies on functionality provided only by PHP v5.3+ via the anonymous function used for the Dashboard notice. Needs fixing.

Member

jaswrks commented Nov 28, 2013

Re-opening. The fix in place for this still relies on functionality provided only by PHP v5.3+ via the anonymous function used for the Dashboard notice. Needs fixing.

@inimist

This comment has been minimized.

Show comment Hide comment
@inimist

inimist Nov 28, 2013

@re-opening. The fix in place for this still relies on functionality provided only by PHP v5.3+ via the anonymous function used for the Dashboard notice. Needs fixing.

This issue is still there. File quick-cache.php line 18

inimist commented Nov 28, 2013

@re-opening. The fix in place for this still relies on functionality provided only by PHP v5.3+ via the anonymous function used for the Dashboard notice. Needs fixing.

This issue is still there. File quick-cache.php line 18

@jaswrks

This comment has been minimized.

Show comment Hide comment
@jaswrks

jaswrks Nov 28, 2013

Member

Thank you. This got fixed in 915b410;
the change will go out to WordPress.org soon, but it's fixed in the dev branch here at GitHub.

Unless I'm missing something, line 18 is correct. Quick Cache requires PHP v5.3+ and this line ensures that Quick Cache is not loaded until that dependency can be satisfied; else a Dashboard notice is issued to the site owner.

if(version_compare(PHP_VERSION, '5.3', '<'))
    {
        function quick_cache_php53_dashboard_notice()
            {
                echo __('<div class="error"><p>Plugin NOT active. This version of Quick Cache requires PHP v5.3+.</p></div>', 'quick-cache');
            }
        add_action('all_admin_notices', 'quick_cache_php53_dashboard_notice');
    }
else require_once dirname(__FILE__).'/quick-cache.inc.php';
Member

jaswrks commented Nov 28, 2013

Thank you. This got fixed in 915b410;
the change will go out to WordPress.org soon, but it's fixed in the dev branch here at GitHub.

Unless I'm missing something, line 18 is correct. Quick Cache requires PHP v5.3+ and this line ensures that Quick Cache is not loaded until that dependency can be satisfied; else a Dashboard notice is issued to the site owner.

if(version_compare(PHP_VERSION, '5.3', '<'))
    {
        function quick_cache_php53_dashboard_notice()
            {
                echo __('<div class="error"><p>Plugin NOT active. This version of Quick Cache requires PHP v5.3+.</p></div>', 'quick-cache');
            }
        add_action('all_admin_notices', 'quick_cache_php53_dashboard_notice');
    }
else require_once dirname(__FILE__).'/quick-cache.inc.php';
@inimist

This comment has been minimized.

Show comment Hide comment
@inimist

inimist Nov 28, 2013

Correct. It is fixed at Github (in the 915b410) but needs to go out to Wordpress.org. I installed on my client's server from Wordpress.org and it broke the page as server ran PHP < 5.3. Thanks for the update and for such a great plugin!

inimist commented Nov 28, 2013

Correct. It is fixed at Github (in the 915b410) but needs to go out to Wordpress.org. I installed on my client's server from Wordpress.org and it broke the page as server ran PHP < 5.3. Thanks for the update and for such a great plugin!

@jaswrks

This comment has been minimized.

Show comment Hide comment
@jaswrks

jaswrks Nov 28, 2013

Member

Thanks for confirming. This will go to WP.org later today.

Member

jaswrks commented Nov 28, 2013

Thanks for confirming. This will go to WP.org later today.

@jaswrks

This comment has been minimized.

Show comment Hide comment
@jaswrks

jaswrks Nov 28, 2013

Member

This went out w/ Quick Cache and Quick Cache Pro v131128
http://wordpress.org/plugins/quick-cache/changelog/

Member

jaswrks commented Nov 28, 2013

This went out w/ Quick Cache and Quick Cache Pro v131128
http://wordpress.org/plugins/quick-cache/changelog/

@rkcpr

This comment has been minimized.

Show comment Hide comment
@rkcpr

rkcpr Dec 17, 2013

In Cpanel, my PHP version shows 5.3.21 but I'm still getting the error message with Quick Cache Version Version 131206 (Plugin NOT active. This version of Quick Cache requires PHP v5.3+.) At this point I'm not sure if I should be posting here or talking to my host. Advice please.

rkcpr commented Dec 17, 2013

In Cpanel, my PHP version shows 5.3.21 but I'm still getting the error message with Quick Cache Version Version 131206 (Plugin NOT active. This version of Quick Cache requires PHP v5.3+.) At this point I'm not sure if I should be posting here or talking to my host. Advice please.

@jaswrks

This comment has been minimized.

Show comment Hide comment
@jaswrks

jaswrks Dec 17, 2013

Member

@rkcpr It is always possible that your website is running under a different version of PHP. Your host may support PHP v5.3.x, but you will need to check with them to be sure that's what is actually powering the site in question. An easy way to test this for youself is to create a PHP file like this and open it in a web browser.

<?php echo PHP_VERSION; ?>
Member

jaswrks commented Dec 17, 2013

@rkcpr It is always possible that your website is running under a different version of PHP. Your host may support PHP v5.3.x, but you will need to check with them to be sure that's what is actually powering the site in question. An easy way to test this for youself is to create a PHP file like this and open it in a web browser.

<?php echo PHP_VERSION; ?>
@rkcpr

This comment has been minimized.

Show comment Hide comment
@rkcpr

rkcpr Dec 17, 2013

Thanks! I've put in a support ticket and will post result here.

rkcpr commented Dec 17, 2013

Thanks! I've put in a support ticket and will post result here.

@rkcpr

This comment has been minimized.

Show comment Hide comment
@rkcpr

rkcpr Dec 18, 2013

The host instructions were having me update a file in the wrong directory but it's fixed now. Thanks,

rkcpr commented Dec 18, 2013

The host instructions were having me update a file in the wrong directory but it's fixed now. Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment