WordPress.org

Ready to get started?Download WordPress

Forums

My Custom CSS
[resolved] I get a warning on activation (4 posts)

  1. pictureitsolved
    Member
    Posted 8 months ago #

    I get the following warning at the top of my admin screen immediately after activating the plugin:
    Warning: file_put_contents(/home/artinfo/public_html/wp-content/plugins/my-custom-css/my_style.css) [function.file-put-contents]: failed to open stream: Permission denied in /home/artinfo/public_html/wp-content/plugins/my-custom-css/my-custom-css.php on line 58

    I also get this message, outlined in a yellow box above the list of plugins:
    The plugin generated 338 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.

    I've used the plugin successfully on other sites. I suspect the host for this site may have stricter permissions.

    Is the plugin trying to create a file in the plugin's directory? That's probably not a good practice for plugins in general - I could see it being a big security problem. It could be a problem when the plugin is updated, too, because it would get overwritten. But I really like the syntax recognition of this plugin vs. others (or custom css in a child theme) and I'd really love to know of a solution.

    Thanks in advance for any help or advice...
    Karen

    http://wordpress.org/plugins/my-custom-css/

  2. DarkWolf
    Member
    Plugin Author

    Posted 7 months ago #

    Hi Karen!
    yes, mcc require file_put_contents to make a static css file (is best instead to call continuosly - via query - from database). Isn't a security risk, it make only a *.css when u click in save button in my custom css panel! I think u have a problem with this function. Ask your host if this can be enabled... Kind regards,
    DarkWolf :)

  3. pictureitsolved
    Member
    Posted 7 months ago #

    Thanks, DarkWolf.

    My fix was to go into my host's CPanel and create the my_style.css file. I also had to open up the permissions on the file in order to be able to write to it.

  4. DarkWolf
    Member
    Plugin Author

    Posted 7 months ago #

    My Custom Css provide automatically to create this file via php...
    I think the problem is with permission in plugin folder :/
    As u have see, in most/more cases isn't necessary to touch any permission to work as expected.. Maybe this host use a different config with file_put_contents!
    -
    Regards,
    DarkWolf :)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.