Saturday, February 27, 2016

Wordpress Troubleshoot: Error Updating Plugins After Upgrade My PHP Version to PHP7



Today, I really surprised that I can't update any plugins in my Wordpress website. All of function were working well but still can't update any plugins. I though only this one site was broken until I opened my other site and it was broken too!!! What happened!? That was like a nightmare :((
Then, I searched for the error log in the Wordpress admin directory and there were many errors occurred. Here are some of the error messages.

[25-Feb-2016 14:47:10 UTC] PHP Fatal error:  Uncaught Error: Function name must be a string in /wp-content/plugins/shareaholic/lib/social-share-counts/curl_multi_share_count.php:53
Stack trace:
#0 /wp-content/plugins/shareaholic/public.php(444): ShareaholicCurlMultiShareCount->get_counts()
#1 /wp-includes/plugin.php(525): ShareaholicPublic::share_counts_api('')
#2 /wp-admin/admin-ajax.php(89): do_action('wp_ajax_shareah...')
#3 {main}  thrown in /wp-content/plugins/shareaholic/lib/social-share-counts/curl_multi_share_count.php on line 53 
[25-Feb-2016 14:51:48 UTC] PHP Fatal error:  Uncaught Error: Function name must be a string in /wp-content/plugins/shareaholic/lib/social-share-counts/curl_multi_share_count.php:53
Stack trace:
#0 /wp-content/plugins/shareaholic/public.php(444): ShareaholicCurlMultiShareCount->get_counts()
#1 /wp-includes/plugin.php(525): ShareaholicPublic::share_counts_api('')
#2 /wp-admin/admin-ajax.php(99): do_action('wp_ajax_nopriv_...')
#3 {main}  thrown in /wp-content/plugins/shareaholic/lib/social-share-counts/curl_multi_share_count.php on line 53 
[26-Feb-2016 23:16:50 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function ereg() in /wp-content/plugins/author-or-user-image/author_image.php:107
Stack trace:
#0 /wp-includes/plugin.php(525): zm_author_image->adinit('')
#1 /wp-admin/admin.php(168): do_action('admin_init')
#2 /wp-admin/update-core.php(10): require_once('/')
#3 {main}  thrown in /wp-content/plugins/author-or-user-image/author_image.php on line 107 
I googled for those error messages and found nothing related except an old post related to deprecated function ereg() in the older version of PHP. Aha! Maybe that is the source of the problems. I remembered that I changed the PHP version of my hosting from PHP 5.6 to PHP 7 about two days ago. My hosting provider said that by upgrading the PHP version to PHP 7 would improve the performance of Wordpress up to 130% of current performance. I totally sold to that advertisement at that time and changed my PHP version immediately.

I opened my cpanel and quickly downgraded my PHP version to 5.6.  Everything is working well now. I can update my plugins now. :) Lesson learned, don't too quick adopt the latest technology until it is stable enough and widely use.

Please leave a comment bellow if you find it useful.

Saturday, February 13, 2016

Dictionary: Philosophy Paper

Philosophy Paper contains a reasoned defense to a claim/thesis. Its objectives is to convince a reader about something that the writer want to say. From a philosophical writing, we can see someone's level of understanding of the subject problem or material because the writer can think critically about that that.

A philosophical paper may require several kinds of tasks, including:

  • Argument reconstruction 
  • Objections and replies 
  • Application 
  • Original argument 
  • Thought experiments

One good example of a philosophy paper is "Computing Machinery and Intelligence" by Alan M. Turing.

Source:

  • http://www.mit.edu/~yablo/writing.html
  • http://writingcenter.unc.edu/handouts/philosophy/
  • http://philosophy.fas.harvard.edu/files/phildept/files/brief_guide_to_writing_philosophy_paper.pdf
  • http://www.sfu.ca/philosophy/resources/writing.html

Finally, C# 9 record, the equivalent of Scala's case class

While C# is a wonderful programming language, there is something that I would like to see to make our life programmer easier. If you are fam...