Closed (fixed)
Project:
Google Closure Compiler
Version:
6.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
9 Apr 2010 at 22:55 UTC
Updated:
30 Apr 2013 at 21:04 UTC
Jump to comment: Most recent file
Comments
Comment #1
ManyNancy commentedA few things, the server is sending to google http://localhost/files/7ytyg987tg8oastgt80.js
Which naturally doesn't work. I hardcoded my domain in and it starts sending. But it's sending ~200 js files, which is giving me:
Server error: Array ( [0] => Array ( [code] => 22 [error] => Too many compiles performed recently. Try again later. ) )
I think the compiler should be made part of this module, rather than as a remote thing.
Comment #2
mehmeta commentedThe standalone compiler offered by Google is based on java, so it'd require java to be installed on the server. It makes a lot of sense to offer it as an option though, so if you have java installed and the compiler.jar downloaded, the module would choose to use that instead of sending the file contents or url. I'll soon update the module whenever I have time, providing this feature.
Comment #3
ManyNancy commentedOK, Thanks!
Comment #4
mehmeta commentedThe latest release supports local compiling now!
Comment #6
ManyNancy commentedThank you very much, I've been trying to install, but:
http://img243.imageshack.us/img243/7923/compilerjava.jpg
It might have to do with this part of your documentation:
"PHP shell_exec function to be executable in your environment without issues."
I'm not sure what that is, how do I check if that works?
Thanks.
Comment #7
danmasq commentedsubscribing. I am experiencing the same issue as #6.
drupal is aggregating the javascripts, but closure compiler is not minifying/compressing the javascript at all.
Comment #8
danmasq commentedso when I run this from command line, shell_exec('java') returns the 'Usage: ...' information, which is then turned into TRUE by stripos detection of the needle 'Usage'. Basically if java can't be shell_exec()'d this will return NULL, bypassing closure compiler's local compile method. aggregation will run, but the minification doesn't take place.
someone suggested that the user apache is running shell_exec() as doesn't have java in it's $PATH variable.. need to look into this still.
Comment #9
danmasq commentedahah! my method to get it running: java 2>&1
change out:
with:
Comment #10
johnpitcairn commentedNot working here I'm afraid. I've no great desire to allow java on the server, so it's set to send the file contents to the API. shell_exec is allowed.
No change after multiple cron runs - js files are aggregated, but not compressed. Log entry is "Successfully compiled 3 javascript files, 0 failed." New aggregate files are definitely being generated.
Any advice?
Comment #11
johnpitcairn commentedScratch that. I changed nothing, but now it's working.
Comment #12
mattwmc commentedI got it working, as well!
I noticed the default process limit for js files was set to 5 for each cron run. I have 28 or so. I changed it to '0'. Not sure if that matters to others who have more than 5 and can't get it working on just a single cron run.
Comment #13
nburles commentedIt looks like everyone has got this working, and it has been over two years since the last comment, so I am closing this issue.