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

    (@anonymized-357386)

    Is really strange…
    In latest release i’ve this function:
    = If is present code in my custom css settings and my_style.css file not exist (removed manually or first upgrade from old release), make new my_style.css

    if (!empty($mycustomcss) && (!file_exists(css_path())))
    {
    	makecss();
    }

    makecss(); =

    function makecss()
    {
    	// make my_style.css and write write css code!
    	$makecss = file_put_contents(css_path(), "/********* Do not edit this file *********/\n/*\nMy Custom CSS - Maked by Salvatore Noschese\na.k.a. DarkWolf - http://www://darkwolf.it/\n*/\n\n".mycustomcss());
    	return $makecss;
    }

    And unlink (remove file) is only with this:
    = if exist file but no code in my custom css settings…

    elseif (empty($mycustomcss) && file_exists(css_path()))
    	{
    		unlink(css_path());
    	}

    I’ve test in local machine and in webserver and don’t have found any problem :/

    Can you try to edit “my-custom-css.php” and change “Version: 1.5” to 1.4 and force a new update to test again? See also directory permission (via ftp) in “my-custom-css” directory 😉

    Thread Starter Cetheus

    (@cetheus)

    Sure. I did the Update again and it removed the CSS File again.
    After the Update I’m receiving the following Message:
    Warning: file_put_contents(/www/htdocs/**********/***********/wp-content/plugins/my-custom-css/my_style.css) [function.file-put-contents]: failed to open stream: Permission denied in /www/htdocs/**********/***********/wp-content/plugins/my-custom-css/my-custom-css.php on line 58

    It’s interesting, that he says “Permission denied” instead of “File not found”

    Also if the File was created with CHMOD 644 it isn’t filled by the Plugin. It has to be set to 777 manually.

    The directory is set to CHMOD 755…

    Anonymous User 357386

    (@anonymized-357386)

    Thanks for report… i’ve found more info in google… I need more test (maybe is safe mode problem – enabled in my online server).

    Thread Starter Cetheus

    (@cetheus)

    No Problem. If you need more Info, just say it 🙂

    Anonymous User 357386

    (@anonymized-357386)

    I’ve search more and test in another webserver… All seems to works fine :/
    Anyway, I’ve found this result:
    http://www.algisinfo.com/ro/forum/9-aiContactSafe–English-/10427-warning-file_put_contents-failed-to-open-stream.html#10430

    You might have the owner of some of the folders changed. You can try asking your hosting provider to reset the owner of all your files and folders either to the user you’re using for FTP ( if you activated FTP in Joomla ) or the user under which php is running.


    I think, maybe, you have a similar problem!

    file_put_contents require folder permission to 755 and if you have set to this isn’t any reason to don’t work as expected :/

    Thread Starter Cetheus

    (@cetheus)

    I checked the owner and it is completely set to my User.
    I have already reset the User for all my Data again. But no change in the Update behavior.

    Anonymous User 357386

    (@anonymized-357386)

    Can i know what is your webhost (and if is linux or windows)?

    Thread Starter Cetheus

    (@cetheus)

    Sure. I’m hosted by All-Inkl.com and they are running a Linux Server

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Update deletes my_style.css’ is closed to new replies.