PHP Classes

Cannot create minified file

Recommend this page to a friend!

      MagicMin  >  All threads  >  Cannot create minified file  >  (Un) Subscribe thread alerts  
Subject:Cannot create minified file
Summary:When I try do the merge, it always returns the same error
Messages:2
Author:Sansonaye
Date:2014-06-10 16:27:43
Update:2014-06-10 18:14:21
 

  1. Cannot create minified file   Reply   Report abuse  
Picture of Sansonaye Sansonaye - 2014-06-10 16:27:43
Hello!

I'm trying to integrate your classe. Congratulations on this script looks great.

The fact is that when I have all the CSS in an array and want to do the merge, it always returns the same error:
console.log ("Minifier ERROR:.. http://localhost/project/lib/css is not writable minified. Can not create file");

It's the same local or remote. And I made sure that the permissions on the folder are 777. Do you think may be happening?

Greetings!

  2. Re: Cannot create minified file   Reply   Report abuse  
Picture of Bennett Stone Bennett Stone - 2014-06-10 18:14:21 - In reply to message 1 from Sansonaye
Hi Sansonaye, and thanks for the kind words.

It sounds like it's trying to use a full http:// path to create the minified file rather than the absolute path on the server (so neither invalid file, nor directory permissions).

Magicmin will accept a file TO minify with an http path, but it can't create the output file there, so it sounds as though the output filename/path may just need to be corrected.

If you're using a CMS such as wordpress or codeigniter, you may find it easier to use this type of implementation:

gist.github.com/bennettstone/d2a08c ... (I've included the function I use and some example implementation)