WordPress.org

Ready to get started?Download WordPress

Forums

wordpress 3.5 - How do I hide the php error code? (8 posts)

  1. guitario
    Member
    Posted 1 year ago #

    Hi, as others have said; I get this message at the top of my posts -

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/jamflex/psycholocrazy.com/wp-content/plugins/sharebar/sharebar.php on line 112 and defined in /home/jamflex/psycholocrazy.com/wp-includes/wp-db.php on line 990

    I am not too concerned with actually adding the second argument as that sharebar.php file doesn't seem to mention any of this at line 112.

    I would just like to hide the error code, but I don't have WordPress 3.5 on my computer. I just updated it online. I understand that the code is -

    @ini_set('display_errors', 0);

    I have a wp-config.php notepad file on my computer but the associated files are wordpress 3.2 so that's probably why it doesn't work.

    Can anyone off me a quick simple IDIOTS guide to hiding the above code please? It's very important I keep the sharebar plugin.

    Here is an example of the error - http://www.psycholocrazy.com/6-ways-future-technology-amaze

    Thanks in advance.

  2. calik1d
    Member
    Posted 1 year ago #

    You mean commenting the code out? Or deleting it?

  3. guitario
    Member
    Posted 1 year ago #

    Anything that hides that code from anyone that views my website. I basically need it to disappear pronto :-)

  4. guitario
    Member
    Posted 1 year ago #

    I have temporarily disabled the plugin, incase anyone is wondering why the code isn't showing, but I would still like to know how to hide the php error code.

  5. The php.ini file resides in the ROOT of your server hosting account.

    NOT in your wordpress installation.

  6. guitario
    Member
    Posted 1 year ago #

    Okay, how do I access that? I'm with Dreamhost if that helps. I've never had to do this kind of thing before.

  7. Typically.. you would use an FTP account or the hosts CPanel to access the file.

    But, you have to make sure the account has ROOT access to the directories. A lot of FTP accounts get set up with access only at a specified directory. You need the root.

    Call your host if you need help with how to access the file. They can (should) help you.

  8. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    Hi, guitario, I took a look at your site, and you can totally use @ini_set('display_errors', 0);

    If you edit your wp-config.php file, you have a link for define('WP_DEBUG', false); and you can put that ini set on the line right below it. That should do the trick and it doesn't matter that you started on 3.2 :) Your site is definitely running 3.5 and thats what matters.

Topic Closed

This topic has been closed to new replies.

About this Topic