Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9148039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:09:49+00:00 2026-06-17T11:09:49+00:00

I am trying to activate a tiny plugin on WordPress that is running on

  • 0

I am trying to activate a tiny plugin on WordPress that is running on localhost but it runs into the following error:

The plugin generated 6 characters of unexpected output during activation. If you notice “headers
already sent” messages, problems with syndication feeds or other issues, try deactivating or
removing this plugin.

<?php
/*
Plugin Name: myphoto Plugin
Description: A plugin to retrieve photos and share them on the wordpress.
Version: 1.0
Author: Saeed pirdost
Copyright: 2012,  Saeed pirdost  
*/
?>
<?php
myprint();
function myprint()
{
    echo "hello";
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:09:51+00:00Added an answer on June 17, 2026 at 11:09 am

    Try remove some things and use a suitable hook.

    <?php // remove all spaces up of here too
    /*
      Plugin Name: RePhotosPic Plugin
      Description: A plugin to retrieve photos and share them on the wordpress.
      Version: 1.0
      Author: Saeed pirdost
      Copyright: 2012,  Saeed pirdost
     */
    
    // remove     ?> <?php
    
    add_filter('admin_notices', 'hello');
    
    function hello()
    {
        echo 'Hello';
    }
    
    // remove ?>
    

    UPDATE:

    Remove myprint(); place it inside a WP hook too. Like this:

    add_filter('admin_notices', 'myprint');
    
    function myprint()
    {
        echo "hello";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to activate a self-made wordpress plugin but am getting a T_Variable error
When trying to activate my plugin, wordpress comes up with this error: Plugin could
I am trying to activate a slideDown() onclick with an element that has been
I'm getting an error when trying to activate a webpart. It activates fine in
Ive been trying a few days to activate the FriendlyService in exo-platfom 3.5.x but
I'm trying to bind $('#pics').click(function()){ to activate the following basic JSONP request: $.getJSON(http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?, function(data){
I'm trying to write a couple of lines of code that activate the windows
I am trying to activate my Virtual Python Environment to use with Pylons but
I'm trying to get a text box that looks like a spinner to activate
I'm trying to make an infinite loop (with a break) that runs alongside my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.