Support » Plugin: Simplr Registration Form Plus+ » Missing sreg.class

  • ….-form/lib/sreg.class.php): failed to open stream: No such file or directory in ….plugins/simplr-registration-form/simplr_form_functions.php on line 439

    [22-Sep-2013 12:02:29 UTC] PHP Fatal error: require_once(): Failed opening required ‘…..form/lib/sreg.class.php’ (include_path=’.:/Applications/MAMP/bin/php/php5.4.4/lib/php’) in ….plugins/simplr-registration-form/simplr_form_functions.php on line 439

    ==> File is simply not included in your production package.
    ==> Please submit updated version of your plugin!

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Yes, I’m having the same problem. The result is that the page on which I had implemented the form via shortcodes now doesn’t show any of the manually entered text. It just says that “sreg.class.php” is missing. It also messes up certain parts of my CSS…

    Plus one for this issue. Just downloaded the current version archive, and sreg.class.php is missing from the /lib directory. Can you please add back in, or let us know name of the file that includes the sreg class?

    Thanks. Really looking forward to this plugin. It’s exactly what I need!




    For Solution, replace the sreg_basic function on line 438, with the following function. Enjoy !!

    function sreg_basic($atts) {
    //Check if the user is logged in, if so he doesn't need the registration page
    if ( is_user_logged_in() AND !current_user_can('administrator') ) {
    global $user_ID;
    $first_visit = get_user_meta($user_ID, 'first_visit',true);
    if(empty($first_visit)) {
    $message = !empty($atts['message'])?$atts['message']:"Thank you for registering.";
    echo '<div id="message" class="success"><p>'.$message.'</p></div>';
    } else {
    echo "You are already registered for this site!!!";
    } else {
    //Then check to see whether a form has been submitted, if so, I deal with it.
    global $sreg;
    if(isset($sreg->success)) {
    return $sreg->output;
    } else {
    if(is_array($sreg->errors)) {
    $out = '';
    foreach($sreg->errors as $mes) {
    $out .= '<div class="simplr-message error">'.$mes .'</div>';
    } elseif(is_string($sreg->errors)) {
    $out = '<div class="simplr-message error">'.$message .'</div>';
    return $out.simplr_build_form($_POST,$atts);
    } //Close LOGIN Conditional

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]


    Thank you for your solution!!! I couldn’t get in touch with the developer. I’m happy someone else found this out!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Missing sreg.class’ is closed to new replies.