• Resolved Angel

    (@churrimurris)


    Hi, I have de last version of the plugin 1.4.1 instaled.
    In localhost there are no problems, all perfect.

    But when I upload it to the server i got a problem.

    When I activate the plugin I got:

    Warning: call_user_func_array() [function.call-user-func-array]: Unable to call CTXPS_App::localize_init() in ***/wp-includes/plugin.php on line 395

    Warning: call_user_func_array() [function.call-user-func-array]: Unable to call CTXPS_App::admin_screens_init() in ***/wp-includes/plugin.php on line 395

    Warning: call_user_func_array() [function.call-user-func-array]: Unable to call CTXPS_App::admin_init() in ***/wp-includes/plugin.php on line 395

    Warning: call_user_func_array() [function.call-user-func-array]: Unable to call CTXPS_App::help_init() in ***/wp-includes/plugin.php on line 395

    And in the frontend similar errors.

    Please help, I don’t understand why works perfectly in localhost but don’t at the server.

    I checked that is not a problem of incompability with other plugin or width the template.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Dutch van Andel

    (@veraxus)

    It sounds like a bad upload. Here’s what you do:

    1. Deactivate PSC in your admin (do NOT delete via WordPress admin if need to preserve your security settings)
    2. Via FTP or SSH, manually delete the /wp-content/plugins/contexture-page-security/ directory
    3. Re-download 1.4.1 via WordPress’s Plugins > Add Plugin page.
    4. Re-activate Page Security

    This should set everything right.

    I’ getting a similar error and deleting and reuploading didn’t work.

    Fatal error: Call to undefined method CTXPS_Tables::prepare() in /home5/wp-content/plugins/contexture-page-security/core/model_queries.php on line 892

    I sent back to 1.4.0 and all is well again.

    I did notice on 1.4.0 that each person needed to be a member of a group, not just a registered user and each page needed a group assignment, not just registered user to be protected. This is why I upgraded to 1.4.1 thinking it fixed that.

    Thread Starter Angel

    (@churrimurris)

    Thanks Veraxus but I tried to delete it and upload it again and it didn’t work.

    I have the wordpress version 3.0.4, maybe the problem is related to that?

    My theme is the free template cp-minimal, and I have a lot of plugins instaled like formidable forms, login width ajax, mee news.
    But in localhost works perfectly.

    I dont know what to do.

    Plugin Author Dutch van Andel

    (@veraxus)

    Hey Geoff,

    We nailed the CTXPS_Tables::prepare() bug today. Updating to 1.4.2 should finally get everything working the way it’s supposed to.

    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    Churrimurris,

    Can you tell me what version of PHP your server is running, and which hosting service?

    Technically, PSC should throw an error and refuse to activate if you’re running a version of PHP prior to 5.2.x, but from the looks of it, your server is choking on the ‘class::method’ callback (and you don’t seem to have gotten the PHP version warning).

    Also, if you shoot me an email ([email protected]), I’d like to send you a modified version of PSC to try out on your production server.

    PHP Version 5.2.16
    I’m on Hostmonster.

    Thread Starter Angel

    (@churrimurris)

    I appreciate that you try to help me.

    My server is running php 5.1.6 and it’s from arsys https://www.arsys.es

    I’m looking for a solution, if I get it I will tell you.

    I sent you an email too.

    Thanks again.

    Plugin Author Dutch van Andel

    (@veraxus)

    To finish off this thread, several points:

    Page Security requires PHP 5.2.3 to work. There’s a version check that should notify you if you current version is too low. But let me give you some technical details (other plugin developers might find this handy):

    Because I need to hook directly to static methods in custom classes, my callbacks look like this:
    add_action('admin_menu', 'CTXPS_App::admin_screens_init');

    This style of callback requires PHP 5.2.3 or higher. To support earlier versions of PHP, this callback would technically be written this way:
    add_action('admin_menu', array('CTXPS_App','admin_screens_init'));

    HOWEVER – WordPress contains a very unfortunate bug that somehow makes this style of callback invalid. In my own probing, it seems that when an array-formatted callback finally gets to call_user_func_array() in the WordPress core, an additional item has been added to the array. So instead of being given the valid array-formatted callback that I’ve defined, the array now look like this:

    array('CTXPS_App','admin_screens_init',1)

    This is now an invalid callback. Somehow, WordPress has appended a value to the array. This means that there is only one way to use WordPress hooks with methods… using string-formatted callbacks (which, as stated earlier, requires PHP 5.2.3 or higher).

    This is very unfortunate, but it’s a bug in the WordPress core that isn’t easily fixed. I have some workaround ideas that can be included in plugins that need this, and I’ll post them to the codex if one of them works.

    Churrimurris:
    At the moment, it seems the only solution is to see if your hosting service can update PHP. I’ll look into those workarounds and let you know if I come up with a solution.

    Thread Starter Angel

    (@churrimurris)

    Ok, I will ask to my hosting service for update PHP.

    Thanks for all, you’re plugin is great anyway.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Page Security by Contexture] Unable to call CTXPS_App::localize_init()’ is closed to new replies.