WordPress.org

Ready to get started?Download WordPress

Forums

Code Snippets
WordPress breaks after running phpinfo() (6 posts)

1 star
  1. codeslayer2010
    Member
    Posted 11 months ago #

    I was able to install this plugin successfully. I created only one snippet as such:

    NAME: phpinfo

    CONTENT:
    phpinfo();

    Upon clicking "save and activate" I get this error:

    Fatal error: Call to undefined function info() in /home/www/ehepperle.com/sites/ehw/codeslayer2010/wp-content/plugins/code-snippets/code-snippets.php(1030) : eval()'d code on line 1

    When I subsequently tried to deactivate it, I jumps to that error. When I then tried to just delete it, jumps to that error again.

    Basicall, my whole WordPress install is broke because this plugin won't uninstall, deactive, leave, nor un-do in any sort of way. I had high hopes for it, but unfortunately cannot recommend it due to it breaking my WordPress.

  2. mbrsolution
    Member
    Posted 11 months ago #

    Hello did you read the FAQ, This is what is says in relation to your problem.

    Can the plugin be completely uninstalled?

    Yes, when you delete Code Snippets using the 'Plugins' menu in WordPress it will clean up the database table and a few other bits of data. Be careful not to remove Code Snippets using the Plugins menu unless you want this to happen.

    I hope this helps you.

    Kind regards

  3. Shea Bunge
    Member
    Plugin Author

    Posted 11 months ago #

    mbrsolution is correct that deleting the plugin through the WordPress plugins menu will clean up all snippets. You can also try activating safe mode to delete the snippet.

    Also, you are using the wrong type of snippet with this plugin. Snippets should do things, using action and filter hooks or shortcodes, not display data.

  4. codeslayer2010
    Member
    Posted 11 months ago #

    Thanks to mbrsolution and Shea for responding! Unfortunately using the "Plugins" menu in WordPress did not work for me. What was required, however was to manually, physically navigate to the Plugins folder on the server and manually physically delete the folder for this plugin (I used FileZilla FTP for this purpose). Once again, deleting (at least from my experience) the plugin from the "Plugins" menu in WordPress did not work. But I still appreciate your responses because they helped me get one step closer than before!

    Regards

  5. codeslayer2010
    Member
    Posted 11 months ago #

    One more thing: @Shea Bunge: Thanks also for clarify that snippets should "do things", not display data. All I was trying to accomplish was to prove that it worked, so for me phpinfo() would accomplish a similar purpose to a quintessential "Hello World!" code snippet. And I was thinking of snippets as any piece of PHP code that one could import or require. I guess I'm not clear on what problem it is supposed to solve.

    Thanks for your response.

  6. Shea Bunge
    Member
    Plugin Author

    Posted 11 months ago #

    You're correct in that this plugin is not for snippets that display data and can be included. Rather, it's for running small snippets of code that might be otherwise put in functions.php or included in a plugin. See http://code-snippets.bungeshea.com/docs/finding-snippets/ for examples of what snippets you can use.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.