• First of all, thank you Frank for a good plugin.

    I ran into the following issues.

    When switching to Nginx from Apache server AO stopped caching / combining css files (even when plugin settings are the same), but it does combine/cache js files.

    Caching folder permissions: 755
    Also there is microcaching enabled on nginx, but don’t think it is an issue.

    Any idea why that is happening?

    https://ww.wp.xz.cn/plugins/autoptimize/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Frank Goossens

    (@futtta)

    no idea at all I’m afraid ps67481 … are your CSS-files on the same domain as your HTML and JS (by default AO doesn’t aggregate files that aren’t on the exact same domain)? do you have any errors in your PHP-errorlog?

    frank

    Thread Starter ps67481

    (@ps67481)

    Thank you for the response.

    Yes, css files are on the same domain and no error longs are showing…

    Will try to see where to problem is and if I find a solution I’ll post an update.

    Plugin Author Frank Goossens

    (@futtta)

    If you want I could create a debug-version of autoptimizeStyles.php (and autoptimizeBase.php) to output extra stuff to your php errorlog.

    Thread Starter ps67481

    (@ps67481)

    Sure!

    Plugin Author Frank Goossens

    (@futtta)

    ok, you can already use this one for autoptimizeBase.php. I’ll create an autoptimizeStyles.php-one later tonight or tomorrow morning.

    Thread Starter ps67481

    (@ps67481)

    Thank you Frank, will use it right now.

    Thread Starter ps67481

    (@ps67481)

    Here’s the log file. For some reason it has no mention of any css files, only js.

    These are the settings used: 1, 2, 3

    Plugin Author Frank Goossens

    (@futtta)

    well, we’ll have to wait for the autoptimizeStyles.php to understand what is happening. but maybe you can already try the “legacy minifiers” as explained in the FAQ?

    Thread Starter ps67481

    (@ps67481)

    Tried legacy minifiers, no difference.

    Sure, please let me know whenever you’ll have autoptimizeStypes.php

    Plugin Author Frank Goossens

    (@futtta)

    ok, first wp-content/plugins/autoptimize/autoptimize.php; can you overwrite that with the contents of https://gist.github.com/futtta/c3c8e7f3bfba906829a35c785e119aef?

    Plugin Author Frank Goossens

    (@futtta)

    and autoptimizeStyles.php with debug output is here; https://gist.github.com/futtta/a29935d8a9dab3421d6ab6af1ceb12aa

    Thread Starter ps67481

    (@ps67481)

    Thank you Frank.

    Updated long since legacy minification here

    Plugin Author Frank Goossens

    (@futtta)

    your logfile has

    CSS read: extracting all CSS

    but it does not have

    CSS read extract found:

    although that is the logical next step as from the code;

    error_log("CSS read: extracting all CSS");
    		if(preg_match_all('#(<style[^>]*>.*</style>)|(<link[^>]*stylesheet[^>]*>)#Usmi',$this->content,$matches)) {
    			foreach($matches[0] as $tag) {
    				error_log("CSS read extract found: ".$tag);

    the regex if pure PHP (using PCRE under the hood) and a switch from Apache to NGINX can’t warrant this regression (also; there’s a considerable minority of other AO-users on NGINX that are not experiencing this issue).

    careful conclusion; I suspect another type of conflict, possibly with another plugin. next step would be to selectively disable (and re-enable) plugins (and temporarily switch plugins) to identify the culprit?

    frank

    Thread Starter ps67481

    (@ps67481)

    I can try turning off plugins. Also disabled microcaching on nginx, so that was not causing the issue.

    Also, the server has nginx + apache working together.

    Thread Starter ps67481

    (@ps67481)

    Disable all of the plugins, still the same

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘AO and NGINX’ is closed to new replies.