In the minifying section there are 2 extra fields when enabling this option:
Path to JAVA executable:
Path to JAR file:
In your case you should use the following settings:
Path to JAVA executable: /usr/bin/java
Path to JAR file: /usr/local/lib/yuicompressor-2.4.6.jar
Then press test if everything is working.
Thread Starter
psbook
(@psbook)
Yes. We’ve already done all that but it still doesn’t work.
Any idea why?
Are you sure that your installation works on the command line?
Here’s what I believe may be happening in your case:
1. system() or shell_exec() are disabled in your system
2. open_basedir is configured, and your java binary is not in the path
3. your apache ghost is configured to run under a different user (suexec), and the Java binary does not have the SETUID flag.
It can be one, or a combination of the above that make it fail for you.
I’m having this problem too. No matter what I do I can’t work out how to get YUI compressor to work.
I installed OpenJDK via yum and have extracted the YUI compressor jar file.
When I click test W3TC keeps saying:
JAVA executable (/usr/bin/java) is not a valid file.
Just like it did for psbook.
I can run YUI compressor no problem (as root) when I SSH in.
I also checked that open_basedir wasn’t configured and that apache is running under apache.
I’m not sure how to check whether system() or shell_exec() are disabled and is it safe to enable those?
Also, turning PHP safe mode off doesn’t help. I feel like a bashing my head against a wall.
Does anyone have any advice please?
Although no JS minify finally works with my slideshow, I just found the/a resolution:
Copying the full jre directory (with bin and lib included) to a folder inside the wordpress installation (e.g. wp-content) and also place the jar files there enables the possibility to use java. Either doing an open_basedir none nor symlinking the java executable or sth. else worked. It’s somehow a strange issue.
if you were able to run within wp folder it is probably basedir restriction, I would have checked if open_basedir was really set at none