WordPress.org

Ready to get started?Download WordPress

Forums

Alex king fatal error Popularity Contest (43 posts)

  1. gulflee
    Member
    Posted 6 years ago #

    I had uploaded a Alex king Popularity Contest. when try to activate it error msg show:
    Plugin could not be activated because it triggered a fatal error.
    I had found a post from http://blog.evaria.com/ show a solution;

    Open popularity-contest.php and scroll down to line 59. Replace require(’../../wp-blog-header.php’); with require(’../wp-blog-header.php’);
    but not work; my wordpress is install in directory /public_html/wordpress/ will it be the prob?>

  2. giovanealex
    Member
    Posted 6 years ago #

    Mine was solved using this hint but my blog is installed on root - yours isn't.

  3. gulflee
    Member
    Posted 6 years ago #

    it should be the right one coz my blog is ../wordpress/blog-header.php in the index.php in the root
    but .....

  4. moxiekat
    Member
    Posted 6 years ago #

    Open popularity-contest.php and scroll down to line 59. Replace require(’../../wp-blog-header.php’); with require(’../wp-blog-header.php’);

    I just had this problem when upgrading to WP 2.5 with the Popularity Contest plugin. The fix above worked like a charm, in case anyone needs to know.

  5. touchnova
    Member
    Posted 6 years ago #

    I had this same problem, but found a slightly different fix. Like gulflee, my blog isn't installed in the root directory, but in a sub called 'blog'. So, I used the original code from line 59 of the popularity-contest.php, but added /blog/ into the path so it matches my setup. So, in my case I used:

    require(’../../blog/wp-blog-header.php’);

    ...worked like a charm.

  6. kevlaw
    Member
    Posted 6 years ago #

    My blog is also installed at ~/blog and I have tried every combination of ./blog ../blog ../../blog ../ ../../ etc and I still get a fatal error. Is there a log somewhere to help me debug this?

    I am using Popularity Contest for the first time, and I just upgraded to 2.5.

    TIA,

    Kevin

  7. devilcatz
    Member
    Posted 6 years ago #

    thanks! now pop contest work like a charm!

  8. domainpubber
    Member
    Posted 6 years ago #

    I tried this suggestion, but found that the required table can not be created when you try to activate the Popularity Contest plugin AFTER installing WP 2.5. Anybody have ideas on how to resolve this issue please?

  9. kevlaw
    Member
    Posted 6 years ago #

    I think that was my mistake too.

    I thought it would be safer to upgrade then install. Turns out I was wrong :-(

  10. jayrunquist
    Member
    Posted 6 years ago #

    I'm running into the same issue. I upgraded to WP 2.5, installed the plug-in nd now changed that code but it can't write to the table. ARG! Help please?

  11. Binni
    Member
    Posted 6 years ago #

    I am in that same boat, the required table cannot be created even though I changed the code. If no help arrives soon I think I may drown.

  12. Binni
    Member
    Posted 6 years ago #

    The message I get is:

    Table 'MYSQL_TABLE NAME.wp_ak_popularity_options' doesn't exist on line: 124

    Can anyone solve this?

  13. matsrehn
    Member
    Posted 6 years ago #

    @Binni and everybody:

    Here’s a patched version that I’ve found when searching:
    http://www.kenmc.com/2008/03/30/wordpress-25-is-live-and-wild-plus-popularity-contest-notes/
    That file has just been modified to include the change that is in the first post by gulflee in this thread:
    Open popularity-contest.php and scroll down to line 59. Replace require(’../../wp-blog-header.php’); with require(’../wp-blog-header.php’);

    It probably work if you just upload and activate it.

    If not, if you get the same error message as Binni: "Table 'MYSQL_TABLE NAME.wp_ak_popularity_options' doesn't exist on line: 124"

    there are MySQL info in the address above that you add thru php myadmin. If you need a free MySQL client here’s SQL Front http://www.sql-front.com/download.html

    Good luck,
    and please reply if it's work. I have to ask my Host for write permissions in php myadmin tomorrow to be able to create new tables.
    Mats.

  14. matsrehn
    Member
    Posted 6 years ago #

    Good news. I managed to login to myphp admin directly thru the control panel of my Host, created those two tables, 12 fields in the first table, two fields in the second table, and now it works like a charm! I'm out on deep water here because I didn't know what php myadmin was until tonight.

    Regards,
    Mats

  15. soleman
    Member
    Posted 6 years ago #

    How do I put this line into phpMYadmin?

    KEY post_id (post_id)

    I have the rest...

  16. Binni
    Member
    Posted 6 years ago #

    Problem solved (for me). Thanks to you, matsrehn.

  17. soleman
    Member
    Posted 6 years ago #

    Got it working....!

  18. soleman
    Member
    Posted 6 years ago #

    I just installed WP and Popularity Contest on the live server and the only change is that I have WP in the root so wp-blog-header.php is in the root with the WP directories right off the root.

    On my install where WP was installed in a wordpress directory - I used this and it worked perfectly: ../../wp-blog-header.php

    On the new install I've tried everything from no ../ to ../ , ../../, ../../../ But none of them work - Iget the Fatal Error.

    Anyone know the fix?

  19. soleman
    Member
    Posted 6 years ago #

    Got it fixed... weird error.

  20. ssonmez
    Member
    Posted 6 years ago #

    matsrehn, thank you. It's work.

  21. mr12ka4
    Member
    Posted 6 years ago #

    all dese soutions will work only when upgrading to WP 2.5 but this populairty contest isnt wrking on fresh installation .
    is dere any solution ...?

  22. cableboy
    Member
    Posted 6 years ago #

    The fix is not working for me on a fresh install of 2.5.1 either.

  23. cableboy
    Member
    Posted 6 years ago #

    I did some research. If your installation is new, you have to make the modification as described above, upload the plugin, run the below SQL query through phpmyadmin, and THEN activate the plugin. Works for me..

    CREATE TABLE IF NOT EXISTS <code>wp_ak_popularity</code> (
        <code>post_id</code> int(11) NOT NULL,
        <code>total</code> int(11) NOT NULL,
        <code>feed_views</code> int(11) NOT NULL,
        <code>home_views</code> int(11) NOT NULL,
        <code>archive_views</code> int(11) NOT NULL,
        <code>category_views</code> int(11) NOT NULL,
        <code>single_views</code> int(11) NOT NULL,
        <code>comments</code> int(11) NOT NULL,
        <code>pingbacks</code> int(11) NOT NULL,
        <code>trackbacks</code> int(11) NOT NULL,
        <code>last_modified</code> datetime,
        KEY <code>post_id</code> (<code>post_id</code>)
        ) ENGINE=MyISAM;
    
        CREATE TABLE IF NOT EXISTS <code>wp_ak_popularity_options</code> (
        <code>option_name</code> varchar(50) NOT NULL,
        <code>option_value</code> varchar(50) NOT NULL
        ) ENGINE=MyISAM;
  24. Bliss7
    Member
    Posted 6 years ago #

    Nah, I cannot get it working, Still keeps triggering Fatal Errors.

    I did all those things, and it still don't work.

    I believe the tables are there, as previously it was working. Now it doesn't with WP 2.5 any more.

    Alex King also is not updating it.....

  25. wp_guy
    Member
    Posted 6 years ago #

    I wrote an article about this issue over here:

    Popularity Contest plugin and WordPress 2.5

    Hope it helps!

  26. Flirtilizer
    Member
    Posted 6 years ago #

    WP guy, thanks. worked perfect for me.

  27. jayrunquist
    Member
    Posted 6 years ago #

    wp-guy, AWESOME!

  28. anassirk
    Member
    Posted 6 years ago #

    wp_guy, it works!

  29. chewru
    Member
    Posted 6 years ago #

    wp-guy, thanks. i just used your modified code and it worked great. =)

  30. WayneSmallman
    Member
    Posted 5 years ago #

    Fatal error for me.

    I'm not prepared to fool around with the code, so I'll wait for a sanctioned update from Alex...

Topic Closed

This topic has been closed to new replies.

About this Topic