Support » Plugin: My Custom CSS PHP & ADS » I get a warning on activation

  • Resolved pictureitsolved

    (@pictureitsolved)


    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Anonymous User 357386

    (@anonymized-357386)

    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 🙂

    Thread Starter pictureitsolved

    (@pictureitsolved)

    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.

    Anonymous User 357386

    (@anonymized-357386)

    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 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I get a warning on activation’ is closed to new replies.