PHP Warning when Signup

This topic contains 6 replies, has 3 voices, and was last updated by  Paolo 9 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #219566

    jonesy
    Expired Member
    Post count: 10

    I have read now for hours about stopping warning messages, if I add
    error_reporting(E_ERROR);
    to the childtheme. I have done this after the opening tag as I read. It now looks like this

    <?php
    //*error_reporting(E_ERROR);

    //* Start the engine
    include_once( get_template_directory() . ‘/lib/init.php’ );

    //* Setup Theme
    include_once( get_stylesheet_directory() . ‘/lib/theme-defaults.php’ );

    and all the other coding below. Press update file.

    However it does not solve the problem of having people wanting to Sign Up and getting this warning message. The sign up works – as in it accepts the email, password and they have to go to the homepage and log in with the credentials they just created. So this part is working.

    But why is the warning message still coming up? Have I not added the child theme correctly? I am running Wordfence and definitely want to leave it activated.

    Help would be greatly appreciated.

    #219569

    Guust
    Moderator
    Post count: 29970

    Remove the

    //

    from

    //*error_reporting(E_ERROR);

    Adding

    //

    in front of a line in a php file will stop that line from executing.

    #219586

    jonesy
    Expired Member
    Post count: 10

    Parse error: syntax error, unexpected ‘*’ in /home/xxxxxxx/public_html/wp-content/themes/geodir_geo-travel/functions.php on line 2

    Hi Guust, now I am really stuffed I think.
    It comes up with the message above when I am trying to update the file without //

    I can even take the entire error thing out just like the original and will not take the update of the file.

    What now??

    #219601

    jonesy
    Expired Member
    Post count: 10

    When I now look on my mobile phone the entire website is gone! Really need help here, please! What does the above error mean??

    #219607

    jonesy
    Expired Member
    Post count: 10

    <?php

    //* Start the engine
    include_once( get_template_directory() . ‘/lib/init.php’ );

    //* Setup Theme
    include_once( get_stylesheet_directory() . ‘/lib/theme-defaults.php’ );

    Still not accepting the update. Website not working at all.

    #219625

    jonesy
    Expired Member
    Post count: 10

    No worries, fixed it now. Was freakin’ out quite a bit though. Went into the file manager of my CPanel and added the function.php from there. I think with having gone back and forwards within the wordpress site, it did not want to take the update anymore even though it was correct.
    Certainly helps having access to the back back end!

    And for those that keep looking for PHP Warnings with Wordfence installed, adjusting the function.php of the child theme in Editor under Appearance worked for me.

    <?php
    error_reporting(E_ERROR);

    //* Start the engine
    include_once( get_template_directory() . ‘/lib/init.php’ );

    As above, I have added the code error_reporting(E_ERROR);
    Did not change anything else. I hope this explanation helps someone else too. People can sign up on my website and not get any PHP Warnings to the user.

    #219756

    Paolo
    Site Admin
    Post count: 31211

    We are glad you solved it and thanks for sharing the solution 🙂

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount